Contents of /trunk/kernel26-xen/patches-2.6.25-r1/1145-2.6.25-xen-DEBUG-slab-debugging.patch
Parent Directory | Revision Log
Revision 606 -
(show annotations)
(download)
Thu May 22 23:13:13 2008 UTC (16 years ago) by niro
File size: 1437 byte(s)
Thu May 22 23:13:13 2008 UTC (16 years ago) by niro
File size: 1437 byte(s)
-ver bump to 2.6.25-magellan-r1: - linux-2.6.25.4 - fbcondecor-0.9.4 - squashfs-3.3 - unionfs-2.3.3 - tuxonice-3.0-rc7 - linux-phc-0.3.0 - acpi-dstd-0.9a - reiser4 - xen-3.2.0 . ipw3945-1.2.2
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 |