From: Jason Gunthorpe <jgg@nvidia.com>
To: Aaron Lewis <aaronlewis@google.com>
Cc: kvm@vger.kernel.org, alex@shazbot.org, dmatlack@google.com
Subject: Re: [PATCH 0/2] vfio/iommufd: Prevent scheduler warnings when unmapping large regions
Date: Thu, 16 Jul 2026 10:20:19 -0300 [thread overview]
Message-ID: <20260716132019.GM3775915@nvidia.com> (raw)
In-Reply-To: <CAAAPnDHkJabsf7haMLX7bp30qxcbXc_81y8mw5t-3bNWdm4LmQ@mail.gmail.com>
On Wed, Jul 15, 2026 at 03:07:42PM -0700, Aaron Lewis wrote:
> On Wed, Jul 15, 2026 at 11:11 AM Jason Gunthorpe <jgg@nvidia.com> wrote:
> >
> > On Tue, Jul 14, 2026 at 09:03:01PM +0000, Aaron Lewis wrote:
> > > Both the Type1 IOMMU and IOMMUFD can be guilty of not playing nice with
> > > the scheduler during DMA unmapping on large regions (e.g., 256GB). Add
> > > rate-limited calls to cond_resched() to ensure this doesn't happen.
> > >
> > > This series was tested using the selftest proposed here:
> > > - https://lore.kernel.org/kvm/20260701203311.326798-1-aaronlewis@google.com/
> > >
> > > And profiled using the bpftrace tooling proposed here:
> > > - https://lore.kernel.org/kvm/20260630141152.3757722-2-aaronlewis@google.com/
> >
> > Given this is the same issue on both in the some place, I wonder if it
> > is better to try to get this series done:
> >
> > https://lore.kernel.org/linux-iommu/20260603151804.1963871-1-guanghuifeng@linux.alibaba.com/
> >
> > And put the cond sched inside the iova_to_phys_length() ?
> >
> > It would be fine to do things in steps, like add the
> > iova_to_phys_length() that just does the loops iommufd and vfio have
> > today with the additional cond sched inside which isn't such a big
> > task.
> >
> > Jason
>
> Ah, I think that is really what I wanted, but I proposed a solution to
> get feedback quicker. I'll wait for that series to be merged and
> reaccess if a cond_resched() is still needed. I'll follow up here
> once I've had a chance to run these tests again with it included.
It seems kind of stalled, so IDK if you want to propose just a bit of
it that would be fine too
Jason
prev parent reply other threads:[~2026-07-16 13:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 21:03 [PATCH 0/2] vfio/iommufd: Prevent scheduler warnings when unmapping large regions Aaron Lewis
2026-07-14 21:03 ` [PATCH 1/2] vfio/type1: Periodically try rescheduling when unmapping Aaron Lewis
2026-07-14 21:15 ` sashiko-bot
2026-07-15 17:39 ` David Matlack
2026-07-15 18:12 ` Jason Gunthorpe
2026-07-14 21:03 ` [PATCH 2/2] iommufd: Periodically reschedule " Aaron Lewis
2026-07-14 21:34 ` sashiko-bot
2026-07-15 18:11 ` [PATCH 0/2] vfio/iommufd: Prevent scheduler warnings when unmapping large regions Jason Gunthorpe
2026-07-15 22:07 ` Aaron Lewis
2026-07-16 13:20 ` Jason Gunthorpe [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=20260716132019.GM3775915@nvidia.com \
--to=jgg@nvidia.com \
--cc=aaronlewis@google.com \
--cc=alex@shazbot.org \
--cc=dmatlack@google.com \
--cc=kvm@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox