Re: [PATCH] x86: fix pte allocation in "x86: introduce init_memory_mappingfor 32bit"

From: Jeremy Fitzhardinge
Date: Tue Jun 24 2008 - 23:49:43 EST


Yinghai Lu wrote:
thanks.

my test system never use the area from table_start to table_end. and I
wonder why init_pgtable is that big..

This code looks just like the 64-bit code (I guess it's becoming prime for unification), and I'd just spent some time debugging a bug in Xen64 caused by an overrun of the allocated area when creating non-PSE mappings of physical memory. I didn't observe a specific problem with this code, but consistency and pattern matching made it seem like a necessary addition. It only ends up reserving the amount of space actually used, so there's no wasted memory.

If you use PSE to create the mapping and have enough mapped pages anyway (small kernel), then you may not end up using any of this space.

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