Re: [PATCH] adjust/fix LDT handling for Xen

From: Jan Beulich
Date: Mon Jan 14 2008 - 03:21:59 EST


>>> Jeremy Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx> 11.01.08 18:28 >>>
>Jan Beulich wrote:
>> Don't rely on kmalloc(PAGE_SIZE) returning PAGE_SIZE aligned memory
>> (Xen requires GDT *and* LDT to be page-aligned).
>
>Can kmalloc return non-page-aligned PAGE_SIZE allocations?

Documentation says it's to return pointer-size aligned memory - any excess
alignment is therefore an implementation detail. (Nevertheless, afaics all
current allocators generate page-aligned chunks.)

>> Using the page
>> allocator interface also removes the (albeit small) slab allocator
>> overhead.
>
>Runtime or space overhead? Given that they're once-off allocations, the
>time part isn't a big factor. And apparently LDT is completely unused.

Both, but as I also said the saving is small.

Jan

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