All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <shuah.khan@hp.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: fujita.tomonori@lab.ntt.co.jp, paul.gortmaker@windriver.com,
	bhelgaas@google.com, amwang@redhat.com,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	linux-kernel@vger.kernel.org, shuahkhan@gmail.com
Subject: Re: [PATCH] swiotlb: add kernel error message to track iobtlb overflow buffer usage
Date: Wed, 05 Sep 2012 08:38:33 -0600	[thread overview]
Message-ID: <1346855913.2589.10.camel@lorien2> (raw)
In-Reply-To: <20120904162804.baad7cc0.akpm@linux-foundation.org>

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



      reply	other threads:[~2012-09-05 14:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-01  0:55 [PATCH] swiotlb: add kernel error message to track iobtlb overflow buffer usage Shuah Khan
2012-09-04 23:24 ` Shuah Khan
2012-09-04 23:28 ` Andrew Morton
2012-09-05 14:38   ` Shuah Khan [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=1346855913.2589.10.camel@lorien2 \
    --to=shuah.khan@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=amwang@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=shuahkhan@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.