From: Matthew Auld <matthew.auld@intel.com>
To: Karl Mehltretter <kmehltretter@gmail.com>
Cc: intel-xe@lists.freedesktop.org,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Matthew Brost" <matthew.brost@intel.com>
Subject: Re: [PATCH 2/2] drm/xe/shrinker: hold a stable RPM ref across scan
Date: Mon, 28 Sep 2026 12:37:02 +0100 [thread overview]
Message-ID: <10d8cd48-ff49-4303-a4b0-26afdad76241@intel.com> (raw)
In-Reply-To: <20260926165621.31254-1-kmehltretter@gmail.com>
On 26/09/2026 17:56, Karl Mehltretter wrote:
> On Fri, Sep 25, 2026 at 11:55:23AM +0000, Matthew Auld wrote:
>> @@ -102,7 +84,7 @@ static int __xe_shrinker_walk(struct xe_shrinker *shrinker,
>>
>> if (mem_type != XE_PL_SYSTEM && !rpm &&
>> xe_device_is_l2_flush_optimized(xe)) {
>> - if (!__xe_shrinker_runtime_pm_get(shrinker))
>> + if (!xe_pm_runtime_get_if_active(xe))
>> break;
>> rpm = true;
>> }
>
> Could this skip TT reclaim with CONFIG_PM=n on integrated graphics
> version 35 or newer?
>
> The !CONFIG_PM stub of pm_runtime_get_if_active() returns -EINVAL, so
> xe_pm_runtime_get_if_active() always returns false here. Taking the
> outer synchronous reference cannot change that stub's result.
>
> Previously, kswapd could take the synchronous fallback in
> __xe_shrinker_runtime_pm_get() when D3cold was unavailable and continue
> into the TT manager (e.g. with CONFIG_ACPI=n).
Interesting. If this is true then I think this is a widespread issue and
driver was already busted here, since various places use if_active() and
if_in_use(). In fact just below this call if we trigger xe_bo_shrink(),
we have the same pattern, I think. If that returns "false" it will skip
the operation there also.
Assuming CONFIG_PM=n is valid, then maybe something like:
bool xe_pm_runtime_get_if_active(struct xe_device *xe)
{
+ if (!IS_ENABLED(CONFIG_PM))
+ return true;
+
return pm_runtime_get_if_active(xe->drm.dev) > 0;
}
And then same thing for if_in_use().
>
> Sashiko dismissed the skipped-TT concern assuming the outer resume
> makes the active check succeed. Might that dismissal have overlooked
> CONFIG_PM=n?
> https://sashiko.dev/#/patchset/80538
>
> Thanks,
> Karl
next prev parent reply other threads:[~2026-09-28 11:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 11:55 [PATCH 1/2] drm/xe/shrinker: use async RPM get Matthew Auld
2026-09-25 11:55 ` [PATCH 2/2] drm/xe/shrinker: hold a stable RPM ref across scan Matthew Auld
2026-09-26 16:56 ` Karl Mehltretter
2026-09-28 11:37 ` Matthew Auld [this message]
2026-09-25 12:02 ` [PATCH 1/2] drm/xe/shrinker: use async RPM get sashiko-bot
2026-09-25 12:03 ` ✓ CI.KUnit: success for series starting with [1/2] " Patchwork
2026-09-25 13:43 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-25 21:07 ` ✗ Xe.CI.FULL: failure " Patchwork
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=10d8cd48-ff49-4303-a4b0-26afdad76241@intel.com \
--to=matthew.auld@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=kmehltretter@gmail.com \
--cc=matthew.brost@intel.com \
--cc=thomas.hellstrom@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox