From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
To: Michal Hocko <mhocko@kernel.org>
Cc: ytk.lee@samsung.com, "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Oleg Nesterov <oleg@redhat.com>,
David Rientjes <rientjes@google.com>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] mm, oom_adj: avoid meaningless loop to find processes sharing mm
Date: Tue, 9 Oct 2018 21:52:12 +0900 [thread overview]
Message-ID: <99008444-b6b1-efc9-8670-f3eac4d2305f@i-love.sakura.ne.jp> (raw)
In-Reply-To: <20181009111005.GK8528@dhcp22.suse.cz>
On 2018/10/09 20:10, Michal Hocko wrote:
> On Tue 09-10-18 19:00:44, Tetsuo Handa wrote:
>>> 2) add OOM_SCORE_ADJ_MIN and do not kill tasks sharing mm and do not
>>> reap the mm in the rare case of the race.
>>
>> That is no problem. The mistake we made in 4.6 was that we updated oom_score_adj
>> to -1000 (and allowed unprivileged users to OOM-lockup the system).
>
> I do not follow.
>
http://tomoyo.osdn.jp/cgi-bin/lxr/source/mm/oom_kill.c?v=linux-4.6.7#L493
[ 177.722853] a.out invoked oom-killer: gfp_mask=0x24280ca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), order=0, oom_score_adj=0
[ 177.724956] a.out cpuset=/ mems_allowed=0
[ 177.725735] CPU: 3 PID: 3962 Comm: a.out Not tainted 4.5.0-rc2-next-20160204 #291
(...snipped...)
[ 177.802889] [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name
(...snipped...)
[ 177.872248] [ 3941] 1000 3941 28880 124 14 3 0 0 bash
[ 177.874279] [ 3962] 1000 3962 541717 395780 784 6 0 0 a.out
[ 177.876274] [ 3963] 1000 3963 1078 21 7 3 0 1000 a.out
[ 177.878261] [ 3964] 1000 3964 1078 21 7 3 0 1000 a.out
[ 177.880194] [ 3965] 1000 3965 1078 21 7 3 0 1000 a.out
[ 177.882262] Out of memory: Kill process 3963 (a.out) score 998 or sacrifice child
[ 177.884129] Killed process 3963 (a.out) total-vm:4312kB, anon-rss:84kB, file-rss:0kB, shmem-rss:0kB
[ 177.887100] oom_reaper: reaped process :3963 (a.out) anon-rss:0kB, file-rss:0kB, shmem-rss:0lB
[ 179.638399] crond invoked oom-killer: gfp_mask=0x24201ca(GFP_HIGHUSER_MOVABLE|__GFP_COLD), order=0, oom_score_adj=0
[ 179.647708] crond cpuset=/ mems_allowed=0
[ 179.652996] CPU: 3 PID: 742 Comm: crond Not tainted 4.5.0-rc2-next-20160204 #291
(...snipped...)
[ 179.771311] [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name
(...snipped...)
[ 179.836221] [ 3941] 1000 3941 28880 124 14 3 0 0 bash
[ 179.838278] [ 3962] 1000 3962 541717 396308 785 6 0 0 a.out
[ 179.840328] [ 3963] 1000 3963 1078 0 7 3 0 -1000 a.out
[ 179.842443] [ 3965] 1000 3965 1078 0 7 3 0 1000 a.out
[ 179.844557] Out of memory: Kill process 3965 (a.out) score 998 or sacrifice child
[ 179.846404] Killed process 3965 (a.out) total-vm:4312kB, anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
next prev parent reply other threads:[~2018-10-09 12:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20181008011931epcms1p82dd01b7e5c067ea99946418bc97de46a@epcms1p8>
2018-10-08 1:19 ` [PATCH] mm, oom_adj: avoid meaningless loop to find processes sharing mm Yong-Taek Lee
2018-10-08 2:52 ` Tetsuo Handa
[not found] ` <CGME20181008011931epcms1p82dd01b7e5c067ea99946418bc97de46a@epcms1p5>
2018-10-08 6:14 ` Yong-Taek Lee
2018-10-08 6:22 ` Tetsuo Handa
[not found] ` <CGME20181008011931epcms1p82dd01b7e5c067ea99946418bc97de46a@epcms1p2>
2018-10-08 8:38 ` Yong-Taek Lee
2018-10-08 9:27 ` Tetsuo Handa
2018-10-09 6:35 ` Michal Hocko
2018-10-09 7:50 ` Michal Hocko
2018-10-09 10:00 ` Tetsuo Handa
2018-10-09 11:10 ` Michal Hocko
2018-10-09 12:52 ` Tetsuo Handa [this message]
2018-10-09 12:58 ` Michal Hocko
2018-10-09 13:14 ` Tetsuo Handa
2018-10-09 13:26 ` Michal Hocko
2018-10-09 13:51 ` Tetsuo Handa
2018-10-09 14:09 ` Michal Hocko
2018-10-09 8:02 ` Michal Hocko
[not found] <CGME20181005063208epcms1p22959cd2f771ad017996e2b18266791ea@epcms1p2>
[not found] ` <20181005063208epcms1p22959cd2f771ad017996e2b18266791ea@epcms1p2>
2018-10-09 6:23 ` Michal Hocko
2018-10-09 8:03 ` 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=99008444-b6b1-efc9-8670-f3eac4d2305f@i-love.sakura.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=oleg@redhat.com \
--cc=rientjes@google.com \
--cc=torvalds@linux-foundation.org \
--cc=vdavydov.dev@gmail.com \
--cc=ytk.lee@samsung.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;
as well as URLs for NNTP newsgroup(s).