[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 9/9] swiotlb: search the software IO TLB only if the device makes use of it
- To: Jonathan Corbet <corbet@xxxxxxx>
- From: Christoph Hellwig <hch@xxxxxx>
- Date: Thu, 31 Aug 2023 14:51:09 +0200
- Cc: Petr Tesarik <petrtesarik@xxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, "Rafael J. Wysocki" <rafael@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>, Robin Murphy <robin.murphy@xxxxxxx>, Christoph Lameter <cl@xxxxxxxxx>, Pekka Enberg <penberg@xxxxxxxxxx>, David Rientjes <rientjes@xxxxxxxxxx>, Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxx>, Roman Gushchin <roman.gushchin@xxxxxxxxx>, Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx>, Petr Tesarik <petr.tesarik.ext@xxxxxxxxxx>, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, Hans de Goede <hdegoede@xxxxxxxxxx>, James Seo <james@xxxxxxxxxx>, James Clark <james.clark@xxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, "moderated list:XEN HYPERVISOR ARM" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "moderated list:ARM PORT" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, open list <linux-kernel@xxxxxxxxxxxxxxx>, "open list:MIPS" <linux-mips@xxxxxxxxxxxxxxx>, "open list:XEN SWIOTLB SUBSYSTEM" <iommu@xxxxxxxxxxxxxxx>, "open list:SLAB ALLOCATOR" <linux-mm@xxxxxxxxx>, Roberto Sassu <roberto.sassu@xxxxxxxxxxxxxxx>, petr@xxxxxxxxxxx
- Delivery-date: Thu, 31 Aug 2023 12:51:36 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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_swiotlb_buffer() */
> > + smp_wmb();
> > +
>
> ...and here you set it if swiotlb is used.
>
> But, as far as I can tell, you don't actually *use* this field anywhere.
> What am I missing?
It's very much unused. Petr, I guess you wanted to use this in
is_swiotlb_buffer to avoid the lookup unless required. Can you send
a follow up?
|