[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Zw2oSWEJ8LJG6454@slm.duckdns.org>
Date: Mon, 14 Oct 2024 13:24:57 -1000
From: Tejun Heo <tj@...nel.org>
To: David Vernet <void@...ifault.com>
Cc: linux-kernel@...r.kernel.org, sched-ext@...a.com, kernel-team@...a.com,
Waiman Long <llong@...hat.com>
Subject: Re: [PATCH for-6.12-fixes] sched_ext: Remove unnecessary cpu_relax()
On Mon, Oct 14, 2024 at 12:58:30PM -0500, David Vernet wrote:
> As described in commit b07996c7abac ("sched_ext: Don't hold
> scx_tasks_lock for too long"), we're doing a cond_resched() every 32
> calls to scx_task_iter_next() to avoid RCU and other stalls. That commit
> also added a cpu_relax() to the codepath where we drop and reacquire the
> lock, but as Waiman described in [0], cpu_relax() should only be
> necessary in busy loops to avoid pounding on a cacheline (or to allow a
> hypertwin to more fully utilize a core).
>
> Let's remove the unnecessary cpu_relax().
>
> [0]: https://lore.kernel.org/all/35b3889b-904a-4d26-981f-c8aa1557a7c7@redhat.com/
>
> Cc: Waiman Long <llong@...hat.com>
> Signed-off-by: David Vernet <void@...ifault.com>
Applied to sched_ext/for-6.12-fixes.
Thanks.
--
tejun
Powered by blists - more mailing lists