lkml.org 
[lkml]   [2004]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Active Memory Defragmentation: Our implementation & problems
--Dave Hansen <haveblue@us.ibm.com> wrote (on Tuesday, February 03, 2004 22:22:36 -0800):

> On Tue, 2004-02-03 at 22:05, Martin J. Bligh wrote:
>> >> 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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.051 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site