lkml.org 
[lkml]   [2022]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] dma-iommu: Add iommu_dma_max_mapping_size()
On Wed, May 18, 2022 at 03:13:53PM +0200, Christoph Hellwig wrote:
> On Tue, May 17, 2022 at 01:02:00PM +0100, Robin Murphy wrote:
> >> So how to inform the SCSI driver of this caching limit then so that it may
> >> limit the SGL length?
> >
> > Driver-specific mechanism; block-layer-specific mechanism; redefine this
> > whole API to something like dma_opt_mapping_size(), as a limit above which
> > mappings might become less efficient or start to fail (callback to my
> > thoughts on [1] as well, I suppose); many options. Just not imposing a
> > ridiculously low *maximum* on everyone wherein mapping calls "should not be
> > larger than the returned value" when that's clearly bollocks.
>
> Well, for swiotlb it is a hard limit. So if we want to go down that
> route we need two APIs, one for the optimal size and one for the
> hard limit.

I agree with Robin, and if it really helps some drivers I am all for
doing a dma_opt_mapping_size() instead. Limiting DMA mapping sizes to
make drivers perform better gets a clear NAK from my side.

Regards,

Joerg

\
 
 \ /
  Last update: 2022-05-20 10:53    [W:0.053 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site