From: Nicolin Chen <nicolinc@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: Baolu Lu <baolu.lu@linux.intel.com>,
"jgg@nvidia.com" <jgg@nvidia.com>,
"Lu, Baolu" <baolu.lu@intel.com>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
"Liu, Yi L" <yi.l.liu@intel.com>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 3/3] iommufd/device: Change iommufd_hw_pagetable_has_group to device centric
Date: Wed, 1 Feb 2023 22:36:00 -0800 [thread overview]
Message-ID: <Y9tZ0MVHdwS7AejR@Asurada-Nvidia> (raw)
In-Reply-To: <BN9PR11MB5276076C2048581CCBA6011A8CD69@BN9PR11MB5276.namprd11.prod.outlook.com>
On Thu, Feb 02, 2023 at 06:32:36AM +0000, Tian, Kevin wrote:
> External email: Use caution opening links or attachments
>
>
> > From: Nicolin Chen <nicolinc@nvidia.com>
> > Sent: Wednesday, February 1, 2023 3:20 PM
> >
> > So, assuming we drop this series and move the first two patches
> > back to the nesting series or the replace series, one of them
> > would end up doing something ugly:
> >
> > if (cur_hwpt != hwpt)
> > mutex_lock(&cur_hwpt->device_lock);
> > mutex_lock(&hwpt->device_lock);
> > ...
> > mutex_unlock(&hwpt->device_lock);
> > if (cur_hwpt != hwpt)
> > mutex_unlock(&cur_hwpt->device_lock);
> >
> > So, perhaps we should discuss about which way we want to choose.
>
> from your discussion with Jason I think this locking open has
> been settled down.
Yes :)
> >
> > Btw, Baolu's version has a similar patch as mine changing the
> > iommu_attach/detach_device(), yet also touches _group(). Could
> > we bisect that series into _device() first and _group() later?
> > Given that we only need a device-centric API at this moment...
> >
>
> I'll let Baolu to decide after he re-catches up the comments in
> that thread. But overall I think we now agreed that removing the
> device list/lock can be kept out of your replace/nesting series
> and let it cleaned up after Baolu's work completes, correct? 😊
Correct. It's not a blocker. And I am going to post the replace
series today -- running some additional sanity now.
Thanks
Nic
prev parent reply other threads:[~2023-02-02 6:36 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-28 21:18 [PATCH v2 0/3] iommufd: Remove iommufd_hw_pagetable_has_group Nicolin Chen
2023-01-28 21:18 ` [PATCH v2 1/3] iommufd: Add devices_users to track the hw_pagetable usage by device Nicolin Chen
2023-01-29 9:23 ` Tian, Kevin
2023-01-29 9:30 ` Nicolin Chen
2023-01-29 9:39 ` Tian, Kevin
2023-01-30 2:22 ` Liu, Yi L
2023-01-30 15:02 ` Jason Gunthorpe
2023-01-30 19:27 ` Nicolin Chen
2023-01-30 19:50 ` Jason Gunthorpe
2023-01-30 20:04 ` Nicolin Chen
2023-01-30 20:35 ` Jason Gunthorpe
2023-01-30 20:53 ` Nicolin Chen
2023-02-01 7:48 ` Nicolin Chen
2023-02-02 9:12 ` Nicolin Chen
2023-02-07 4:19 ` Liu, Yi L
2023-02-01 6:57 ` Nicolin Chen
2023-02-01 7:56 ` Nicolin Chen
2023-02-01 15:53 ` Jason Gunthorpe
2023-02-01 17:46 ` Nicolin Chen
2023-02-01 18:37 ` Jason Gunthorpe
2023-02-01 19:25 ` Nicolin Chen
2023-02-01 20:00 ` Jason Gunthorpe
2023-02-01 21:18 ` Nicolin Chen
2023-02-02 7:28 ` Nicolin Chen
2023-02-02 15:03 ` Jason Gunthorpe
2023-02-07 4:27 ` Liu, Yi L
2023-01-28 21:18 ` [PATCH v2 2/3] iommufd/device: Make hwpt_list list_add/del symmetric Nicolin Chen
2023-01-29 9:24 ` Tian, Kevin
2023-01-29 9:31 ` Nicolin Chen
2023-01-30 14:59 ` Jason Gunthorpe
2023-01-30 19:03 ` Nicolin Chen
2023-01-30 19:07 ` Jason Gunthorpe
2023-01-30 19:38 ` Nicolin Chen
2023-01-28 21:18 ` [PATCH v2 3/3] iommufd/device: Change iommufd_hw_pagetable_has_group to device centric Nicolin Chen
2023-01-29 9:37 ` Tian, Kevin
2023-01-29 10:38 ` Nicolin Chen
2023-01-30 0:44 ` Tian, Kevin
2023-01-30 10:22 ` Nicolin Chen
2023-02-01 3:07 ` Tian, Kevin
2023-02-01 6:49 ` Baolu Lu
2023-02-01 6:59 ` Tian, Kevin
2023-02-01 7:20 ` Nicolin Chen
2023-02-02 6:32 ` Tian, Kevin
2023-02-02 6:36 ` Nicolin Chen [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=Y9tZ0MVHdwS7AejR@Asurada-Nvidia \
--to=nicolinc@nvidia.com \
--cc=baolu.lu@intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=yi.l.liu@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.