[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220518131353.GB26019@lst.de>
Date: Wed, 18 May 2022 15:13:53 +0200
From: Christoph Hellwig <hch@....de>
To: Robin Murphy <robin.murphy@....com>
Cc: John Garry <john.garry@...wei.com>, joro@...tes.org,
will@...nel.org, hch@....de, m.szyprowski@...sung.com,
chenxiang66@...ilicon.com, thunder.leizhen@...wei.com,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
liyihang6@...ilicon.com
Subject: Re: [RFC PATCH] dma-iommu: Add iommu_dma_max_mapping_size()
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.
Powered by blists - more mailing lists