From: Christoph Lameter <cl@linux.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
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>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
hughd@google.com, viresh.kumar@linaro.org
Subject: Re: vmstat: On demand vmstat workers V4
Date: Fri, 9 May 2014 09:53:45 -0500 (CDT) [thread overview]
Message-ID: <alpine.DEB.2.10.1405090949170.11318@gentwo.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1405090003120.6261@ionos.tec.linutronix.de>
On Fri, 9 May 2014, Thomas Gleixner wrote:
> > > +/*
> > > + * Return a cpu number that may be used to run housekeeping
> > > + * tasks. This is usually the timekeeping cpu unless that
> > > + * is not available. Then we simply fall back to the current
> > > + * cpu.
> > > + */
> >
> > This comment is unusably vague. What the heck is a "housekeeping
> > task"? Why would anyone call this and what is special about the CPU
> > number it returns?
I just need a processor that keeps watch over the vmstat workers in the
system. The processor that does timekeeping is an obvious choice. I am
open to other suggestions.
Typically our system have processors that are used for OS processing and
processor that are focused on app services. Those need to be as
undisturbed as possible.
> >
> >
> > > +int tick_get_housekeeping_cpu(void)
> > > +{
> > > + int cpu;
> > > +
> > > + if (system_state < SYSTEM_RUNNING || tick_do_timer_cpu < 0)
> > > + cpu = raw_smp_processor_id();
>
> That's completely bogus. The system state check is pointless and
> tick_do_timer_cpu even more so because if you call that code from a
> worker thread tick_do_timer_cpu should be assigned to some cpu.
>
> Aside of that I'm having a hard time to understand why this stuff
> wants to move around at all.
>
> I think we agreed long ago, that for the whole HPC FULL_NOHZ stuff you
> have to sacrify at least one CPU for housekeeping purposes of all
> kinds, timekeeping, statistics and whatever.
Ok how do I figure out that cpu? I'd rather have a specific cpu that
never changes.
> So if you have a housekeeper, then it makes absolutely no sense at all
> to move it around in circles.
>
> Can you please enlighten me why we need this at all?
The vmstat kworker thread checks every 2 seconds if there are vmstat
updates that need to be folded into the global statistics. This is not
necessary if the application is running and no OS services are being used.
Thus we could switch off vmstat updates and avoid taking the processor
away from the application.
This has also been noted by multiple other people at was brought up at the
mm summit by others who noted the same issues.
--
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-05-09 14:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-08 15:35 Christoph Lameter
2014-05-08 21:29 ` Andrew Morton
2014-05-08 22:18 ` Thomas Gleixner
2014-05-09 14:53 ` Christoph Lameter [this message]
2014-05-09 15:05 ` Thomas Gleixner
2014-05-09 15:28 ` Christoph Lameter
2014-05-09 22:57 ` Thomas Gleixner
2014-05-09 23:47 ` Paul E. McKenney
2014-05-10 0:48 ` Frederic Weisbecker
2014-05-10 12:31 ` Thomas Gleixner
2014-05-10 13:14 ` Frederic Weisbecker
2014-05-11 1:17 ` Paul E. McKenney
2014-05-11 1:30 ` Frederic Weisbecker
2014-05-11 1:38 ` Paul E. McKenney
2014-05-10 12:20 ` Thomas Gleixner
2014-05-11 1:12 ` Paul E. McKenney
2014-05-10 0:34 ` Frederic Weisbecker
2014-05-10 12:22 ` Thomas Gleixner
2014-05-11 1:14 ` Paul E. McKenney
2014-05-12 16:25 ` Christoph Lameter
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.10.1405090949170.11318@gentwo.org \
--to=cl@linux.com \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=gilad@benyossef.com \
--cc=hakanakkan@gmail.com \
--cc=hughd@google.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=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=vapier@gentoo.org \
--cc=viresh.kumar@linaro.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