From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752147AbcAIGyA (ORCPT ); Sat, 9 Jan 2016 01:54:00 -0500 Received: from www262.sakura.ne.jp ([202.181.97.72]:61401 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbcAIGx7 (ORCPT ); Sat, 9 Jan 2016 01:53:59 -0500 To: torvalds@linux-foundation.org, mhocko@kernel.org, ben@decadent.org.uk Cc: akpm@linux-foundation.org, arekm@maven.pl, js1304@gmail.com, clameter@sgi.com, tj@kernel.org, lkp@01.org, linux-kernel@vger.kernel.org, mhocko@suse.com Subject: Re: [PATCH] vmstat: allocate vmstat_wq before it is used From: Tetsuo Handa References: <87r3hsg4io.fsf@yhuang-dev.intel.com> <1452248309-17930-1-git-send-email-mhocko@kernel.org> In-Reply-To: Message-Id: <201601091553.JJC73408.MLFVFJSOOtQHOF@I-love.SAKURA.ne.jp> X-Mailer: Winbiff [Version 2.51 PL2] X-Accept-Language: ja,en,zh Date: Sat, 9 Jan 2016 15:53:56 +0900 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds wrote: > On Fri, Jan 8, 2016 at 4:13 PM, Linus Torvalds > wrote: > > > > Was there confirmation this fixed the issue? Just verifying.. I confirmed that ---------- diff --git a/mm/vmstat.c b/mm/vmstat.c index 4ebc17d..0486d3d 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "internal.h" @@ -1550,6 +1551,7 @@ static int __init setup_vmstat(void) start_shepherd_timer(); cpu_notifier_register_done(); + ssleep(3); vmstat_wq = alloc_workqueue("vmstat", WQ_FREEZABLE|WQ_MEM_RECLAIM, 0); #endif #ifdef CONFIG_PROC_FS ---------- always reproduces this bug and ---------- diff --git a/mm/vmstat.c b/mm/vmstat.c index 4ebc17d..358c1b7 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "internal.h" @@ -1483,6 +1484,8 @@ static void __init start_shepherd_timer(void) BUG(); cpumask_copy(cpu_stat_off, cpu_online_mask); + ssleep(3); + vmstat_wq = alloc_workqueue("vmstat", WQ_FREEZABLE|WQ_MEM_RECLAIM, 0); schedule_delayed_work(&shepherd, round_jiffies_relative(sysctl_stat_interval)); } @@ -1550,7 +1553,6 @@ static int __init setup_vmstat(void) 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); ---------- never reproduces this bug. Thus, I think it is OK to sneak it into 4.4. > > Oh, and Tetsuo claims that it needs a cc stable regardless, because > the commit that caused this to appear was marked for stable and > already got backported. Yes? > > Linus > Yes, please.