From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Linux PM <linux-pm@vger.kernel.org>,
Giovanni Gherdovich <ggherdovich@suse.cz>,
Doug Smythies <dsmythies@telus.net>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
Mel Gorman <mgorman@suse.de>,
Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: Re: [RFC/RFT][PATCH v5] cpuidle: New timer events oriented governor for tickless systems
Date: Thu, 15 Nov 2018 03:57:05 +0100 [thread overview]
Message-ID: <13917501.YLdTytznDL@aspire.rjw.lan> (raw)
In-Reply-To: <20181111152034.GC3021@worktop>
On Sunday, November 11, 2018 4:20:34 PM CET Peter Zijlstra wrote:
> On Thu, Nov 08, 2018 at 06:25:07PM +0100, Rafael J. Wysocki wrote:
> > +/*
> > + * The SPIKE value is added to metrics when they grow and the DECAY_SHIFT value
> > + * is used for decreasing metrics on a regular basis.
> > + */
> > +#define SPIKE 1024
> > +#define DECAY_SHIFT 3
>
> > + if (idx_timer >= 0) {
> > + unsigned int hits = cpu_data->states[idx_timer].hits;
> > + unsigned int misses = cpu_data->states[idx_timer].misses;
> > +
> > + hits -= hits >> DECAY_SHIFT;
> > + misses -= misses >> DECAY_SHIFT;
> > +
> > + if (idx_timer > idx_hit) {
> > + misses += SPIKE;
> > + if (idx_hit >= 0)
> > + cpu_data->states[idx_hit].early_hits += SPIKE;
> > + } else {
> > + hits += SPIKE;
> > + }
> > +
> > + cpu_data->states[idx_timer].misses = misses;
> > + cpu_data->states[idx_timer].hits = hits;
> > + }
>
> That's a pulse-density-modulator, with a signal bound of:
>
> 1024 == x/8 -> x := 8192
>
> Anyway; I would suggest s/SPIKE/PULSE/ because of that.
OK
next prev parent reply other threads:[~2018-11-15 2:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 17:25 Rafael J. Wysocki
2018-11-10 19:10 ` Giovanni Gherdovich
2018-11-15 2:56 ` Rafael J. Wysocki
2018-11-11 15:20 ` Peter Zijlstra
2018-11-15 2:57 ` Rafael J. Wysocki [this message]
2018-11-11 15:40 ` Peter Zijlstra
2018-11-15 3:15 ` Rafael J. Wysocki
2018-11-21 23:44 ` Rafael J. Wysocki
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=13917501.YLdTytznDL@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=daniel.lezcano@linaro.org \
--cc=dsmythies@telus.net \
--cc=frederic@kernel.org \
--cc=ggherdovich@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=peterz@infradead.org \
--cc=srinivas.pandruvada@linux.intel.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
all inboxes | Powered by JetHome®