Re: memory hotremove prototype, take 3

From: Luck, Tony
Date: Mon Dec 01 2003 - 15:14:19 EST


Pavel Machek wrote:

> hotunplug seems cool... How do you deal with kernel data structures in
> memory "to be removed"? Or you simply don't allow kmalloc() to
> allocate there?

You guessed right. Hot removeable memory can only be allocated
for uses that we can easily re-allocate. So kmalloc() etc. have
to get memory from some area that we promise not to ever try to
remove.

> During hotunplug, you copy pages to new locaion. Would it simplify
> code if you forced them to be swapped out, instead? [Yep, it would be
> slower...]

There are some pages that will have to be copied (e.g. pages that
the user "mlock()d" should still be locked in their new location,
same for hugetlbfs pages).

-Tony Luck

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