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: <20250324115955.GF14944@noisy.programming.kicks-ass.net>
Date: Mon, 24 Mar 2025 12:59:55 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: linux-kernel@...r.kernel.org
Cc: linux-tip-commits@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Shrikanth Hegde <sshegde@...ux.ibm.com>,
	Juri Lelli <juri.lelli@...hat.com>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Valentin Schneider <vschneid@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>, x86@...nel.org
Subject: Re: [tip: sched/core] sched/debug: Change SCHED_WARN_ON() to
 WARN_ON_ONCE()

On Thu, Mar 20, 2025 at 09:00:05AM -0000, tip-bot2 for Ingo Molnar wrote:
> The following commit has been merged into the sched/core branch of tip:
> 
> Commit-ID:     f7d2728cc032a23fccb5ecde69793a38eb30ba5c
> Gitweb:        https://git.kernel.org/tip/f7d2728cc032a23fccb5ecde69793a38eb30ba5c
> Author:        Ingo Molnar <mingo@...nel.org>
> AuthorDate:    Mon, 17 Mar 2025 11:42:52 +01:00
> Committer:     Ingo Molnar <mingo@...nel.org>
> CommitterDate: Wed, 19 Mar 2025 22:20:53 +01:00
> 
> sched/debug: Change SCHED_WARN_ON() to WARN_ON_ONCE()
> 
> The scheduler has this special SCHED_WARN() facility that
> depends on CONFIG_SCHED_DEBUG.
> 
> Since CONFIG_SCHED_DEBUG is getting removed, convert
> SCHED_WARN() to WARN_ON_ONCE().
> 
> Note that the warning output isn't 100% equivalent:
> 
>    #define SCHED_WARN_ON(x)      WARN_ONCE(x, #x)
> 
> Because SCHED_WARN_ON() would output the 'x' condition
> as well, while WARN_ONCE() will only show a backtrace.
> 
> Hopefully these are rare enough to not really matter.
> 
> If it does, we should probably introduce a new WARN_ON()
> variant that outputs the condition in stringified form,
> or improve WARN_ON() itself.

So those strings really were useful, trouble is WARN_ONCE() generates
utter crap code compared to WARN_ON_ONCE(), but since SCHED_DEBUG that
doesn't really matter.

Also, last time I measured, there was a measurable performance
difference between SCHED_DEBUG=n and SCHED_DEBUG=y.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ