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: <20240802173706.GO39708@noisy.programming.kicks-ass.net>
Date: Fri, 2 Aug 2024 19:37:06 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Tejun Heo <tj@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, David Vernet <void@...ifault.com>,
	Ingo Molnar <mingo@...hat.com>, Alexei Starovoitov <ast@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [GIT PULL] sched_ext: Initial pull request for v6.11

On Fri, Aug 02, 2024 at 06:09:03AM -1000, Tejun Heo wrote:
> Hello,
> 
> On Fri, Aug 02, 2024 at 01:10:18PM +0200, Peter Zijlstra wrote:
> > On Tue, Jul 30, 2024 at 03:36:27PM -1000, Tejun Heo wrote:
> ...
> > > Maybe, but at the same time, it's also just some isolated cruft that enables
> > > UP support, so both sides of the scale seem similarly light-weight? I lean
> > > towards "why not support it?" but don't feel particularly strongly about it.
> > 
> > So you're basically looking for something like this?
> > 
> > diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> > index a9f655025607..69ec02a28117 100644
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -5772,7 +5772,6 @@ static inline void schedule_debug(struct task_struct *prev, bool preempt)
> >  static void put_prev_task_balance(struct rq *rq, struct task_struct *prev,
> >  				  struct rq_flags *rf)
> >  {
> > -#ifdef CONFIG_SMP
> >  	const struct sched_class *class;
> >  	/*
> >  	 * We must do the balancing pass before put_prev_task(), such
> > @@ -5783,10 +5782,9 @@ static void put_prev_task_balance(struct rq *rq, struct task_struct *prev,
> >  	 * a runnable task of @class priority or higher.
> >  	 */
> >  	for_class_range(class, prev->sched_class, &idle_sched_class) {
> > -		if (class->balance(rq, prev, rf))
> > +		if (class->balance && class->balance(rq, prev, rf))
> >  			break;
> >  	}
> > -#endif
> >  
> >  	put_prev_task(rq, prev);
> >  }
> > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> > index 4c36cc680361..40f3dc436f4f 100644
> > --- a/kernel/sched/sched.h
> > +++ b/kernel/sched/sched.h
> > @@ -2296,8 +2296,8 @@ struct sched_class {
> >  	void (*put_prev_task)(struct rq *rq, struct task_struct *p);
> >  	void (*set_next_task)(struct rq *rq, struct task_struct *p, bool first);
> >  
> > -#ifdef CONFIG_SMP
> >  	int (*balance)(struct rq *rq, struct task_struct *prev, struct rq_flags *rf);
> > +#ifdef CONFIG_SMP
> >  	int  (*select_task_rq)(struct task_struct *p, int task_cpu, int flags);
> >  
> >  	struct task_struct * (*pick_task)(struct rq *rq);
> 
> Yes, exactly. This is how it was implemented in the first RFC patchset. If
> you're okay with the above, I'd love to go back to it.

Yeah, I don't find I can make myself care for SMP=n much. So lets just
do that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ