lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 28 Jan 2016 17:53:27 +0100
From:	Michal Hocko <mhocko@...nel.org>
To:	Christoph Lameter <cl@...ux.com>
Cc:	Mike Galbraith <umgwanakikbuti@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>
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)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ