public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Vasquez <andrew.vasquez@qlogic.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Rik van Riel <riel@redhat.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] quiet down swiotlb warnings
Date: Fri, 1 Jun 2007 11:16:59 -0700	[thread overview]
Message-ID: <20070601181659.GG12143@andrew-vasquezs-computer.local> (raw)
In-Reply-To: <p73odjzbism.fsf@bingen.suse.de>

On Fri, 01 Jun 2007, Andi Kleen wrote:

> Rik van Riel <riel@redhat.com> writes:
> 
> > It turns out that the qla2xxx driver sometimes fills up the iotlb
> > on purpose and throttles itself when pci_map_sg() fails.  In the
> > case of a driver that expects and handles pci_map_sg() failures,
> > we should not spam the user's console with swiotlb full messages.
> 
> Why does it do that? Could we supply a better interface
> for whatever it is trying to do here?

The driver only calls pci_map_sg() once it's insured that all local
driver resources are available to submit an I/O to the hardware.

> > -	printk(KERN_ERR "DMA: Out of SW-IOMMU space for %zu bytes at "
> > -	       "device %s\n", size, dev ? dev->bus_id : "?");
> > +	if (++warnings < 5)
> > +		printk(KERN_ERR "DMA: Out of SW-IOMMU space for %zu bytes at "
> > +		       "device %s\n", size, dev ? dev->bus_id : "?");
> 
> Bad idea imho. swiotlb mappings should always lead to printk by default
> because it is pretty dangerous.

Why?  It's just another resource which is consumed -- the qla2xxx
driver is the final consumer before I/O is submitted out on the wire.
The mappings are held for the shorted time required -- as such, are
released as soon as the I/O completes.

> One possible solution for this I could think of would be to define a
> new pci_map_sg_couldfail() or similar that doesn't warn and use a weak
> fallback just calling pci_map_sg on other IOMMU implementations. 

      parent reply	other threads:[~2007-06-01 18:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-01 17:30 [PATCH] quiet down swiotlb warnings Rik van Riel
2007-06-01 19:01 ` Andi Kleen
2007-06-01 18:12   ` Christoph Hellwig
2007-06-01 18:18     ` Rik van Riel
2007-06-01 19:37     ` Andi Kleen
2007-06-01 19:38       ` Rik van Riel
2007-06-01 19:47         ` Andi Kleen
2007-06-01 20:00           ` Andrew Vasquez
2007-06-01 20:14             ` Andi Kleen
2007-06-01 20:20               ` Rik van Riel
2007-06-01 20:26                 ` Andi Kleen
2007-06-02 15:21                   ` Muli Ben-Yehuda
2007-06-02 16:47                     ` Andi Kleen
2007-06-01 19:57       ` Christoph Hellwig
2007-06-01 18:16   ` Andrew Vasquez [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=20070601181659.GG12143@andrew-vasquezs-computer.local \
    --to=andrew.vasquez@qlogic.com \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@redhat.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