linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Mike Galbraith <mgalbraith@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Cristopher Lameter <clameter@sgi.com>,
	Mike Galbraith <mgalbraith@suse.com>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/2] mm, vmstat: cancel pending work of the cpu_stat_off CPU
Date: Tue, 2 Feb 2016 09:18:29 +0100	[thread overview]
Message-ID: <20160202081828.GC19910@dhcp22.suse.cz> (raw)
In-Reply-To: <1454399605.11183.8.camel@suse.de>

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 <mgalbraith@suse.de>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
>  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

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

  reply	other threads:[~2016-02-02  8:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28 17:17 [PATCH 0/2] vmstat updates Michal Hocko
2016-01-28 17:17 ` [PATCH 1/2] mm, vmstat: make quiet_vmstat lighter Michal Hocko
2016-02-02  7:53   ` [PATCH 3/2] mm, vmstat: cancel pending work of the cpu_stat_off CPU Mike Galbraith
2016-02-02  8:18     ` Michal Hocko [this message]
2016-01-28 17:17 ` [PATCH 2/2] vmstat: make vmstat_update deferrable Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160202081828.GC19910@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgalbraith@suse.com \
    --cc=mgalbraith@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox