Thread (34 messages) 34 messages, 12 authors, 2004-02-05

Re: Active Memory Defragmentation: Our implementation & problems

From: Martin J. Bligh <hidden>
Date: 2004-02-04 06:29:46
Also in: lkml

--Dave Hansen [off-list ref] wrote (on Tuesday, February 03, 2004 22:22:36 -0800):
On Tue, 2004-02-03 at 22:05, Martin J. Bligh wrote:
quoted
quoted
quoted
In order to move such pages, we will have to patch macros like
"virt_to_phys" & other related macros, so that the address 
translation for pages moved by us will take place vmalloc style, i.e.,
via page tables, instead of direct +-3GB. Is it worth introducing such
an overhead for address translation (vmalloc does it!)? If no, then is
there another way out, or is it better to stick to our current
definition of a movable page? 
Low memory kernel pages are a much bigger deal to defrag.  I've started
to think about these for hotplug memory and it just makes my head hurt. 
If you want to do this, you are right, you'll have to alter virt_to_phys
and company.  The best way I've seen this is with CONFIG_NONLINEAR:
http://lwn.net/2002/0411/a/discontig.php3
Those lookup tables are pretty fast, and have benefits to many areas
beyond defragmentation like NUMA and the memory hotplug projects.  
I don't think that helps you really - the mappings are usually done on
chunks signficantly larger than one page, and we don't want to break
away from using large pages for the kernel mappings.
Yeah, you're right about that one.  The defrag thing needs to deal with
much smaller sections than nonlinear does.  That pretty much leaves
being careful where you allocate.
There are a couple of special cases that might be feasible without making
an ungodly mess. PTE pages spring to mind (particularly as they can be
in highmem too). They should be reasonably easy to move (assuming we can
use rmap to track them back to the process they belong to to lock them ...
hmmm ....)

M.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help