public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add might_sleep_if() for slub
@ 2008-11-19 12:23 OGAWA Hirofumi
  2008-11-19 19:28 ` Christoph Lameter
  2008-11-20  9:28 ` Pekka Enberg
  0 siblings, 2 replies; 3+ messages in thread
From: OGAWA Hirofumi @ 2008-11-19 12:23 UTC (permalink / raw)
  To: Christoph Lameter, Andrew Morton; +Cc: linux-kernel

Hi,

I don't know it is intention, or not. However, current SLUB not seems to
warn about might_sleep_if(gfpflags & __GFP_WAIT);

If it's not intention, please apply.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>


Currently SLUB doesn't warn about __GFP_WAIT. Add it into slab_alloc().

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
---

 mm/slub.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN mm/slub.c~slub-might-sleep mm/slub.c
--- linux-2.6/mm/slub.c~slub-might-sleep	2008-11-19 20:57:28.000000000 +0900
+++ linux-2.6-hirofumi/mm/slub.c	2008-11-19 20:57:28.000000000 +0900
@@ -1591,6 +1591,7 @@ static __always_inline void *slab_alloc(
 	unsigned long flags;
 	unsigned int objsize;
 
+	might_sleep_if(gfpflags & __GFP_WAIT);
 	local_irq_save(flags);
 	c = get_cpu_slab(s, smp_processor_id());
 	objsize = c->objsize;
_

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-20  9:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-19 12:23 [PATCH] Add might_sleep_if() for slub OGAWA Hirofumi
2008-11-19 19:28 ` Christoph Lameter
2008-11-20  9:28 ` Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox