From: Matthew Brost <matthew.brost@intel.com>
To: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
Michal Wajdeczko <michal.wajdeczko@intel.com>,
Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH v2 2/3] drm/xe/sa: Add lockdep annotations for SA manager swap_guard
Date: Wed, 4 Feb 2026 11:11:08 -0800 [thread overview]
Message-ID: <aYOZzM1CAC926YLR@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20260204164642.3509298-7-satyanarayana.k.v.p@intel.com>
On Wed, Feb 04, 2026 at 04:46:45PM +0000, Satyanarayana K V P wrote:
> Annotate the SA manager init path to model taking swap_guard while under
> reclaim context. This helps lockdep catch potential circular dependencies
> between fs_reclaim and swap_guard in debug builds.
I'd mention without this annotation it lockdep is unware of this chain
until the shrinker runs.
>
> Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
> Suggested-by: Matthew Brost <matthew.brost@intel.com>
I'd make this the last patch in series so it goes in after the reclaim
problem is fixed.
But patch itself LGTM:
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
>
> ---
> V1 -> V2:
> - None.
> ---
> drivers/gpu/drm/xe/xe_sa.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_sa.c b/drivers/gpu/drm/xe/xe_sa.c
> index b738102575d4..5efbb5a09f77 100644
> --- a/drivers/gpu/drm/xe/xe_sa.c
> +++ b/drivers/gpu/drm/xe/xe_sa.c
> @@ -89,6 +89,12 @@ struct xe_sa_manager *__xe_sa_bo_manager_init(struct xe_tile *tile, u32 size,
> if (ret)
> return ERR_PTR(ret);
>
> + if (IS_ENABLED(CONFIG_PROVE_LOCKING)) {
> + fs_reclaim_acquire(GFP_KERNEL);
> + might_lock(&sa_manager->swap_guard);
> + fs_reclaim_release(GFP_KERNEL);
> + }
> +
> shadow = xe_managed_bo_create_pin_map(xe, tile, size,
> XE_BO_FLAG_VRAM_IF_DGFX(tile) |
> XE_BO_FLAG_GGTT |
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-02-04 19:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 16:46 [PATCH v2 0/3] Fix fs_reclaim deadlock caused by CCS save/restore Satyanarayana K V P
2026-02-04 16:46 ` [PATCH v2 1/3] drm/sa: Split drm_suballoc_new() into SA alloc and init helpers Satyanarayana K V P
2026-02-04 19:45 ` Matthew Brost
2026-02-06 12:34 ` Thomas Hellström
2026-02-06 15:27 ` Christian König
2026-02-04 16:46 ` [PATCH v2 2/3] drm/xe/sa: Add lockdep annotations for SA manager swap_guard Satyanarayana K V P
2026-02-04 19:11 ` Matthew Brost [this message]
2026-02-06 16:17 ` Thomas Hellström
2026-02-06 18:28 ` Matthew Brost
2026-02-09 9:09 ` Thomas Hellström
2026-02-09 17:07 ` Matthew Brost
2026-02-04 16:46 ` [PATCH v2 3/3] drm/xe/vf: Fix fs_reclaim warning with CCS save/restore BB allocation Satyanarayana K V P
2026-02-04 19:18 ` Matthew Brost
2026-02-06 12:49 ` Thomas Hellström
2026-02-05 2:49 ` ✓ CI.KUnit: success for Fix fs_reclaim deadlock caused by CCS save/restore (rev2) Patchwork
2026-02-05 3:24 ` ✓ Xe.CI.BAT: " Patchwork
2026-02-05 18:34 ` ✓ Xe.CI.FULL: " 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=aYOZzM1CAC926YLR@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=satyanarayana.k.v.p@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