mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	ying.huang@linux.intel.com, mhocko@suse.com
Cc: lkp@01.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, arekm@maven.pl, js1304@gmail.com,
	clameter@sgi.com, tj@kernel.org, torvalds@linux-foundation.org
Subject: Re: [lkp] [mm, vmstat] 373ccbe592: BUG: unable to handle kernel
Date: Mon, 18 Jan 2016 02:26:52 +0000	[thread overview]
Message-ID: <1453084012.2519.98.camel@decadent.org.uk> (raw)
In-Reply-To: <201601081932.GCE21843.HFQOtOSLFJFOVM@I-love.SAKURA.ne.jp>

[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]

On Fri, 2016-01-08 at 19:32 +0900, Tetsuo Handa wrote:
[...]
> Thank you. I think that start_shepherd_timer() started shepherd item
> and vmstat_shepherd() is called before vmstat_wq = alloc_workqueue() is
> called. We are sometimes too late to allocate vmstat_wq workqueue.
> Please try below one.
> 
> ----------
> diff --git a/mm/vmstat.c b/mm/vmstat.c
> index 4ebc17d..6478929 100644
> --- a/mm/vmstat.c
> +++ b/mm/vmstat.c
> @@ -1545,12 +1545,12 @@ static struct notifier_block vmstat_notifier =
>  static int __init setup_vmstat(void)
>  {
>  #ifdef CONFIG_SMP
> +	vmstat_wq = alloc_workqueue("vmstat", WQ_FREEZABLE|WQ_MEM_RECLAIM, 0);
>  	cpu_notifier_register_begin();
>  	__register_cpu_notifier(&vmstat_notifier);
>  
>  	start_shepherd_timer();
>  	cpu_notifier_register_done();
> -	vmstat_wq = alloc_workqueue("vmstat", WQ_FREEZABLE|WQ_MEM_RECLAIM, 0);
>  #endif
>  #ifdef CONFIG_PROC_FS
>  	proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations);
> ----------
> 
> We need to backport this fix to stable since this commit already went to 3.2.75.

Thanks.  In 3.2.75 this precise race doesn't seem to exist, but I did
put the alloc_workqueue() after register_cpu_notifier() whereas it
should go before.

Ben.

-- 
Ben Hutchings
A free society is one where it is safe to be unpopular. - Adlai Stevenson

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

      reply	other threads:[~2016-01-18  2:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08  2:59 kernel test robot
2016-01-08 10:18 ` [PATCH] vmstat: allocate vmstat_wq before it is used Michal Hocko
2016-01-09  0:13   ` Linus Torvalds
2016-01-09  0:16     ` Linus Torvalds
2016-01-09  6:53       ` Tetsuo Handa
2016-01-09  7:07       ` Tetsuo Handa
2016-01-10 20:06       ` Michal Hocko
2016-01-08 10:32 ` [lkp] [mm, vmstat] 373ccbe592: BUG: unable to handle kernel Tetsuo Handa
2016-01-18  2:26   ` Ben Hutchings [this message]

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=1453084012.2519.98.camel@decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=arekm@maven.pl \
    --cc=clameter@sgi.com \
    --cc=js1304@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=mhocko@suse.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=ying.huang@linux.intel.com \
    /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

Powered by JetHome