lkml.org 
[lkml]   [2008]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 00/28] Swap over NFS -v16
Hi Peter,

On Wed, Feb 27, 2008 at 9:58 AM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> > 1/ I note there is no way to tell if memory returned by kmalloc is
> > from the emergency reserve - which contrasts with alloc_page
> > which does make that information available through page->reserve.
> > This seems a slightly unfortunate aspect of the interface.
>
> Yes, but alas there is no room to store such information in kmalloc().
> That is, in a sane way. I think it was Daniel Phillips who suggested
> encoding it in the return pointer by flipping the low bit - but that is
> just too ugly and breaks all current kmalloc sites to boot.

Why can't you add a kmem_is_emergency() to SLUB that looks up the
cache/slab/page (whatever is the smallest unit of the emergency pool
here) for the object and use that?


\
 
 \ /
  Last update: 2008-02-27 09:09    [W:0.098 / U:0.060 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site