Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1320858

Re: [PATCH] mm, vmstat: make quiet_vmstat lighter (was: Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable) again and shut down on idle)

From Christoph Lameter <cl@linux.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mm, vmstat: make quiet_vmstat lighter (was: Re: fast path cycle muncher (vmstat: make vmstat_updater deferrable) again and shut down on idle)
Date 2016-01-28 17:50 +0100
Message-ID <qVXVE-69J-19@gated-at.bofh.it> (permalink)
References (6 earlier) <qTN4n-6Dx-31@gated-at.bofh.it> <qU9ey-5ik-15@gated-at.bofh.it> <qVBs7-6oZ-53@gated-at.bofh.it> <qVD0S-7IE-25@gated-at.bofh.it> <qVWGf-5of-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 28 Jan 2016, Michal Hocko wrote:

> +void quiet_vmstat(void)
> +{
> +	if (system_state != SYSTEM_RUNNING)
> +		return;
> +
> +	/*
> +	 * If we are already in hands of the shepherd then there
> +	 * is nothing for us to do here.
> +	 */
> +	if (cpumask_test_and_set_cpu(smp_processor_id(), cpu_stat_off))
> +		return;
> +
> +	if (!need_update(smp_processor_id()))
> +		return;
> +

You can drop the need_update check. refresh_cpu_vm_stats() does the same
checks in a more efficient way. If you keep this the checks will
performed twice.

> +	/*
> +	 * Just refresh counters and do not care about the pending delayed
> +	 * vmstat_update. It doesn't fire that often to matter and canceling
> +	 * it would be too expensive from this path.
> +	 * vmstat_shepherd will take care about that for us.
> +	 */
> +	refresh_cpu_vm_stats(false);
> +}
> +
>

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] mm, vmstat: make quiet_vmstat lighter (was: Re: fast  path cycle muncher (vmstat: make vmstat_updater deferrable) again and shut  down on idle) Michal Hocko <mhocko@kernel.org> - 2016-01-28 16:30 +0100
  Re: [PATCH] mm, vmstat: make quiet_vmstat lighter (was: Re: fast  path cycle muncher (vmstat: make vmstat_updater deferrable) again and shut  down on idle) Christoph Lameter <cl@linux.com> - 2016-01-28 17:50 +0100
    Re: [PATCH] mm, vmstat: make quiet_vmstat lighter (was: Re: fast  path cycle muncher (vmstat: make vmstat_updater deferrable) again and shut  down on idle) Michal Hocko <mhocko@kernel.org> - 2016-01-28 18:00 +0100
      Re: [PATCH] mm, vmstat: make quiet_vmstat lighter (was: Re: fast  path cycle muncher (vmstat: make vmstat_updater deferrable) again and shut  down on idle) Christoph Lameter <cl@linux.com> - 2016-01-28 18:10 +0100

csiph-web