Subject: Re: kernel map entry merging and PR 24039
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Andrew Brown <atatat@atatdot.net>
List: tech-kern
Date: 02/11/2004 22:44:08
>> >maybe you can
>> >         1. uvm_map_prepare
>> >         2. allocate pages
>> >         3. uvm_map_enter
>> >so that you don't need to do uvm_unmap.
>> 
>> Or add an UVM_KMF_NOMERGE flag and pass that to uvm_map.  This
>> will prevent a merge on the VA region just mapped.  Then after
>> successfully getting the pages (at a point failure is no longer
>> possible), do a uvm_map_compress(map, kva, size) which clears the
>> UVM_KMF_NOMERGE flag and then tries to do the map entry merging
>> at that point.  If it can't, no problem.
>
>i don't think it's better because it needs to lookup entry twice.

actually, why specify the map, kva, and size?  why not simply specify
the map and the map entry?  the only "merge" opportunities are going
to be with the entry directly preceding and directly following the new
one, right?  and then you don't have to do the lookup twice.  :)

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."