From: Thomas Gleixner <tglx@linutronix.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@linux.com>,
Gilad Ben-Yossef <gilad@benyossef.com>, Tejun Heo <tj@kernel.org>,
John Stultz <johnstul@us.ibm.com>,
Mike Frysinger <vapier@gentoo.org>,
Minchan Kim <minchan.kim@gmail.com>,
Hakan Akkan <hakanakkan@gmail.com>,
Max Krasnyansky <maxk@qualcomm.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Linux-MM <linux-mm@kvack.org>
Subject: Re: RFC vmstat: On demand vmstat threads
Date: Thu, 19 Sep 2013 00:57:20 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.02.1309190033440.4089@ionos.tec.linutronix.de> (raw)
In-Reply-To: <20130918150659.5091a2c3ca94b99304427ec5@linux-foundation.org>
On Wed, 18 Sep 2013, Andrew Morton wrote:
> On Tue, 10 Sep 2013 21:13:34 +0000 Christoph Lameter <cl@linux.com> wrote:
> > + cpumask_copy(monitored_cpus, cpu_online_mask);
> > + cpumask_clear_cpu(tick_do_timer_cpu, monitored_cpus);
>
> What on earth are we using tick_do_timer_cpu for anyway?
> tick_do_timer_cpu is cheerfully undocumented, as is this code's use of
> it.
tick_do_timer_cpu is a timer core internal variable, which holds the
CPU NR which is responsible for calling do_timer(), i.e. the
timekeeping stuff. This variable has two functions:
1) Prevent a thundering herd issue of a gazillion of CPUs trying to
grab the timekeeping lock all at once. Only the CPU which is
assigned to do the update is handling it.
2) Hand off the duty in the NOHZ idle case by setting the value to
TICK_DO_TIMER_NONE, i.e. a non existing CPU. So the next cpu which
looks at it will take over and keep the time keeping alive.
The hand over procedure also covers cpu hotplug.
(Ab)Using it for anything else outside the timers core code is just
broken.
It's working for Christophs use case as his setup will not change the
assignment away from the boot cpu, but that's really not a brilliant
design to start with.
The vmstat accounting is not the only thing which we want to delegate
to dedicated core(s) for the full NOHZ mode.
So instead of playing broken games with explicitly not exposed core
code variables, we should implement a core code facility which is
aware of the NOHZ details and provides a sane way to delegate stuff to
a certain subset of CPUs.
Thanks,
tglx
next prev parent reply other threads:[~2013-09-18 22:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-04 16:48 Christoph Lameter
2013-09-10 6:15 ` Gilad Ben-Yossef
2013-09-10 21:13 ` Christoph Lameter
2013-09-18 22:06 ` Andrew Morton
2013-09-18 22:57 ` Thomas Gleixner [this message]
2013-09-19 18:58 ` Christoph Lameter
2013-09-20 10:41 ` Thomas Gleixner
2013-09-20 16:42 ` Frederic Weisbecker
2013-09-20 21:03 ` Thomas Gleixner
2013-09-23 15:10 ` Christoph Lameter
2013-09-23 15:03 ` Christoph Lameter
2013-09-19 16:54 ` Gilad Ben-Yossef
2013-09-19 21:42 ` Gilad Ben-Yossef
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=alpine.DEB.2.02.1309190033440.4089@ionos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=fweisbec@gmail.com \
--cc=gilad@benyossef.com \
--cc=hakanakkan@gmail.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maxk@qualcomm.com \
--cc=minchan.kim@gmail.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=tj@kernel.org \
--cc=vapier@gentoo.org \
/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®