From: "Roedel, Joerg" <Joerg.Roedel@amd.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH v2] dma-debug: print some unfreed allocations
Date: Thu, 19 May 2011 10:19:31 +0200 [thread overview]
Message-ID: <20110519081931.GM31309@amd.com> (raw)
In-Reply-To: <1305758908.8827.3.camel@jlt3.sipsolutions.net>
On Wed, May 18, 2011 at 06:48:28PM -0400, Johannes Berg wrote:
> On Mon, 2011-05-16 at 13:00 +0200, Roedel, Joerg wrote:
> > > + /*
> > > + * If we have, print out some stack traces for the allocations.
> > > + * In case of module unload, the stack traces will be useless,
> > > + * but instead of unloading the module you can manually unbind
> > > + * the driver instead and get useful traces.
> > > + */
> > > + printk(KERN_WARNING "Showing traces for %d allocations:\n",
> > > + DMA_DEBUG_NUM_PRINT_UNFREED);
>
> > This is surely useful to developers, but can trash the dmesg if done
> > unconditionally. I would prefer this verbose output to be configurable
> > and off by default.
>
> Are you thinking of runtime or compile time configuration? Kconfig entry
> depending on stacktrace (or selecting it, depending on have_stacktrace)
> would be easy enough.
It should be configurable at runtime. DMA-debugging already has a
debugfs interface which you can use for that. By default dma-debugging
should only print out the message about leaked entries. The developer
can then reproduce it and find the cause by enabling the verbose output.
Note that there is documentation in Documentation/DMA-API.txt to
document the debugfs interface. Please make sure to update that too.
Regards,
Joerg
next prev parent reply other threads:[~2011-05-19 8:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 18:42 [PATCH] dma-debug: print some unfreed allocations Johannes Berg
2011-05-11 12:47 ` [PATCH v2] " Johannes Berg
2011-05-16 11:00 ` Roedel, Joerg
2011-05-18 22:48 ` Johannes Berg
2011-05-19 8:19 ` Roedel, Joerg [this message]
2011-05-20 16:36 ` [PATCH v3] " Johannes Berg
2011-05-23 12:35 ` Roedel, Joerg
2011-06-08 11:03 ` Johannes Berg
2011-06-08 12:16 ` Roedel, Joerg
2011-06-08 12:26 ` Johannes Berg
2011-06-08 12:37 ` Roedel, Joerg
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=20110519081931.GM31309@amd.com \
--to=joerg.roedel@amd.com \
--cc=dwmw2@infradead.org \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
/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