From: Peter Zijlstra <peterz@infradead.org>
To: Matthew Leach <matthew.leach@arm.com>
Cc: Paul Turner <pjt@google.com>,
linux-kernel@vger.kernel.org,
Dietmar Eggemann <Dietmar.Eggemann@arm.com>
Subject: Re: A question regarding TG load tracking functions in fair.c
Date: Fri, 28 Feb 2014 13:29:22 +0100 [thread overview]
Message-ID: <20140228122922.GG9987@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <87d2i7mojg.fsf@e106496-lin.cambridge.arm.com>
On Fri, Feb 28, 2014 at 12:04:19PM +0000, Matthew Leach wrote:
> Hi Paul,
>
> I have a question regarding two lines of code in the functions
> __update_cfs_rq_tg_load_contrib and __update_tg_runnable_avg. AFAICS
> these functions update a load-tracking signal for the local RQ and an
> aggregated signal in the TG for all RQs that belong to this TG. The
> update is surrounded by conditions:
>
> if (abs(contrib) > cfs_rq->tg_runnable_contrib / 64) {
>
> for __update_tg_runnable_avg and
>
> if (force_update || abs(tg_contrib) > cfs_rq->tg_load_contrib / 8) {
>
> for __update_cfs_rq_tg_load_contrib. Is this an optimisation to prevent
> the signals being updated for small variations? Also, could you please
> shed some light on the specific numbers used?
Yes, its an optimization; updating global state is expensive. I'll let
Paul explain the specific numbers.
prev parent reply other threads:[~2014-02-28 12:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 12:04 A question regarding TG load tracking functions in fair.c Matthew Leach
2014-02-28 12:29 ` Peter Zijlstra [this message]
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=20140228122922.GG9987@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=Dietmar.Eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.leach@arm.com \
--cc=pjt@google.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