lkml.org 
[lkml]   [2008]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] adjust/fix LDT handling for Xen
>>> Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com> 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



\
 
 \ /
  Last update: 2008-01-14 09:25    [from the cache]
©2003-2011 Jasper Spaans