From: Andrew Morton <akpm@linux-foundation.org>
To: Christoph Lameter <cl@linux.com>
Cc: Michal Hocko <mhocko@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
hannes@cmpxchg.org, penguin-kernel@I-love.SAKURA.ne.jp
Subject: Re: vmstat: make vmstat_updater deferrable again and shut down on idle
Date: Thu, 10 Dec 2015 15:31:18 -0800 [thread overview]
Message-ID: <20151210153118.4f39d6a4f04c96189ce015c9@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.20.1512101441140.19122@east.gentwo.org>
On Thu, 10 Dec 2015 14:45:02 -0600 (CST) Christoph Lameter <cl@linux.com> wrote:
> Currently the vmstat updater is not deferrable as a result of commit
> ba4877b9ca51f80b5d30f304a46762f0509e1635. This in turn can cause multiple
> interruptions of the applications because the vmstat updater may run at
> different times than tick processing. No good.
>
> Make vmstate_update deferrable again and provide a function that
> folds the differentials when the processor is going to idle mode thus
> addressing the issue of the above commit in a clean way.
>
> Note that the shepherd thread will continue scanning the differentials
> from another processor and will reenable the vmstat workers if it
> detects any changes.
>
> Fixes: ba4877b9ca51f80b5d30f304a46762f0509e1635 (do not use deferrable delay)
> Signed-off-by: Christoph Lameter <cl@linux.com>
>
> ...
>
> /*
> + * Switch off vmstat processing and then fold all the remaining differentials
> + * until the diffs stay at zero. The function is used by NOHZ and can only be
> + * invoked when tick processing is not active.
> + */
> +void quiet_vmstat(void)
> +{
> + do {
> + if (!cpumask_test_and_set_cpu(smp_processor_id(), cpu_stat_off))
> + cancel_delayed_work(this_cpu_ptr(&vmstat_work));
> +
> + } while (refresh_cpu_vm_stats(false));
> +}
How do we know this will terminate in a reasonable amount of time if
other CPUs are pounding away?
--
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:[~2015-12-10 23:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 20:45 Christoph Lameter
2015-12-10 23:31 ` Andrew Morton [this message]
2015-12-11 1:41 ` Christoph Lameter
2015-12-14 18:32 ` Christoph Lameter
2016-01-20 13:52 ` Shiraz Hashim
2016-01-20 15:12 ` Christoph Lameter
2016-01-21 6:24 ` Shiraz Hashim
2016-01-21 15:41 ` 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=20151210153118.4f39d6a4f04c96189ce015c9@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/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