From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: Matthew Brost <matthew.brost@intel.com>,
intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: dakr@kernel.org, pstanner@redhat.com, ltuikov89@gmail.com
Subject: Re: [PATCH v2] drm/sched: Mark scheduler work queues with WQ_MEM_RECLAIM
Date: Thu, 24 Oct 2024 13:44:41 +0200 [thread overview]
Message-ID: <74f7344a-dd8e-4b20-a980-daf9b188df7b@linux.intel.com> (raw)
In-Reply-To: <20241023235917.1836428-1-matthew.brost@intel.com>
On 10/24/2024 1:59 AM, Matthew Brost wrote:
> drm_gpu_scheduler.submit_wq is used to submit jobs, jobs are in the path
> of dma-fences, and dma-fences are in the path of reclaim. Mark scheduler
> work queue with WQ_MEM_RECLAIM to ensure forward progress during
> reclaim; without WQ_MEM_RECLAIM, work queues cannot make forward
> progress during reclaim.
>
> v2:
> - Fixes tags (Philipp)
> - Reword commit message (Philipp)
>
> Cc: Luben Tuikov <ltuikov89@gmail.com>
> Cc: Danilo Krummrich <dakr@kernel.org>
> Cc: Philipp Stanner <pstanner@redhat.com>
> Cc: stable@vger.kernel.org
> Fixes: 34f50cc6441b ("drm/sched: Use drm sched lockdep map for submit_wq")
> Fixes: a6149f039369 ("drm/sched: Convert drm scheduler to use a work queue rather than kthread")
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Acked-by: Nirmoy Das <nirmoy.das@intel.com>
Looks like Xe has a dependency on this now that xe->ordered_wq is allocated with WQ_MEM_RECLAIM flag:
https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-140135v2/bat-lnl-1/igt@xe_exec_fault_mode@twice-invalid-fault.html
> ---
> drivers/gpu/drm/scheduler/sched_main.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> index 540231e6bac6..df0a5abb1400 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -1283,10 +1283,11 @@ int drm_sched_init(struct drm_gpu_scheduler *sched,
> sched->own_submit_wq = false;
> } else {
> #ifdef CONFIG_LOCKDEP
> - sched->submit_wq = alloc_ordered_workqueue_lockdep_map(name, 0,
> + sched->submit_wq = alloc_ordered_workqueue_lockdep_map(name,
> + WQ_MEM_RECLAIM,
> &drm_sched_lockdep_map);
> #else
> - sched->submit_wq = alloc_ordered_workqueue(name, 0);
> + sched->submit_wq = alloc_ordered_workqueue(name, WQ_MEM_RECLAIM);
> #endif
> if (!sched->submit_wq)
> return -ENOMEM;
next prev parent reply other threads:[~2024-10-24 11:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 23:59 [PATCH v2] drm/sched: Mark scheduler work queues with WQ_MEM_RECLAIM Matthew Brost
2024-10-24 11:44 ` Nirmoy Das [this message]
2024-10-24 15:22 ` Matthew Brost
2024-10-24 15:35 ` Philipp Stanner
2024-10-24 15:47 ` Matthew Brost
2024-10-25 10:06 ` Philipp Stanner
2024-10-24 17:35 ` ✓ CI.Patch_applied: success for " Patchwork
2024-10-24 17:35 ` ✓ CI.checkpatch: " Patchwork
2024-10-24 17:36 ` ✓ CI.KUnit: " Patchwork
2024-10-24 17:48 ` ✓ CI.Build: " Patchwork
2024-10-24 17:50 ` ✓ CI.Hooks: " Patchwork
2024-10-24 17:51 ` ✓ CI.checksparse: " Patchwork
2024-10-24 18:19 ` ✓ CI.BAT: " Patchwork
2024-10-25 22:10 ` ✗ 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=74f7344a-dd8e-4b20-a980-daf9b188df7b@linux.intel.com \
--to=nirmoy.das@linux.intel.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=ltuikov89@gmail.com \
--cc=matthew.brost@intel.com \
--cc=pstanner@redhat.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