* [PATCH] slqb: add common slab debug bits
@ 2009-08-31 7:42 Wu Fengguang
2009-09-03 19:40 ` Pekka Enberg
0 siblings, 1 reply; 2+ messages in thread
From: Wu Fengguang @ 2009-08-31 7:42 UTC (permalink / raw)
To: Andrew Morton
Cc: KOSAKI Motohiro, linux-kernel@vger.kernel.org, Nick Piggin,
Christoph Lameter, linux-mm
This is a simple copy&paste from slub.c:
- lockdep annotation
- might sleep annotation
- fault injection
CC: Nick Piggin <nickpiggin@yahoo.com.au>
CC: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
mm/slqb.c | 7 +++++++
1 file changed, 7 insertions(+)
--- linux-mm.orig/mm/slqb.c 2009-08-28 15:51:15.000000000 +0800
+++ linux-mm/mm/slqb.c 2009-08-28 16:05:33.000000000 +0800
@@ -19,6 +19,7 @@
#include <linux/ctype.h>
#include <linux/kallsyms.h>
#include <linux/memory.h>
+#include <linux/fault-inject.h>
/*
* TODO
@@ -1541,6 +1542,12 @@ static __always_inline void *slab_alloc(
gfpflags &= gfp_allowed_mask;
+ lockdep_trace_alloc(gfpflags);
+ might_sleep_if(gfpflags & __GFP_WAIT);
+
+ if (should_failslab(s->objsize, gfpflags))
+ return NULL;
+
again:
local_irq_save(flags);
object = __slab_alloc(s, gfpflags, node);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] slqb: add common slab debug bits
2009-08-31 7:42 [PATCH] slqb: add common slab debug bits Wu Fengguang
@ 2009-09-03 19:40 ` Pekka Enberg
0 siblings, 0 replies; 2+ messages in thread
From: Pekka Enberg @ 2009-09-03 19:40 UTC (permalink / raw)
To: Wu Fengguang
Cc: Andrew Morton, KOSAKI Motohiro, linux-kernel@vger.kernel.org,
Nick Piggin, Christoph Lameter, linux-mm
On Mon, Aug 31, 2009 at 10:42 AM, Wu Fengguang<fengguang.wu@intel.com> wrote:
> This is a simple copy&paste from slub.c:
>
> - lockdep annotation
> - might sleep annotation
> - fault injection
>
> CC: Nick Piggin <nickpiggin@yahoo.com.au>
> CC: Christoph Lameter <cl@linux-foundation.org>
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Applied, thanks!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-03 19:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-31 7:42 [PATCH] slqb: add common slab debug bits Wu Fengguang
2009-09-03 19:40 ` Pekka Enberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).