From: kbuild test robot <lkp@intel.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: kbuild-all@01.org, linux-pm@vger.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>, Pavel Machek <pavel@ucw.cz>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [PATCH] mm,oom: Do not unfreeze OOM victim thread.
Date: Fri, 30 Mar 2018 23:43:03 +0800 [thread overview]
Message-ID: <201803302314.3pX8ZwUa%fengguang.wu@intel.com> (raw)
In-Reply-To: <1522334218-4268-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp>
Hi Tetsuo,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc7 next-20180329]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Tetsuo-Handa/mm-oom-Do-not-unfreeze-OOM-victim-thread/20180330-215548
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> kernel/power/process.c:154:42: sparse: too many arguments for function oom_killer_disable
kernel/power/process.c: In function 'freeze_processes':
kernel/power/process.c:154:17: error: too many arguments to function 'oom_killer_disable'
if (!error && !oom_killer_disable(msecs_to_jiffies(freeze_timeout_msecs)))
^~~~~~~~~~~~~~~~~~
In file included from kernel/power/process.c:13:0:
include/linux/oom.h:109:13: note: declared here
extern bool oom_killer_disable(void);
^~~~~~~~~~~~~~~~~~
vim +154 kernel/power/process.c
6161b2ce8 Pavel Machek 2005-09-03 115
11b2ce2ba Rafael J. Wysocki 2006-12-06 116 /**
2aede851d Rafael J. Wysocki 2011-09-26 117 * freeze_processes - Signal user space processes to enter the refrigerator.
2b44c4db2 Colin Cross 2013-07-24 118 * The current thread will not be frozen. The same process that calls
2b44c4db2 Colin Cross 2013-07-24 119 * freeze_processes must later call thaw_processes.
03afed8bc Tejun Heo 2011-11-21 120 *
03afed8bc Tejun Heo 2011-11-21 121 * On success, returns 0. On failure, -errno and system is fully thawed.
11b2ce2ba Rafael J. Wysocki 2006-12-06 122 */
11b2ce2ba Rafael J. Wysocki 2006-12-06 123 int freeze_processes(void)
11b2ce2ba Rafael J. Wysocki 2006-12-06 124 {
e7cd8a722 Rafael J. Wysocki 2007-07-19 125 int error;
11b2ce2ba Rafael J. Wysocki 2006-12-06 126
247bc0374 Rafael J. Wysocki 2012-03-28 127 error = __usermodehelper_disable(UMH_FREEZING);
1e73203cd Rafael J. Wysocki 2012-03-28 128 if (error)
1e73203cd Rafael J. Wysocki 2012-03-28 129 return error;
1e73203cd Rafael J. Wysocki 2012-03-28 130
2b44c4db2 Colin Cross 2013-07-24 131 /* Make sure this task doesn't get frozen */
2b44c4db2 Colin Cross 2013-07-24 132 current->flags |= PF_SUSPEND_TASK;
2b44c4db2 Colin Cross 2013-07-24 133
a3201227f Tejun Heo 2011-11-21 134 if (!pm_freezing)
a3201227f Tejun Heo 2011-11-21 135 atomic_inc(&system_freezing_cnt);
a3201227f Tejun Heo 2011-11-21 136
33e4f80ee Rafael J. Wysocki 2017-06-12 137 pm_wakeup_clear(true);
35536ae17 Michal Hocko 2015-02-11 138 pr_info("Freezing user space processes ... ");
a3201227f Tejun Heo 2011-11-21 139 pm_freezing = true;
ebb12db51 Rafael J. Wysocki 2008-06-11 140 error = try_to_freeze_tasks(true);
2aede851d Rafael J. Wysocki 2011-09-26 141 if (!error) {
247bc0374 Rafael J. Wysocki 2012-03-28 142 __usermodehelper_set_disable_depth(UMH_DISABLED);
35536ae17 Michal Hocko 2015-02-11 143 pr_cont("done.");
2aede851d Rafael J. Wysocki 2011-09-26 144 }
35536ae17 Michal Hocko 2015-02-11 145 pr_cont("\n");
2aede851d Rafael J. Wysocki 2011-09-26 146 BUG_ON(in_atomic());
2aede851d Rafael J. Wysocki 2011-09-26 147
c32b3cbe0 Michal Hocko 2015-02-11 148 /*
c32b3cbe0 Michal Hocko 2015-02-11 149 * Now that the whole userspace is frozen we need to disbale
c32b3cbe0 Michal Hocko 2015-02-11 150 * the OOM killer to disallow any further interference with
7d2e7a22c Michal Hocko 2016-10-07 151 * killable tasks. There is no guarantee oom victims will
7d2e7a22c Michal Hocko 2016-10-07 152 * ever reach a point they go away we have to wait with a timeout.
c32b3cbe0 Michal Hocko 2015-02-11 153 */
7d2e7a22c Michal Hocko 2016-10-07 @154 if (!error && !oom_killer_disable(msecs_to_jiffies(freeze_timeout_msecs)))
c32b3cbe0 Michal Hocko 2015-02-11 155 error = -EBUSY;
c32b3cbe0 Michal Hocko 2015-02-11 156
03afed8bc Tejun Heo 2011-11-21 157 if (error)
03afed8bc Tejun Heo 2011-11-21 158 thaw_processes();
2aede851d Rafael J. Wysocki 2011-09-26 159 return error;
2aede851d Rafael J. Wysocki 2011-09-26 160 }
2aede851d Rafael J. Wysocki 2011-09-26 161
:::::: The code at line 154 was first introduced by commit
:::::: 7d2e7a22cf27e7569e6816ccc05dd74248048b30 oom, suspend: fix oom_killer_disable vs. pm suspend properly
:::::: TO: Michal Hocko <mhocko@suse.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
next prev parent reply other threads:[~2018-03-30 15:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-29 14:36 Tetsuo Handa
2018-03-29 14:50 ` Michal Hocko
2018-03-29 15:52 ` Tetsuo Handa
2018-03-30 15:16 ` kbuild test robot
2018-03-30 15:43 ` kbuild test robot [this message]
2018-03-30 15:44 ` kbuild test robot
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=201803302314.3pX8ZwUa%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=kbuild-all@01.org \
--cc=linux-mm@kvack.org \
--cc=linux-pm@vger.kernel.org \
--cc=mhocko@suse.com \
--cc=pavel@ucw.cz \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=rjw@rjwysocki.net \
/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