Re: Bug: Discontigmem virt_to_page() [Alpha,ARM,Mips64?]

From: Andrea Arcangeli (
Date: Wed May 01 2002 - 20:43:18 EST

On Wed, May 01, 2002 at 03:26:22AM +0200, Daniel Phillips wrote:
> On Thursday 02 May 2002 02:47, Andrea Arcangeli wrote:
> > > - Leads forward to interesting possibilities such as hot plug memory.
> > > (Because pinned kernel memory can be remapped to an alternative
> > > region of physical memory if desired)
> >
> > You cannot handle hot plug with nonlinear, you cannot take the mem_map
> > contigous when somebody plugins new memory, you've to allocate the
> > mem_map in the new node, discontigmem allows that, nonlinear doesn't.
> You have not read and understood the patch, which this comment demonstrates.
> For your information, the mem_map lives in *virtual* memory, it does not
> need to change location, only the kernel page tables need to be updated,
> to allow a section of kernel memory to be moved to a different physical
> location. For user memory, this was always possible, now it is possible
> for kernel memory as well. Naturally, it's not all you have to do to get
> hotplug memory, but it's a big step in that direction.

what kernel pagetables? pagetables for space that you left free for
what? You waste virtual space for that at the very least on x86 that is
just very tigh, at this point kernel virtual space is more costly than
physical space these days. And nevertheless most archs doesn't have
pagetables at all to read and write the page structures. yes it's
virtual memory but it's a direct mapping. DaveM even rewrote the palcode
of sparc to skip the pagetable walking for kernel direct mapping. alpha
mips have a kseg that maps to physical addresses directly. there are
_no_ pagetables for the mem_map in most archs, the palcode resolves it
directly without using the tlb. So if you move mem_map to pagetables
like modules to handle hotplug you just made automatically the whole
kernel slower due the additional pte walking and tlb trashing.

> > At the very least you should waste some tons of memory of unused mem_map
> > for all the potential memory that you're going to plugin, if you want to
> > handle hot-plug with nonlinear.
> Eh. No.
> It's not useful for me to keep correcting you on your misunderstanding of
> what config_nonlinear actually does. Please read Jonathan Corbet's
> excellent writeup in lwn, it's written in a very understandable fashion.
> --
> Daniel

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:12 EST