On Friday, January 25, 2002 10:23:28 PM +1100 Andrew Clausen
<[EMAIL PROTECTED]> wrote:

>> ----- quote from Andi from a different thread --
>> > 
>> > mmap(NULL, ...) will be slow because it uses a linear search over all
>> > mappings of the current process. If you manage the address space
>> > yourself and specify an address to map to mmap it'll be fast because
>> > it uses an scalable data structure (AVL or RBtree) in this case. I
>> > would suggest doing that if you rely a lot on mmap with many mappings. 
> 
> So, isn't the way to do that malloc(3) and mmap(2)?
> Or even read(2)/write(2) should achieve the same effect.  (Why didn't I
> think of this before!)
> 
> So, you don't actually pay twice for buffers, except in the time between
> modifying a buffer and calling write(2).  Obviously, this only applies to
>> = 2.4.11.
> 
> Anyway to test this?  (I don't know very much about the kernel, so I'm
> not too confident about my logic...)  I can't think of a (nice) way to!

Sorry, you've lost me, do you mean the O_DIRECT stuff?

-chris

Reply via email to