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: <ZtICz0_-Mc4-7JKX@slm.duckdns.org>
Date: Fri, 30 Aug 2024 07:35:11 -1000
From: Tejun Heo <tj@...nel.org>
To: David Vernet <void@...ifault.com>
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:22:07PM -0500, David Vernet wrote:
> 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().

Yes, this actually happens as a part of the scx_bpf_dispatch_from_dsq()
patchset - 0004-sched_ext-Make-dispatch_to_local_dsq-return-void.patch. I'll
update the title / description of that patchset.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ