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: <ZEKeO7CI_ESpZS2H@slm.duckdns.org>
Date:   Fri, 21 Apr 2023 04:31:23 -1000
From:   Tejun Heo <tj@...nel.org>
To:     Andrea Righi <andrea.righi@...onical.com>
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

Hello, Andrea.

On Thu, Apr 20, 2023 at 09:56:11PM +0200, Andrea Righi wrote:
> 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

Will fix.

Thank you.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ