lkml.org 
[lkml]   [2011]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] dma-debug: print some unfreed allocations
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




\
 
 \ /
  Last update: 2011-05-19 10:21    [W:0.083 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site