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:   Fri, 17 Jun 2022 12:10:05 +0100
From:   Valentin Schneider <vschneid@...hat.com>
To:     Brian Norris <briannorris@...omium.org>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>
Cc:     Ben Segall <bsegall@...gle.com>, linux-kernel@...r.kernel.org,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Mel Gorman <mgorman@...e.de>,
        Steven Rostedt <rostedt@...dmis.org>,
        Brian Norris <briannorris@...omium.org>
Subject: Re: [PATCH] sched: Drop outdated compile-optimization comment

On 15/06/22 15:27, Brian Norris wrote:
> Looks like this exists from way back in 2011 (commit 095c0aa83e52
> ("sched: adjust scheduler cpu power for stolen time")), when there was a
> little more aggressive use of #if around these variables. That #if is
> gone, and the comment just confuses the reader now. (For one, we don't
> call sched_rt_avg_update() directly any more either.)
>

So that sched_rt_avg_update() became update_irq_load_avg() with

  91c27493e78d ("sched/irq: Add IRQ utilization tracking")

and then the #ifdef configs were reorganized in

  11d4afd4ff66 ("sched/pelt: Fix warning and clean up IRQ PELT config")

I'd argue that comment is still somewhat relevant but it applies to that
block:

#ifdef CONFIG_HAVE_SCHED_AVG_IRQ
	if ((irq_delta + steal) && sched_feat(NONTASK_CAPACITY))
		update_irq_load_avg(rq, irq_delta + steal);
#endif

if !CONFIG_HAVE_SCHED_AVG_IRQ then yes you'd expect the compiler to not
even add a call to update_irq_load_avg() in there, but compilers aren't the
most trustworthy things :-) If you feel like it, you could play with
GCC/clang and see what they emit if you remove those #ifdefs.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ