Re: Active Memory Defragmentation: Our implementation & problems

From: Dave Hansen
Date: Wed Feb 04 2004 - 01:31:13 EST


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.

--dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/