Magellan Linux

Contents of /tags/kernel26-xen-2_6_25_r1-fedora9-patches/kernel26-xen/patches-2.6.25-r1/1145-2.6.25-xen-DEBUG-slab-debugging.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 608 - (show annotations) (download)
Fri May 23 12:17:32 2008 UTC (16 years ago) by (unknown author)
File size: 1437 byte(s)
This commit was manufactured by cvs2svn to create tag
'kernel26-xen-2_6_25_r1-fedora9-patches'.
1 From e39d21e365aa46e171e94197dde9fdec10678262 Mon Sep 17 00:00:00 2001
2 From: Eduardo Habkost <ehabkost@redhat.com>
3 Date: Fri, 8 Feb 2008 16:37:16 -0200
4 Subject: [PATCH] DEBUG: slab debugging
5
6 Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
7 ---
8 mm/slab.c | 8 +++++++-
9 1 files changed, 7 insertions(+), 1 deletions(-)
10
11 diff --git a/mm/slab.c b/mm/slab.c
12 index ed27eb8..d434cc3 100644
13 --- a/mm/slab.c
14 +++ b/mm/slab.c
15 @@ -3201,6 +3201,8 @@ static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags)
16 STATS_INC_ALLOCHIT(cachep);
17 ac->touched = 1;
18 objp = ac->entry[--ac->avail];
19 + if (!objp)
20 + printk("really weird: avail objp for cache %s is null\n", cachep->name);
21 } else {
22 STATS_INC_ALLOCMISS(cachep);
23 objp = cache_alloc_refill(cachep, flags);
24 @@ -3463,8 +3465,10 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller)
25 unsigned long save_flags;
26 void *objp;
27
28 - if (should_failslab(cachep, flags))
29 + if (should_failslab(cachep, flags)) {
30 + printk("cache %s should fail\n", cachep->name);
31 return NULL;
32 + }
33
34 cache_alloc_debugcheck_before(cachep, flags);
35 local_irq_save(save_flags);
36 @@ -3476,6 +3480,8 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller)
37 if (unlikely((flags & __GFP_ZERO) && objp))
38 memset(objp, 0, obj_size(cachep));
39
40 + if (!objp)
41 + printk("allocation from cache %s failed!!!\n", cachep->name);
42 return objp;
43 }
44
45 --
46 1.5.4.1
47