lkml.org 
[lkml]   [2007]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] quiet down swiotlb warnings
From
Date
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?

> */
> - 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.

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.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-01 20:09    [W:0.213 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site