From: Peter Zijlstra <peterz@infradead.org>
To: Hugh Dickins <hughd@google.com>
Cc: Chintan Pandya <cpandya@codeaurora.org>,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
John Stultz <john.stultz@linaro.org>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH v4 2/2] ksm: provide support to use deferrable timers for scanner thread
Date: Wed, 3 Sep 2014 11:58:15 +0200 [thread overview]
Message-ID: <20140903095815.GK4783@worktop.ger.corp.intel.com> (raw)
In-Reply-To: <alpine.LSU.2.11.1408272258050.10518@eggly.anvils>
On Wed, Aug 27, 2014 at 11:02:20PM -0700, Hugh Dickins wrote:
> Sorry for holding you up, I'm slow. and needed to think about this more,
>
> On Wed, 20 Aug 2014, Chintan Pandya wrote:
>
> > KSM thread to scan pages is scheduled on definite timeout. That wakes up
> > CPU from idle state and hence may affect the power consumption. Provide
> > an optional support to use deferrable timer which suites low-power
> > use-cases.
> >
> > Typically, on our setup we observed, 10% less power consumption with some
> > use-cases in which CPU goes to power collapse frequently. For example,
> > playing audio on Soc which has HW based Audio encoder/decoder, CPU
> > remains idle for longer duration of time. This idle state will save
> > significant CPU power consumption if KSM don't wakes them up
> > periodically.
> >
> > Note that, deferrable timers won't be deferred if any CPU is active and
> > not in IDLE state.
> >
> > By default, deferrable timers is enabled. To disable deferrable timers,
> > $ echo 0 > /sys/kernel/mm/ksm/deferrable_timer
>
> I have now experimented. And, much as I wanted to eliminate the
> tunable, and just have deferrable timers on, I have come right back
> to your original position.
>
> I was impressed by how quiet ksmd goes when there's nothing much
> happening on the machine; but equally, disappointed in how slow
> it then is to fulfil the outstanding merge work. I agree with your
> original assessment, that not everybody will want deferrable timer,
> the way it is working at present.
>
> I expect that can be fixed, partly by doing more work on wakeup from
> a deferred timer, according to how long it has been deferred; and
> partly by not deferring on idle until two passes of the list have been
> completed. But that's easier said than done, and might turn out to
So why not have the timer cancel itself when there is no more work to do
and start itself up again when there's work added?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-09-03 9:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 12:10 [PATCH v4 1/2] timer: provide an api for deferrable timeout Chintan Pandya
2014-08-20 12:10 ` [PATCH v4 2/2] ksm: provide support to use deferrable timers for scanner thread Chintan Pandya
2014-08-28 6:02 ` Hugh Dickins
2014-09-03 9:58 ` Peter Zijlstra [this message]
2014-09-03 10:32 ` Thomas Gleixner
2014-09-08 8:25 ` Hugh Dickins
2014-09-08 9:39 ` Peter Zijlstra
2014-09-09 14:52 ` Chintan Pandya
2014-09-09 20:37 ` Hugh Dickins
2014-09-09 20:14 ` Hugh Dickins
2014-09-10 8:10 ` Peter Zijlstra
2014-09-11 12:27 ` Hugh Dickins
2014-09-10 8:27 ` Peter Zijlstra
2014-09-11 12:59 ` Hugh Dickins
2014-09-11 8:01 ` Chintan Pandya
2014-09-11 13:25 ` Hugh Dickins
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=20140903095815.GK4783@worktop.ger.corp.intel.com \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=cpandya@codeaurora.org \
--cc=hughd@google.com \
--cc=john.stultz@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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