From: Suravee Suthikulpanit <suravee.suthikulpanit-5C7GfCeVMHo@public.gmane.org>
To: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
jroedel-l3A5Bk7waGM@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v3] iommu/amd: Add support for fast IOTLB flushing
Date: Wed, 21 Feb 2018 14:05:57 +0700 [thread overview]
Message-ID: <2e9a6834-36b2-8f65-ab07-914b8e3d5671@amd.com> (raw)
In-Reply-To: <20180213132959.kkavgzt37hm7n2tt-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Hi Joerg,
On 2/13/18 8:29 PM, Joerg Roedel wrote:
> Hi Suravee,
>
> thanks for working on this.
>
> On Wed, Jan 31, 2018 at 12:01:14AM -0500, Suravee Suthikulpanit wrote:
>> +static void amd_iommu_iotlb_range_add(struct iommu_domain *domain,
>> + unsigned long iova, size_t size)
>> +{
>> + struct amd_iommu_flush_entries *entry, *p;
>> + unsigned long flags;
>> + bool found = false;
>> +
>> + spin_lock_irqsave(&amd_iommu_flush_list_lock, flags);
>
> I am not happy with introducing or using global locks when they are not
> necessary. Can this be a per-domain lock?
>
> Besides, did you check it makes sense to actually keep track of the
> ranges here? My approach would be to just make iotlb_range_add() an noop
> and do a full domain flush in iotlb_sync(). But maybe you did
> measurements you can share here to show there is a benefit.
>
>
>
> Joerg
>
Alright, I'll send out v4 w/ iotlb_range_add() as no-op, and iotlb_sync()
as full domain flush. This should be sufficient to get start with adopting
the fast TLB flushing interface.
I'll submit support for fine-grain TLB invalidation as a separate series.
Thanks,
Suravee
prev parent reply other threads:[~2018-02-21 7:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 5:01 [PATCH v3] iommu/amd: Add support for fast IOTLB flushing Suravee Suthikulpanit
2018-02-13 13:29 ` Joerg Roedel
[not found] ` <20180213132959.kkavgzt37hm7n2tt-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2018-02-21 7:05 ` Suravee Suthikulpanit [this message]
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=2e9a6834-36b2-8f65-ab07-914b8e3d5671@amd.com \
--to=suravee.suthikulpanit-5c7gfcevmho@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
--cc=jroedel-l3A5Bk7waGM@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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