Re: [PATCH part2 v2 0/8] Arrange hotpluggable memory as ZONE_MOVABLE

From: Ingo Molnar
Date: Wed Oct 16 2013 - 03:03:53 EST



* H. Peter Anvin <hpa@xxxxxxxxx> wrote:

> On 10/14/2013 11:50 PM, Ingo Molnar wrote:
> >
> > So if anyone can implement it using huge pages, with a really fast
> > __va() and __pa() implementation, then it might be possible. But
> > that's a pretty major surgery on x86.
>
> Well, we already *have* a way to deal with that for Xen (by inserting an
> otherwise nonexistent logical level.) I'm wondering if those interfaces
> could be (ab)used for this as well, or if that is functionally
> equivalent to saying that this should be done in a hypervisor.

It's not _that_ complex, and it does not need a separate security layer.

I have this distinct memory that I saw working patches that have paged all
of the kernel's data, more than a decade ago. It was all rather
disgusting, because those patches worked on the 4K level - but if a 2MB
granular solution can be found in an elegant fashion then I think we could
reconsider.

It definitely wasn't hypervisor thick. It probably needs a good hash for
virtual address transformations, and all DMA has to be managed [these days
we do that via the IOMMU anyway] but that's pretty much all - kernel
virtual memory is reconfigured extremely rarely, so all that could be sped
up for reads and mirrored per node and kept lockless, etc. etc. [Plus a
metric ton of details.]

Thanks,

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