lkml.org 
[lkml]   [2012]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] swiotlb: add kernel error message to track iobtlb overflow buffer usage
From
Date
On Tue, 2012-09-04 at 16:28 -0700, Andrew Morton wrote:
> On Fri, 31 Aug 2012 18:55:59 -0600
> Shuah Khan <shuah.khan@hp.com> wrote:
>
> > Add kernel error message to track iotlb overflow buffer triggers to understand
> > how often the overflow buffer gets used.
> >
> > Signed-off-by: Shuah Khan <shuah.khan@hp.com>
> > ---
> > lib/swiotlb.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/swiotlb.c b/lib/swiotlb.c
> > index 45bc1f8..597d7b9 100644
> > --- a/lib/swiotlb.c
> > +++ b/lib/swiotlb.c
> > @@ -682,6 +682,7 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
> > if (!map) {
> > swiotlb_full(dev, size, dir, 1);
> > map = io_tlb_overflow_buffer;
> > + dev_err(dev, "SWIOTLB is full. Mapping overflow buffer.\n");
> > }
> >
> > dev_addr = swiotlb_virt_to_bus(dev, map);
>
> hm. I would view this as a developer-only debugging thing which
> shouldn't be present in production code. Plus there's a potential that
> some poor person will have his logs flooded with this message.

Yes. I agree.
>
> A more typical way of handling this would be to increment a stats
> counter, accessible in procfs or debugfs.
>

Right. I will work on it. Maybe there is a way to combine this with
dma-debug dma mapping error tracking work I am doing - will look into.

-- Shuah




\
 
 \ /
  Last update: 2012-09-05 17:23    [W:0.043 / U:1.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site