Re: [patch 2/2] vmstat: Get rid of the ugly cpu_stat_off variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 23-02-16 16:23:45, Andrew Morton wrote:
> On Mon, 22 Feb 2016 12:10:42 -0600 Christoph Lameter <cl@xxxxxxxxx> wrote:
> 
> > The cpu_stat_off variable is unecessary since we can check if
> > a workqueue request is pending otherwise. This makes it pretty
> > easy for the shepherd to ensure that the proper things happen.
> > 
> > Removing the state also removes all races related to it.
> > Should a workqueue not be scheduled as needed for vmstat_update
> > then the shepherd will notice and schedule it as needed.
> > Should a workqueue be unecessarily scheduled then the vmstat
> > updater will disable it.
> > 
> > Thus vmstat_idle can also be simplified.
> 
> I'm getting rather a lot of rejects from this one.
> 
> >  
> > @@ -1436,11 +1426,8 @@ void quiet_vmstat(void)
> >  	if (system_state != SYSTEM_RUNNING)
> >  		return;
> >  
> > -	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));
> > +	refresh_cpu_vm_stats(false);
> > +	cancel_delayed_work(this_cpu_ptr(&vmstat_work));
> >  }
> 
> I can't find a quiet_vmstat() which looks like this.  What tree are you
> patching?

This seems to be pre f01f17d3705b ("mm, vmstat: make quiet_vmstat
lighter")

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]