Re: [PATCH v7 9/9] swiotlb: search the software IO TLB only if the device makes use of it

2023-09-08 Thread Christoph Hellwig
On Thu, Sep 07, 2023 at 01:12:23PM +0200, Petr Tesařík wrote: > Hi all, > > sorry for my late reply; I've been away from my work setup for a > month... Please take a look at: https://lore.kernel.org/linux-iommu/20230905064441.127588-1-...@lst.de/T/#u

Re: [PATCH v7 9/9] swiotlb: search the software IO TLB only if the device makes use of it

2023-09-07 Thread Petr Tesařík
Hi all, sorry for my late reply; I've been away from my work setup for a month... On Wed, 30 Aug 2023 08:55:51 -0600 Jonathan Corbet wrote: > So it seems this code got merged without this question ever being > answered. Sorry if it's a dumb one, but I don't think this > functionality works as

Re: [PATCH v7 9/9] swiotlb: search the software IO TLB only if the device makes use of it

2023-08-31 Thread Christoph Hellwig
On Wed, Aug 09, 2023 at 03:20:43PM -0600, Jonathan Corbet wrote: > > spin_unlock_irqrestore(&dev->dma_io_tlb_lock, flags); > > > > - /* Pairs with smp_rmb() in swiotlb_find_pool(). */ > > - smp_wmb(); > > found: > > + dev->dma_uses_io_tlb = true; > > + /* Pairs with smp_rmb() in is_s

Re: [PATCH v7 9/9] swiotlb: search the software IO TLB only if the device makes use of it

2023-08-30 Thread Jonathan Corbet
So it seems this code got merged without this question ever being answered. Sorry if it's a dumb one, but I don't think this functionality works as advertised... Thanks, jon Jonathan Corbet writes: > Petr Tesarik writes: > >> From: Petr Tesarik >> >> Skip searching the software IO TLB if a

Re: [PATCH v7 9/9] swiotlb: search the software IO TLB only if the device makes use of it

2023-08-09 Thread Jonathan Corbet
Petr Tesarik writes: > From: Petr Tesarik > > Skip searching the software IO TLB if a device has never used it, making > sure these devices are not affected by the introduction of multiple IO TLB > memory pools. > > Additional memory barrier is required to ensure that the new value of the > flag

[PATCH v7 9/9] swiotlb: search the software IO TLB only if the device makes use of it

2023-07-31 Thread Petr Tesarik
From: Petr Tesarik Skip searching the software IO TLB if a device has never used it, making sure these devices are not affected by the introduction of multiple IO TLB memory pools. Additional memory barrier is required to ensure that the new value of the flag is visible to other CPUs after mappi