[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240827071428.GA12797@lst.de>
Date: Tue, 27 Aug 2024 09:14:28 +0200
From: Christoph Hellwig <hch@....de>
To: Michael Kelley <mhklinux@...look.com>
Cc: Christoph Hellwig <hch@....de>, "kbusch@...nel.org" <kbusch@...nel.org>,
"axboe@...nel.dk" <axboe@...nel.dk>,
"sagi@...mberg.me" <sagi@...mberg.me>,
"James.Bottomley@...senPartnership.com" <James.Bottomley@...senPartnership.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"kys@...rosoft.com" <kys@...rosoft.com>,
"haiyangz@...rosoft.com" <haiyangz@...rosoft.com>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
"decui@...rosoft.com" <decui@...rosoft.com>,
"robin.murphy@....com" <robin.murphy@....com>,
"m.szyprowski@...sung.com" <m.szyprowski@...sung.com>,
"petr@...arici.cz" <petr@...arici.cz>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>
Subject: Re: [RFC 0/7] Introduce swiotlb throttling
On Mon, Aug 26, 2024 at 03:27:30PM +0000, Michael Kelley wrote:
> OK, this makes sense to me. The DMA_ATTR_* symbols are currently
> defined as just values that are not part of an enum or any other higher
> level abstraction, and the "attrs" parameter to the dma_* functions is
> just "unsigned long". Are you thinking that the separate namespace is
> based only on the symbolic name (i.e., DMA_MAP_* vs DMA_ATTR_*),
> with the values being disjoint? That seems straightforward to me.
Yes. Although initially I'd just keep ATTR for the allocation and then
maybe do a scripted run to convert it.
> Changing the "attrs" parameter to an enum is a much bigger change ....
I don't think an enum makes much sense as we have bits defined. A
__bitwise type would be nice, but not required.
> For a transition period we can have both DMA_ATTR_SKIP_CPU_SYNC
> and DMA_MAP_SKIP_CPU_SYNC, and then work to change all
> occurrences of the former to the latter.
>
> I'll have to look more closely at WEAK_ORDERING and NO_WARN.
>
> There are also a couple of places where DMA_ATTR_NO_KERNEL_MAPPING
> is used for dma_map_* calls, but those are clearly bogus since that
> attribute is never tested in the map path.
Yeah, these kinds of bogus things is what I'd like to kill..
> > Note that this also in general involves changes to the block drivers
> > to set that flag, which is a bit annoying, but I guess there is not
> > easy way around it without paying the price for the BLK_MQ_F_BLOCKING
> > overhead everywhere.
>
> Agreed. I assumed there was some cost to BLK_MQ_F_BLOCKING since
> the default is !BLK_MQ_F_BLOCKING, but I don't really know what
> that is. Do you have a short summary, just for my education?
I think the biggest issue is that synchronize_srcu is pretty damn
expensive, but there's also a whole bunch of places that unconditionally
defer to the workqueue.
Powered by blists - more mailing lists