mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Zwane Mwaikambo <zwane@linuxpower.ca>
Cc: linux-kernel@vger.kernel.org, manfred@colorfullife.com
Subject: Re: [PATCH][2.5] Add cachep->name to kmem_cache_destroy debug printk
Date: Sat, 14 Jun 2003 01:13:34 -0700	[thread overview]
Message-ID: <20030614011334.31bb4f3f.akpm@digeo.com> (raw)
In-Reply-To: <Pine.LNX.4.50.0306140303080.31716-100000@montezuma.mastecende.com>

Zwane Mwaikambo <zwane@linuxpower.ca> wrote:
>
> kmem_cache_destroy: Can't free all objects cbc7af30 (dcookie_cache)
> 
>          I've been getting a number of these, perhaps it might be
>  worthwhile adding the name too.
> 
> ...
>  -		printk(KERN_ERR "kmem_cache_destroy: Can't free all objects %p\n",
>  -		       cachep);
>  +		printk(KERN_ERR "kmem_cache_destroy: Can't free all objects %p (%s)\n",
>  +		       cachep, cachep->name);


yes, but we have a nice little helper for that.

diff -puN mm/slab.c~kmem_cache_destroy-error-print mm/slab.c
--- 25/mm/slab.c~kmem_cache_destroy-error-print	2003-06-14 01:10:37.000000000 -0700
+++ 25-akpm/mm/slab.c	2003-06-14 01:13:12.000000000 -0700
@@ -1374,8 +1374,7 @@ int kmem_cache_destroy (kmem_cache_t * c
 	up(&cache_chain_sem);
 
 	if (__cache_shrink(cachep)) {
-		printk(KERN_ERR "kmem_cache_destroy: Can't free all objects %p\n",
-		       cachep);
+		slab_error(cachep, "Can't free all objects");
 		down(&cache_chain_sem);
 		list_add(&cachep->next,&cache_chain);
 		up(&cache_chain_sem);

_


      reply	other threads:[~2003-06-14  7:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-14  7:03 Zwane Mwaikambo
2003-06-14  8:13 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030614011334.31bb4f3f.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=zwane@linuxpower.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®