login
Header Space

 
 

Re: [PATCH 00/28] Swap over NFS -v16

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Pekka Enberg <penberg@...>
Cc: Neil Brown <neilb@...>, Andrew Morton <akpm@...>, Linus Torvalds <torvalds@...>, <linux-kernel@...>, <linux-mm@...>, <netdev@...>, <trond.myklebust@...>
Date: Wednesday, February 27, 2008 - 4:33 am

On Wed, 2008-02-27 at 09:14 +0100, Peter Zijlstra wrote:

Humm, and here I sit staring at the screen. Perhaps I should go get my
morning juice, but...

  if (mem_reserve_kmalloc_charge(my_res, sizeof(*foo), 0)) {
    foo = kmalloc(sizeof(*foo), gfp|__GFP_MEMALLOC)
    if (!kmem_is_emergency(foo))
      mem_reserve_kmalloc_charge(my_res, -sizeof(*foo), 0)
  } else
    foo = kmalloc(sizeof(*foo), gfp);

Just doesn't look too pretty..

And needing to always account the allocation seems wrong.. but I'll take
poison and see if that wakes up my mind.



--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 00/28] Swap over NFS -v16, Neil Brown, (Wed Feb 27, 1:51 am)
Re: [PATCH 00/28] Swap over NFS -v16, Peter Zijlstra, (Wed Feb 27, 3:58 am)
Re: [PATCH 00/28] Swap over NFS -v16, Pekka Enberg, (Wed Feb 27, 4:05 am)
Re: [PATCH 00/28] Swap over NFS -v16, Peter Zijlstra, (Fri Feb 29, 7:51 am)
Re: [PATCH 00/28] Swap over NFS -v16, Pekka Enberg, (Fri Feb 29, 7:58 am)
Re: [PATCH 00/28] Swap over NFS -v16, Peter Zijlstra, (Fri Feb 29, 8:18 am)
Re: [PATCH 00/28] Swap over NFS -v16, Pekka Enberg, (Fri Feb 29, 8:29 am)
Re: [PATCH 00/28] Swap over NFS -v16, Peter Zijlstra, (Wed Feb 27, 4:14 am)
Re: [PATCH 00/28] Swap over NFS -v16, Peter Zijlstra, (Wed Feb 27, 4:33 am)
Re: [PATCH 00/28] Swap over NFS -v16, Pekka J Enberg, (Wed Feb 27, 4:43 am)
speck-geostationary