From: Robin Murphy <robin.murphy@arm.com>
To: John Garry <john.garry@huawei.com>, joro@8bytes.org, will@kernel.org
Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
willy@infradead.org
Subject: Re: [PATCH 9/9] iommu: Move flush queue data into iommu_dma_cookie
Date: Wed, 24 Nov 2021 18:00:23 +0000 [thread overview]
Message-ID: <e95f682b-a9b4-d946-c6fc-e59aba624466@arm.com> (raw)
In-Reply-To: <9dece0b8-2832-f467-91f3-f63ef0f70d16@huawei.com>
On 2021-11-24 17:25, John Garry wrote:
> On 23/11/2021 14:10, Robin Murphy wrote:
>> ruct iommu_dma_msi_page {
>> struct list_head list;
>> @@ -41,7 +43,19 @@ struct iommu_dma_cookie {
>> enum iommu_dma_cookie_type type;
>> union {
>> /* Full allocator for IOMMU_DMA_IOVA_COOKIE */
>> - struct iova_domain iovad;
>> + struct {
>> + struct iova_domain iovad;
>> +
>> + struct iova_fq __percpu *fq; /* Flush queue */
>> + /* Number of TLB flushes that have been started */
>> + atomic64_t fq_flush_start_cnt;
>> + /* Number of TLB flushes that have been finished */
>> + atomic64_t fq_flush_finish_cnt;
>> + /* Timer to regularily empty the flush queues */
>> + struct timer_list fq_timer;
>> + /* 1 when timer is active, 0 when not */
>> + atomic_t fq_timer_on;
>
> I thought that putting all the FQ stuff in its own structure would be
> neater, but that's just personal preference.
But look, it is! ;)
The iova_domain is still a fundamental part of the flush queue built
around it; the rest of the machinery can't stand in isolation. It's just
an anonymous structure because I don't feel like needlessly cluttering
up the code with "cookie->fq.fq" silliness.
Cheers,
Robin.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2021-11-24 18:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 14:10 [PATCH 0/9] iommu: Refactor flush queues into iommu-dma Robin Murphy
2021-11-23 14:10 ` [PATCH 1/9] gpu: host1x: Add missing DMA API include Robin Murphy
2021-11-24 14:05 ` Robin Murphy
2021-12-06 12:20 ` Joerg Roedel
2021-11-23 14:10 ` [PATCH 2/9] iommu/iova: Squash entry_dtor abstraction Robin Murphy
2021-11-23 14:10 ` [PATCH 3/9] iommu/iova: Squash flush_cb abstraction Robin Murphy
2021-11-23 14:10 ` [PATCH 4/9] iommu/amd: Simplify pagetable freeing Robin Murphy
2021-12-06 12:40 ` Joerg Roedel
2021-12-06 13:28 ` Robin Murphy
2021-11-23 14:10 ` [PATCH 5/9] iommu/amd: Use put_pages_list Robin Murphy
2021-11-23 14:10 ` [PATCH 6/9] iommu/vt-d: " Robin Murphy
2021-11-23 14:10 ` [PATCH 7/9] iommu/iova: Consolidate flush queue code Robin Murphy
2021-11-23 14:10 ` [PATCH 8/9] iommu/iova: Move flush queue code to iommu-dma Robin Murphy
2021-11-23 14:10 ` [PATCH 9/9] iommu: Move flush queue data into iommu_dma_cookie Robin Murphy
2021-11-23 22:40 ` kernel test robot
2021-11-24 17:25 ` John Garry via iommu
2021-11-24 18:00 ` Robin Murphy [this message]
2021-11-24 17:21 ` [PATCH 0/9] iommu: Refactor flush queues into iommu-dma John Garry via iommu
2021-11-24 18:33 ` Robin Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e95f682b-a9b4-d946-c6fc-e59aba624466@arm.com \
--to=robin.murphy@arm.com \
--cc=iommu@lists.linux-foundation.org \
--cc=john.garry@huawei.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=will@kernel.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).