From: Peter Zijlstra <peterz@infradead.org>
To: Valentin Schneider <vschneid@redhat.com>
Cc: Brian Norris <briannorris@chromium.org>,
Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Ben Segall <bsegall@google.com>,
linux-kernel@vger.kernel.org,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Mel Gorman <mgorman@suse.de>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] sched: Drop outdated compile-optimization comment
Date: Fri, 17 Jun 2022 15:31:23 +0200 [thread overview]
Message-ID: <YqyCK+31YgOlBY9U@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <xhsmhk09f7dgy.mognet@vschneid.remote.csb>
On Fri, Jun 17, 2022 at 12:10:05PM +0100, Valentin Schneider wrote:
> 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.
Mostly I think it was the jump_label stuff getting them confused. I
suspect that's fixed in todays compilers tho, so yeah, it might be good
to get rid of it.
next prev parent reply other threads:[~2022-06-17 13:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 22:27 [PATCH] sched: Drop outdated compile-optimization comment Brian Norris
2022-06-17 11:10 ` Valentin Schneider
2022-06-17 13:31 ` Peter Zijlstra [this message]
2022-06-17 20:33 ` Brian Norris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YqyCK+31YgOlBY9U@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=briannorris@chromium.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox