From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753962AbcBBISd (ORCPT ); Tue, 2 Feb 2016 03:18:33 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34643 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753031AbcBBISb (ORCPT ); Tue, 2 Feb 2016 03:18:31 -0500 Date: Tue, 2 Feb 2016 09:18:29 +0100 From: Michal Hocko To: Mike Galbraith Cc: Andrew Morton , Cristopher Lameter , Mike Galbraith , linux-mm@kvack.org, LKML Subject: Re: [PATCH 3/2] mm, vmstat: cancel pending work of the cpu_stat_off CPU Message-ID: <20160202081828.GC19910@dhcp22.suse.cz> References: <1454001466-27398-1-git-send-email-mhocko@kernel.org> <1454001466-27398-2-git-send-email-mhocko@kernel.org> <1454399605.11183.8.camel@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454399605.11183.8.camel@suse.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 02-02-16 08:53:25, Mike Galbraith wrote: > Cancel pending work of the cpu_stat_off CPU. Thanks for catching that Mike. This was a last minute change and I screwed it... Andrew could you fold this into the original patch, please? Thanks! > Signed-off-by: Mike Galbraith Acked-by: Michal Hocko > --- > mm/vmstat.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > --- a/mm/vmstat.c > +++ b/mm/vmstat.c > @@ -1486,25 +1486,25 @@ static void vmstat_shepherd(struct work_ > > get_online_cpus(); > /* Check processors whose vmstat worker threads have been disabled */ > - for_each_cpu(cpu, cpu_stat_off) > + for_each_cpu(cpu, cpu_stat_off) { > + struct delayed_work *dw = &per_cpu(vmstat_work, cpu); > + > if (need_update(cpu)) { > if (cpumask_test_and_clear_cpu(cpu, cpu_stat_off)) > - queue_delayed_work_on(cpu, vmstat_wq, > - &per_cpu(vmstat_work, cpu), 0); > + queue_delayed_work_on(cpu, vmstat_wq, dw, 0); > } else { > /* > * Cancel the work if quiet_vmstat has put this > * cpu on cpu_stat_off because the work item might > * be still scheduled > */ > - cancel_delayed_work(this_cpu_ptr(&vmstat_work)); > + cancel_delayed_work(dw); > } > - > + } > put_online_cpus(); > > schedule_delayed_work(&shepherd, > round_jiffies_relative(sysctl_stat_interval)); > - > } > > static void __init start_shepherd_timer(void) -- Michal Hocko SUSE Labs