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: <20240624090431.GG31592@noisy.programming.kicks-ass.net>
Date: Mon, 24 Jun 2024 11:04:31 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Tejun Heo <tj@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>, mingo@...hat.com,
	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, changwoo@...lia.com, himadrics@...ia.fr,
	memxor@...il.com, andrea.righi@...onical.com,
	joel@...lfernandes.org, linux-kernel@...r.kernel.org,
	bpf@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH sched_ext/for-6.11] sched, sched_ext: Replace
 scx_next_task_picked() with sched_class->switch_class()

On Fri, Jun 21, 2024 at 09:46:56AM -1000, Tejun Heo wrote:
> Hello,
> 
> On Thu, Jun 20, 2024 at 03:42:48PM -0700, Linus Torvalds wrote:
> ...
> > Btw, indirect calls are now expensive enough that when you have only a
> > handful of choices, instead of a variable
> > 
> >         class->some_callback(some_arguments);
> > 
> > you might literally be better off with a macro that does
> > 
> >        #define call_sched_fn(class, name, arg...) switch (class) { \
> >         case &fair_name_class: fair_name_class.name(arg); break; \
> >         ... unroll them all here..
> > 
> > which then just generates a (very small) tree of if-statements.
> > 
> > Again, this is entirely too ugly to do unless people *really* care.
> > But for situations where you have a small handful of cases known at
> > compile-time, it's not out of the question, and it probably does
> > generate better code.
> 
> I'll update the patch description to point to the previous message just in
> case and apply it to sched_ext/for-6.11.

Can you please back merge and keep it a sane series? I'm going to have
to review it (even though I still very strongly disagree with the whole
thing) and there really is nothing worse than a series that introduces
things only to remove/change them again later.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ