All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pranjal Shrivastava <praan@google.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Mostafa Saleh <smostafa@google.com>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Kevin Tian <kevin.tian@intel.com>,
	Daniel Mentz <danielmentz@google.com>,
	Samiullah Khawaja <skhawaja@google.com>,
	Logan Odell <loganodell@google.com>,
	iommu@lists.linux.dev, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/5] iommupt: Introduce IO page table shrinker
Date: Mon, 30 Nov 2026 15:35:31 +0000	[thread overview]
Message-ID: <aw2Xw-YHULUaP3Iy@google.com> (raw)
In-Reply-To: <20261109145250.GO663069@ziepe.ca>

On Mon, Nov 09, 2026 at 10:52:50AM -0400, Jason Gunthorpe wrote:
> On Mon, Nov 09, 2026 at 12:34:54PM +0000, Mostafa Saleh wrote:
> 
> > I believe there is a value in supporting other users beyond IOMMUFD/VFIO
> > (eg. DMA domains) or even outside of iommupt, I haven't investigated this,
> > but it's worth looking into either integrating the "iommupt clean(gap)"
> > idea in the IOVA allocator or more generally rely on refcounting +
> > shrinker (or other method).
> 
> The main point is to avoid the refcounting because that is going to be a
> perf negative for everyone..
> 

IIUC, we are also wanting to avoid refcounting for observability, right?

> I think most people should be able to do a clean call, and if it is
> routed as a generic domain function that would be fine too
> 

Right.. in that case I suppose we'd move forward with IOMMUFD ioctls
that take a lock (maybe iova_rwsem?) for both, clean up and
observability? And a similar approach can be taken for in-kernel users?

My question was why shall we walk each time (with a lock) just for
observability? Can't we follow the refcounted approach just for
observability as in the RFC series [1] and just avoid refcounting for
PTEs? Since that's iommu->domain level refcounting it should not be in
any perf-sensitive path too?

An offline discussion with Joerg revealed that there's interest to have
observability even if we have the required shrinking / clean up logic in
place. I was wondering if that could mean keeping the observability
series [1], almost similar apart from dropping the vfio-type1 support?
WDYT?

Thanks,
Praan

[1] https://lore.kernel.org/all/20261001224531.765278-1-praan@google.com/

  reply	other threads:[~2026-11-30 15:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 23:02 [RFC PATCH 0/5] iommupt: Introduce IO page table shrinker Pranjal Shrivastava
2026-10-01 23:02 ` [RFC PATCH 1/5] iommu: Add reclaim_list xarray to struct iommu_domain Pranjal Shrivastava
2026-10-01 23:02 ` [RFC PATCH 2/5] iommupt: Implement refcounting logic for Leaf entries Pranjal Shrivastava
2026-10-01 23:02 ` [RFC PATCH 3/5] iommupt: Add lockless sever_branch helper Pranjal Shrivastava
2026-10-01 23:02 ` [RFC PATCH 4/5] iommupt: Introduce lockless page table shrinker Pranjal Shrivastava
2026-10-01 23:02 ` [RFC PATCH 5/5] iommupt: Return real page count to the shrinker core Pranjal Shrivastava
2026-10-02 15:08 ` [RFC PATCH 0/5] iommupt: Introduce IO page table shrinker Jason Gunthorpe
2026-10-05  4:58   ` Pranjal Shrivastava
2026-11-09 12:34     ` Mostafa Saleh
2026-11-09 14:52       ` Jason Gunthorpe
2026-11-30 15:35         ` Pranjal Shrivastava [this message]
2026-10-03  8:10 ` [syzbot ci] " syzbot ci

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=aw2Xw-YHULUaP3Iy@google.com \
    --to=praan@google.com \
    --cc=danielmentz@google.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=loganodell@google.com \
    --cc=robin.murphy@arm.com \
    --cc=skhawaja@google.com \
    --cc=smostafa@google.com \
    --cc=will@kernel.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 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.