[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190429114401.GA30333@lst.de>
Date: Mon, 29 Apr 2019 13:44:01 +0200
From: Christoph Hellwig <hch@....de>
To: Robin Murphy <robin.murphy@....com>
Cc: Lu Baolu <baolu.lu@...ux.intel.com>,
Christoph Hellwig <hch@....de>,
David Woodhouse <dwmw2@...radead.org>,
Joerg Roedel <joro@...tes.org>, ashok.raj@...el.com,
jacob.jun.pan@...el.com, alan.cox@...el.com, kevin.tian@...el.com,
mika.westerberg@...ux.intel.com, pengfei.xu@...el.com,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 02/10] swiotlb: Factor out slot allocation and free
On Mon, Apr 29, 2019 at 12:06:52PM +0100, Robin Murphy wrote:
>
> From the reply up-thread I guess you're trying to include an optimisation
> to only copy the head and tail of the buffer if it spans multiple pages,
> and directly map the ones in the middle, but AFAICS that's going to tie you
> to also using strict mode for TLB maintenance, which may not be a win
> overall depending on the balance between invalidation bandwidth vs. memcpy
> bandwidth. At least if we use standard SWIOTLB logic to always copy the
> whole thing, we should be able to release the bounce pages via the flush
> queue to allow 'safe' lazy unmaps.
Oh. The head and tail optimization is what I missed. Yes, for that
we'd need the offset.
> Either way I think it would be worth just implementing the straightforward
> version first, then coming back to consider optimisations later.
Agreed, let's start simple. Especially as large DMA mappings or
allocations should usually be properly aligned anyway, and if not we
should fix that for multiple reasons.
Powered by blists - more mailing lists