lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240830172207.GC5055@maniforge>
Date: Fri, 30 Aug 2024 12:22:07 -0500
From: David Vernet <void@...ifault.com>
To: Tejun Heo <tj@...nel.org>
Cc: linux-kernel@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>,
	kernel-team@...a.com
Subject: Re: [PATCH 1/2 sched_ext/for-6.12] sched_ext: Use
 task_can_run_on_remote_rq() test in dispatch_to_local_dsq()

On Fri, Aug 30, 2024 at 12:51:40AM -1000, Tejun Heo wrote:
> When deciding whether a task can be migrated to a CPU,
> dispatch_to_local_dsq() was open-coding p->cpus_allowed and scx_rq_online()
> tests instead of using task_can_run_on_remote_rq(). This had two problems.
> 
> - It was missing is_migration_disabled() check and thus could try to migrate
>   a task which shouldn't leading to assertion and scheduling failures.
> 
> - It was testing p->cpus_ptr directly instead of using task_allowed_on_cpu()
>   and thus failed to consider ISA compatibility.
> 
> Update dispatch_to_local_dsq() to use task_can_run_on_remote_rq():
> 
> - Move scx_ops_error() triggering into task_can_run_on_remote_rq().
> 
> - When migration isn't allowed, fall back to the global DSQ instead of the
>   source DSQ by returning DTL_INVALID. This is both simpler and an overall
>   better behavior.

Should we also be falling back to the global DSQ if we fail the check
when called from process_ddsp_deferred_locals()?  This patch doesn't
change anything given that we'd have the same behavior before if we
failed the cpumask_test_cpu(cpu_of(dst_rq), p->cpus_ptr) check, but I'm
not following why we would need to fall back to global DSQ in
finish_dispatch(), but not in process_ddsp_deferred_locals().

This doesn't affect the rest of the cleanup + fix, which LGTM:

Acked-by: David Vernet <void@...ifault.com>

Thanks,
David

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ