Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1320868
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| 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 18:00 +0100 |
| Message-ID | <qVY5l-6dI-29@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <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> <qVXVE-69J-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu 28-01-16 10:40:10, Christoph Lameter wrote:
> 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.
refresh_cpu_vm_stats does this_cpu_xchg for each counter. Is it really
more effective than memchr_inv?
--
Michal Hocko
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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