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: Wed, 15 Jul 2026 15:11:33 -0300 [thread overview]
Message-ID: <20260715181133.GE3775915@nvidia.com> (raw)
In-Reply-To: <20260714210303.3967981-1-aaronlewis@google.com>
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
next prev parent reply other threads:[~2026-07-15 18:11 UTC|newest]
Thread overview: 9+ 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 ` Jason Gunthorpe [this message]
2026-07-15 22:07 ` [PATCH 0/2] vfio/iommufd: Prevent scheduler warnings when unmapping large regions Aaron Lewis
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=20260715181133.GE3775915@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