[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZruvZ4jVMQ-5hfjk@slm.duckdns.org>
Date: Tue, 13 Aug 2024 09:09:27 -1000
From: Tejun Heo <tj@...nel.org>
To: David Vernet <void@...ifault.com>
Cc: linux-kernel@...r.kernel.org, kernel-team@...a.com,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH RESEND sched_ext/for-6.12] sched_ext: Don't use double
locking to migrate tasks across CPUs
On Wed, Aug 07, 2024 at 01:15:19PM -1000, Tejun Heo wrote:
> consume_remote_task() and dispatch_to_local_dsq() use
> move_task_to_local_dsq() to migrate the task to the target CPU. Currently,
> move_task_to_local_dsq() expects the caller to lock both the source and
> destination rq's. While this may save a few lock operations while the rq's
> are not contended, under contention, the double locking can exacerbate the
> situation significantly (refer to the linked message below).
>
> Update the migration path so that double locking is not used.
> move_task_to_local_dsq() now expects the caller to be locking the source rq,
> drops it and then acquires the destination rq lock. Code is simpler this way
> and, on a 2-way NUMA machine w/ Xeon Gold 6138, 'hackbench 100 thread 5000`
> shows ~3% improvement with scx_simple.
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Suggested-by: Peter Zijlstra <peterz@...radead.org>
> Link: http://lkml.kernel.org/r/20240806082716.GP37996@noisy.programming.kicks-ass.net
Applied to sched_ext/for-6.12.
Thanks.
--
tejun
Powered by blists - more mailing lists