RE: memory hotremove prototype, take 3

From: Luck, Tony
Date: Wed Dec 03 2003 - 22:42:41 EST


> > IMHO, To hot-remove memory, memory attribute should be divided
> > into Hotpluggable and no-Hotpluggable, and each attribute memory
> > should be allocated each unit(ex. node).
>
> Why? I still don't get that -- we should be able to use the virtual
> addressing mechanism of any CPU to swap under the rug any virtual
> address without needing to do anything more than allocate a page frame
> for the new physical location (I am ignoring here devices that are
> directly accessing physical memory--a callback in the device
> model could
> be added to require them to reallocate their buffers).
>
> Or am I deadly and naively wrong?

Most (all?) Linux implementations make use of a large area
of memory that is mapped 1:1 (with a constant offset) from
kernel virtual space to physical space. Kernel memory is
allocated in this virtual area. If the processor supports
some form of large pages in the TLB, this 1:1 area uses the
large pages ... so it would require some major surgery to
remap portions of this area, and would have a negative effect
on performance (since you'd take more TLB misses). It might
even be a correctness issue if the structures in this area
were needed to handle small page TLB faults in the area itself.

-Tony
-
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/