tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: uvm vm_physseg trimming
Hello after a long while.
>>>>> "Masao" == Masao Uebayashi <uebayasi%gmail.com@localhost> writes:
Masao> avail_start/avail_end are used to keep track of the range
Masao> used for "managed pages" - PAGE_SIZE'ed pages that are added
Masao> to free list and allocated from there. Managed pages are
Masao> initially added after kernel reserves its internal, bootstrap
Masao> memory region (.text, .data, ...).
Masao> In some cases kernel wants to get ("steal") more memory, for
Masao> its internal use, after it already gives all remaining memory
Masao> pages to UVM. See pmap_steal_memory().
Masao> There are no clear design or requirement for MD code about
Masao> how to use vm_physseg right now. By merging `avail_start' to
Masao> `start', you lose information of the original `start'; actual
Masao> start physical address of a continuous physical memory
Masao> segment. And even without it, probably all ports will
Masao> continue working, because nothing uses that information.
Right, so I began actually using it for its semantically relevant
purpose, and .....
Masao> Personally I don't like that direction. I wanted to make
Masao> interfaces around vm_physseg and pmap/UVM bootstrap design
Masao> clearer. I wanted to keep more information into vm_physseg,
Masao> instead of letting MD code invent their own paddr_t range
Masao> management.
Masao> I would suggest you to touch/massage those UVM/pmap/MD
Masao> bootstrap code readily and carefully. That is the only way
Masao> to thoroughly understand such abandoned things. Asking
Masao> questions don't give you perfect answers. Splitting
Masao> vm_physseg handling from uvm_page.c into uvm_physseg.c would
Masao> be a good start.
.... hid the vm_segment stuff behind a couple of files
(uvm_physmem.[ch]).
http://fooobar.mooo.com/~cherry/tmp/uvm_physmem2.diff
The result was surprisingly close to an API I have been working on for
hotplug, so this encourages me.
Stay tuned.....
--
~cherry
Home |
Main Index |
Thread Index |
Old Index