linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: shuah.khan@hp.com
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: Tue, 4 Sep 2012 16:28:04 -0700	[thread overview]
Message-ID: <20120904162804.baad7cc0.akpm@linux-foundation.org> (raw)
In-Reply-To: <1346460959.3393.3.camel@lorien2>

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.

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


  parent reply	other threads:[~2012-09-04 23:29 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 [this message]
2012-09-05 14:38   ` Shuah Khan

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=20120904162804.baad7cc0.akpm@linux-foundation.org \
    --to=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=shuah.khan@hp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).