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>,
	Christoph Hellwig <hch@infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] quiet down swiotlb warnings
Date: Fri, 1 Jun 2007 13:00:49 -0700	[thread overview]
Message-ID: <20070601200049.GK12143@andrew-vasquezs-computer.local> (raw)
In-Reply-To: <20070601194734.GJ7217@one.firstfloor.org>

On Fri, 01 Jun 2007, Andi Kleen wrote:

> On Fri, Jun 01, 2007 at 03:38:57PM -0400, Rik van Riel wrote:
> > Andi Kleen wrote:
> > 
> > >An pci_map_sg failing typically leads to an IO error and we've
> > >always printk'ed those. Otherwise people will wonder why they
> > >get EIO.
> > 
> > In some situations.  In this case the qla2xxx driver uses
> > the pci_map_sg() failure as a throttling mechanism and
> 
> First WTF does it need swiotlb anyways? QA hardware should
> be definitely DAC capable, shouldn't it?

yes, the card can support 64bit DMA transfers. but in this case the
'required' DMA mask returned from dma_get_required_mask() states that a
32bit mask would suffice.

Here's a snippet from the bugzilla report
(https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219216):

        QLogic Fibre Channel HBA Driver
        PCI: Enabling device 0000:1f:00.0 (0140 -> 0143)
        ACPI: PCI Interrupt 0000:1f:00.0[A] -> GSI 16 (level, low) -> IRQ 16
        qla2xxx 0000:1f:00.0: Found an ISP2432, irq 16, iobase 0xffffc20000020000
        *** qla2x00_config_dma_addressing: required_mask set to 000000007fffffff.
        *** qla2x00_config_dma_addressing: required_mask has no high-dword bits set.
        *** qla2x00_config_dma_addressing: set consistent 64bit mask returned 0.
        *** qla2x00_config_dma_addressing: defaulting to 32bit mask/consistent-mask.
        qla2xxx 0000:1f:00.0: Configuring PCI space...

	Which tells me that a 32bit DMA mask is being set for dma_set_mask()
	and pci_set_consistent_dma_mask() since dma_get_required_mask() is
	returning back 7fffffff -- no upper-dword bits set...
	...

> > printing out all the warnings will actually slow down the
> > system.
> 
> Another reason is that there is a lot of code that
> still doesn't check the return values and when that
> happens you might get data corruption too.
> 
> > 
> > Andi, what do you propose as a solution?
> 
> A different interface; like I wrote in my earlier mail.
> 
> Another probabibility would be to have a blocking interface
> to swiotlb that won't fail. That would be the better solution
> long term, but i was told it is hard to fit into some current
> driver interfaces.

  reply	other threads:[~2007-06-01 20:01 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 [this message]
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

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=20070601200049.GK12143@andrew-vasquezs-computer.local \
    --to=andrew.vasquez@qlogic.com \
    --cc=andi@firstfloor.org \
    --cc=hch@infradead.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