Re: [PATCH] Xen/i386 cleanups - AGP bus/phys cleanups

From: Keir Fraser
Date: Sat Mar 19 2005 - 08:04:13 EST



On 19 Mar 2005, at 10:56, Christian Limpach wrote:

For this specific case there may be another resolution but could
you please, please look at marking the missing pages PG_reserved
and not hacking phys_to_virt.

At this point anything short of explicitly introducing an intermediate
step say virt_to_logical() logical_to_virt() will be extremely
confusing and lead to very hard to spot bugs. Silently changing
the semantics of functions is bad.

We also use the additional level of indirection to implement suspend/
resume and relocation of virtual machines between physical machines --
you won't get the same sparse allocation of memory on the target machine.
Also, this will make it much easier to support hot plug memory at the
hypervisor level since it will be able to substitute memory with very
little support from the OS running in the virtual machine.

Also, more generally, I don't believe Linux would deal well with a highly fragmented memory map. I wonder how far Linux would boot if you PG_reserved every other page? We'd also need to deal with virtual<->lowmem not being a 1:1 mapping (at least for kernel code and data, as at least that obviously needs to be contiguous in virtual space).

-- Keir

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