mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	ShuoX Liu <shuox.liu@intel.com>,
	mjg59@srcf.ucam.org, Boris Ostrovsky <boris.ostrovsky@amd.com>,
	Len Brown <len.brown@intel.com>,
	Deepthi Dharwar <deepthi@linux.vnet.ibm.com>,
	Arjan van de Ven <arjan@linux.intel.com>
Subject: [RFC][PATCH 0/3] c-state governor changes
Date: Thu, 23 Aug 2012 17:11:04 -0400	[thread overview]
Message-ID: <20120823171104.38574add@cuia.bos.redhat.com> (raw)

It turns out that the c-state governor can be a performance issue
with certain workloads.  The problem workloads seem to involve
mixed length pauses between activities, eg. an occasional long
idle period, with a burst of activity involving short idle periods.

One example of this would be a system with a web server and a
database, where the web server gets a request "every once in a
while" (compared to c-state timescales), and then quickly bounces
stuff back and forth between itself and the database, before
sending anything back to the http client.

On the face of it, the use of average sleep times does not make
a whole lot of sense, when we can have sleep patterns like this:

	150 200 50 1000 30 180 10000 220

The bulk of the sleep time is spent in the one long sleep, but
planning for a 1500us sleep time (around the average) is pretty
much guaranteed to be wrong.

Instead, it might make more sense to plan for a sleep time just
under 200us. We may still need some kind of demotion scheme to
kick us into a deeper c-state when a truly long sleep period
comes along...

This patch set is mostly there to kick off a discussion in time
for Kernel Summit.  When running it on my laptop, with acpi_idle,
I see a promising change in powertop.

Time spent in C3 has gone down from 99% of CPU time, to 97-98% CPU 
time, but the average residency time in C3 has gone up.  The other
1-2% of CPU time is spent in C2 instead.

I have not run any meaningful benchmarks against this code yet.
It has had a benchmark run where the workload presents regular
sleep intervals, and performs identically to the old code.

Please let me know what you think :)

-- 
All Rights Reversed

             reply	other threads:[~2012-08-23 21:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23 21:11 Rik van Riel [this message]
2012-08-23 21:11 ` [RFC][PATCH 1/3] cpuidle: fix underflow in stddev calculation Rik van Riel
2012-08-23 21:13 ` [RFC][PATCH 2/3] cpuidle: find a typical recent sleep interval Rik van Riel
2012-08-23 21:13 ` [RFC][PATCH 3/3] cpuidle: count double the exit latency Rik van Riel
2012-08-23 21:54 ` [RFC][PATCH 0/3] c-state governor changes Arjan van de Ven
2012-08-24  2:57   ` Rik van Riel
2012-08-24  4:11   ` Matthew Garrett
2012-08-23 21:54 ` Arjan van de Ven

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=20120823171104.38574add@cuia.bos.redhat.com \
    --to=riel@redhat.com \
    --cc=arjan@linux.intel.com \
    --cc=boris.ostrovsky@amd.com \
    --cc=deepthi@linux.vnet.ibm.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=rjw@sisk.pl \
    --cc=shuox.liu@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

Powered by JetHome