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]
Date:   Thu, 20 Apr 2023 21:56:11 +0200
From:   Andrea Righi <andrea.righi@...onical.com>
To:     Tejun Heo <tj@...nel.org>
Cc:     torvalds@...ux-foundation.org, mingo@...hat.com,
        peterz@...radead.org, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, dietmar.eggemann@....com,
        rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
        bristot@...hat.com, vschneid@...hat.com, ast@...nel.org,
        daniel@...earbox.net, andrii@...nel.org, martin.lau@...nel.org,
        joshdon@...gle.com, brho@...gle.com, pjt@...gle.com,
        derkling@...gle.com, haoluo@...gle.com, dvernet@...a.com,
        dschatzberg@...a.com, dskarlat@...cmu.edu, riel@...riel.com,
        linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
        kernel-team@...a.com
Subject: Re: [PATCH 28/32] sched_ext: Implement core-sched support

On Fri, Mar 17, 2023 at 11:33:29AM -1000, Tejun Heo wrote:
...
>  
> +static int balance_scx(struct rq *rq, struct task_struct *prev,
> +		       struct rq_flags *rf)
> +{
> +	int ret;
> +
> +	ret = balance_one(rq, prev, rf, true);
> +
> +	/*
> +	 * When core-sched is enabled, this ops.balance() call will be followed
> +	 * by put_prev_scx() and pick_task_scx() on this CPU and pick_task_scx()
> +	 * on the SMT siblings. Balance the siblings too.
> +	 */
> +	if (sched_core_enabled(rq)) {
> +		const struct cpumask *smt_mask = cpu_smt_mask(cpu_of(rq));

balance_scx() should be a no-op if CONFIG_SCHED_SMT is undefined or we
may get a build error here.

For example with a minimal ppc64le config (and CONFIG_SCHED_SMT off) I
can reproduce this:

 ./arch/powerpc/include/asm/smp.h:139:22: error: implicit declaration of function 'cpu_smt_mask'; did you mean 'cpu_cpu_mask'? [-Werror=implicit-function-declaration]

So maybe have something like this (or similar):

#ifdef CONFIG_SCHED_SMT
...
#else
static inline int balance_scx(struct rq *rq, struct task_struct *prev,
		       struct rq_flags *rf)
{
	return 0
}
#endif

Thanks,
-Andrea

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ