Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

2012-09-19 Thread Shuah Khan
On Wed, 2012-09-19 at 15:08 +0200, Joerg Roedel wrote: > On Tue, Sep 18, 2012 at 01:42:49PM -0600, Shuah Khan wrote: > > Are you ok with the system wide and per device error counts I added? Any > > comments on the overall approach? > > The general approach of having error counters is fine. But the

Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

2012-09-19 Thread Joerg Roedel
On Tue, Sep 18, 2012 at 01:42:49PM -0600, Shuah Khan wrote: > Are you ok with the system wide and per device error counts I added? Any > comments on the overall approach? The general approach of having error counters is fine. But the addresses allocated/addresses checked thing should be done per a

Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

2012-09-18 Thread Shuah Khan
On Tue, 2012-09-18 at 15:45 -0400, Konrad Rzeszutek Wilk wrote: > On Tue, Sep 18, 2012 at 01:42:49PM -0600, Shuah Khan wrote: > > On Tue, 2012-09-18 at 15:34 +0200, Joerg Roedel wrote: > > > On Mon, Sep 17, 2012 at 04:45:15PM -0600, Shuah Khan wrote: > > > > Yeah. I will firm up my ideas a bit and

Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

2012-09-18 Thread Konrad Rzeszutek Wilk
On Tue, Sep 18, 2012 at 01:42:49PM -0600, Shuah Khan wrote: > On Tue, 2012-09-18 at 15:34 +0200, Joerg Roedel wrote: > > On Mon, Sep 17, 2012 at 04:45:15PM -0600, Shuah Khan wrote: > > > Yeah. I will firm up my ideas a bit and summarize in a day or two. Would > > > like to hear your ideas as well a

Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

2012-09-18 Thread Shuah Khan
On Tue, 2012-09-18 at 15:34 +0200, Joerg Roedel wrote: > On Mon, Sep 17, 2012 at 04:45:15PM -0600, Shuah Khan wrote: > > Yeah. I will firm up my ideas a bit and summarize in a day or two. Would > > like to hear your ideas as well at that time, so we can pick the one > > that works the best. > > I

Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

2012-09-18 Thread Joerg Roedel
On Mon, Sep 17, 2012 at 04:45:15PM -0600, Shuah Khan wrote: > Yeah. I will firm up my ideas a bit and summarize in a day or two. Would > like to hear your ideas as well at that time, so we can pick the one > that works the best. I think the best approach for this functionality is to add a flag to

Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

2012-09-17 Thread Shuah Khan
On Mon, 2012-09-17 at 13:23 -0400, Konrad Rzeszutek Wilk wrote: > On Mon, Sep 17, 2012 at 09:52:52AM -0600, Shuah Khan wrote: > > On Mon, 2012-09-17 at 09:39 -0400, Konrad Rzeszutek Wilk wrote: > > > > > > check_unmap(): > > > > This is an existing internal routines that checks for unmap

Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

2012-09-17 Thread Konrad Rzeszutek Wilk
On Mon, Sep 17, 2012 at 09:52:52AM -0600, Shuah Khan wrote: > On Mon, 2012-09-17 at 09:39 -0400, Konrad Rzeszutek Wilk wrote: > > > > check_unmap(): > > > This is an existing internal routines that checks for unmap errors, > > > changed to increment dma_unmap_errors for the current device, as

Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

2012-09-17 Thread Shuah Khan
On Mon, 2012-09-17 at 09:39 -0400, Konrad Rzeszutek Wilk wrote: > > check_unmap(): > > This is an existing internal routines that checks for unmap errors, > > changed to increment dma_unmap_errors for the current device, as well > > as the dma_unmap_errors counter for the system, dma-d

Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

2012-09-17 Thread Greg KH
On Mon, Sep 17, 2012 at 08:45:58AM -0600, Shuah Khan wrote: > On Sun, 2012-09-16 at 19:07 -0700, Greg KH wrote: > > On Sun, Sep 16, 2012 at 06:52:51PM -0600, Shuah Khan wrote: > > > +void debug_dma_dump_map_errors(struct device *dev, int all) > > > +{ > > > + if (all) { > > > + dev_info(dev

Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

2012-09-17 Thread Shuah Khan
On Sun, 2012-09-16 at 19:07 -0700, Greg KH wrote: > On Sun, Sep 16, 2012 at 06:52:51PM -0600, Shuah Khan wrote: > > +void debug_dma_dump_map_errors(struct device *dev, int all) > > +{ > > + if (all) { > > + dev_info(dev, > > +"DMA-API: DMA map error summary:\n" > > +

Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

2012-09-17 Thread Konrad Rzeszutek Wilk
On Sun, Sep 16, 2012 at 06:52:51PM -0600, Shuah Khan wrote: > A recent dma mapping error analysis effort showed that a large percentage > of dma_map_single() and dma_map_page() returns are not checked for mapping > errors. > > Reference: > http://linuxdriverproject.org/mediawiki/index.php/DMA_Mapp

Re: [PATCH] dma-debug: New interfaces to debug dma mapping errors

2012-09-16 Thread Greg KH
On Sun, Sep 16, 2012 at 06:52:51PM -0600, Shuah Khan wrote: > +void debug_dma_dump_map_errors(struct device *dev, int all) > +{ > + if (all) { > + dev_info(dev, > + "DMA-API: DMA map error summary:\n" > + "DMA map errors returned = %d\n" > +