diff for duplicates of <5d472476-7852-f97b-9412-63536dffaa0e@i-love.sakura.ne.jp>
diff --git a/a/1.txt b/N1/1.txt
index 0f6bf69..e7a256b 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -61,94 +61,4 @@ complete a request. But it can use ratelimit as well.
But we have an immediately applicable mitigation for a problem that
already OOM-killed threads are triggering "a memcg OOM with no eligible
-task" using one of below patches.
-
-
-
-From 0a533d15949eac25f5ce7ce6e53f5830608f08e7 Mon Sep 17 00:00:00 2001
-From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
-Date: Fri, 19 Oct 2018 15:52:56 +0900
-Subject: [PATCH v2] mm, oom: OOM victims do not need to select next OOM victim unless __GFP_NOFAIL.
-
-Since commit 696453e66630ad45 ("mm, oom: task_will_free_mem should skip
-oom_reaped tasks") changed to select next OOM victim as soon as
-MMF_OOM_SKIP is set, a memcg OOM event from a user process can generate
-220+ times (12400+ lines / 730+ KB) of OOM-killer messages with
-"Out of memory and no killable processes..." (i.e. no progress) due to
-a race window.
-
-This patch completely eliminates such race window by making
-out_of_memory() from OOM victims no-op, for OOM victims do not
-forever retry (unless __GFP_NOFAIL).
-
-Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
----
- mm/oom_kill.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/mm/oom_kill.c b/mm/oom_kill.c
-index f10aa53..0e8d20b 100644
---- a/mm/oom_kill.c
-+++ b/mm/oom_kill.c
-@@ -1058,6 +1058,9 @@ bool out_of_memory(struct oom_control *oc)
- if (oom_killer_disabled)
- return false;
-
-+ if (tsk_is_oom_victim(current) && !(oc->gfp_mask & __GFP_NOFAIL))
-+ return true;
-+
- if (!is_memcg_oom(oc)) {
- blocking_notifier_call_chain(&oom_notify_list, 0, &freed);
- if (freed > 0)
---
-1.8.3.1
-
-
-
-From 4a0e9c9514e1c9c5f90f6247a2c142f622558129 Mon Sep 17 00:00:00 2001
-From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
-Date: Fri, 19 Oct 2018 16:31:48 +0900
-Subject: [PATCH] mm, oom: task_will_free_mem() should ignore MMF_OOM_SKIP.
-
-Since commit 696453e66630ad45 ("mm, oom: task_will_free_mem should skip
-oom_reaped tasks") changed to select next OOM victim as soon as
-MMF_OOM_SKIP is set, a memcg OOM event from a user process can generate
-220+ times (12400+ lines / 730+ KB) of OOM-killer messages with
-"Out of memory and no killable processes..." (i.e. no progress) due to
-a race window.
-
-But since we added fatal_signal_pending() check to iterations which
-can result in a behavior observed in the commit above
-(e.g. commit 5abf186a30a89d5b "mm, fs: check for fatal signals in
-do_generic_file_read()"), we won't observe such behavior any more.
-
-This patch completely eliminates such race window by removing the
-MMF_OOM_SKIP test from task_will_free_mem(), at the risk of falling
-into infinite loop when we have to select next OOM victim due to
-doing __GFP_NOFAIL allocation requests.
-
-Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
----
- mm/oom_kill.c | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/mm/oom_kill.c b/mm/oom_kill.c
-index f10aa53..981237c 100644
---- a/mm/oom_kill.c
-+++ b/mm/oom_kill.c
-@@ -800,13 +800,6 @@ static bool task_will_free_mem(struct task_struct *task)
- if (!__task_will_free_mem(task))
- return false;
-
-- /*
-- * This task has already been drained by the oom reaper so there are
-- * only small chances it will free some more
-- */
-- if (test_bit(MMF_OOM_SKIP, &mm->flags))
-- return false;
--
- if (atomic_read(&mm->mm_users) <= 1)
- return true;
-
---
-1.8.3.1
\ No newline at end of file
+task" using one of below patches.
\ No newline at end of file
diff --git a/a/content_digest b/N1/content_digest
index 1b776f2..a146f35 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -120,97 +120,7 @@
"\n",
"But we have an immediately applicable mitigation for a problem that\n",
"already OOM-killed threads are triggering \"a memcg OOM with no eligible\n",
- "task\" using one of below patches.\n",
- "\n",
- "\n",
- "\n",
- "From 0a533d15949eac25f5ce7ce6e53f5830608f08e7 Mon Sep 17 00:00:00 2001\n",
- "From: Tetsuo Handa <penguin-kernel\@I-love.SAKURA.ne.jp>\n",
- "Date: Fri, 19 Oct 2018 15:52:56 +0900\n",
- "Subject: [PATCH v2] mm, oom: OOM victims do not need to select next OOM victim unless __GFP_NOFAIL.\n",
- "\n",
- "Since commit 696453e66630ad45 (\"mm, oom: task_will_free_mem should skip\n",
- "oom_reaped tasks\") changed to select next OOM victim as soon as\n",
- "MMF_OOM_SKIP is set, a memcg OOM event from a user process can generate\n",
- "220+ times (12400+ lines / 730+ KB) of OOM-killer messages with\n",
- "\"Out of memory and no killable processes...\" (i.e. no progress) due to\n",
- "a race window.\n",
- "\n",
- "This patch completely eliminates such race window by making\n",
- "out_of_memory() from OOM victims no-op, for OOM victims do not\n",
- "forever retry (unless __GFP_NOFAIL).\n",
- "\n",
- "Signed-off-by: Tetsuo Handa <penguin-kernel\@I-love.SAKURA.ne.jp>\n",
- "---\n",
- " mm/oom_kill.c | 3 +++\n",
- " 1 file changed, 3 insertions(+)\n",
- "\n",
- "diff --git a/mm/oom_kill.c b/mm/oom_kill.c\n",
- "index f10aa53..0e8d20b 100644\n",
- "--- a/mm/oom_kill.c\n",
- "+++ b/mm/oom_kill.c\n",
- "\@\@ -1058,6 +1058,9 \@\@ bool out_of_memory(struct oom_control *oc)\n",
- " \tif (oom_killer_disabled)\n",
- " \t\treturn false;\n",
- " \n",
- "+\tif (tsk_is_oom_victim(current) && !(oc->gfp_mask & __GFP_NOFAIL))\n",
- "+\t\treturn true;\n",
- "+\n",
- " \tif (!is_memcg_oom(oc)) {\n",
- " \t\tblocking_notifier_call_chain(&oom_notify_list, 0, &freed);\n",
- " \t\tif (freed > 0)\n",
- "-- \n",
- "1.8.3.1\n",
- "\n",
- "\n",
- "\n",
- "From 4a0e9c9514e1c9c5f90f6247a2c142f622558129 Mon Sep 17 00:00:00 2001\n",
- "From: Tetsuo Handa <penguin-kernel\@I-love.SAKURA.ne.jp>\n",
- "Date: Fri, 19 Oct 2018 16:31:48 +0900\n",
- "Subject: [PATCH] mm, oom: task_will_free_mem() should ignore MMF_OOM_SKIP.\n",
- "\n",
- "Since commit 696453e66630ad45 (\"mm, oom: task_will_free_mem should skip\n",
- "oom_reaped tasks\") changed to select next OOM victim as soon as\n",
- "MMF_OOM_SKIP is set, a memcg OOM event from a user process can generate\n",
- "220+ times (12400+ lines / 730+ KB) of OOM-killer messages with\n",
- "\"Out of memory and no killable processes...\" (i.e. no progress) due to\n",
- "a race window.\n",
- "\n",
- "But since we added fatal_signal_pending() check to iterations which\n",
- "can result in a behavior observed in the commit above\n",
- "(e.g. commit 5abf186a30a89d5b \"mm, fs: check for fatal signals in\n",
- "do_generic_file_read()\"), we won't observe such behavior any more.\n",
- "\n",
- "This patch completely eliminates such race window by removing the\n",
- "MMF_OOM_SKIP test from task_will_free_mem(), at the risk of falling\n",
- "into infinite loop when we have to select next OOM victim due to\n",
- "doing __GFP_NOFAIL allocation requests.\n",
- "\n",
- "Signed-off-by: Tetsuo Handa <penguin-kernel\@I-love.SAKURA.ne.jp>\n",
- "---\n",
- " mm/oom_kill.c | 7 -------\n",
- " 1 file changed, 7 deletions(-)\n",
- "\n",
- "diff --git a/mm/oom_kill.c b/mm/oom_kill.c\n",
- "index f10aa53..981237c 100644\n",
- "--- a/mm/oom_kill.c\n",
- "+++ b/mm/oom_kill.c\n",
- "\@\@ -800,13 +800,6 \@\@ static bool task_will_free_mem(struct task_struct *task)\n",
- " \tif (!__task_will_free_mem(task))\n",
- " \t\treturn false;\n",
- " \n",
- "-\t/*\n",
- "-\t * This task has already been drained by the oom reaper so there are\n",
- "-\t * only small chances it will free some more\n",
- "-\t */\n",
- "-\tif (test_bit(MMF_OOM_SKIP, &mm->flags))\n",
- "-\t\treturn false;\n",
- "-\n",
- " \tif (atomic_read(&mm->mm_users) <= 1)\n",
- " \t\treturn true;\n",
- " \n",
- "-- \n",
- "1.8.3.1"
+ "task\" using one of below patches."
]
-a34d1cdf88e05963cb3c7be8e68610e49d21be35c243b0e5726735dc1c8fedf9
+95eff7c8629dd5a86212b910f5377123cf9df1b2a197ce8b93f861c761f2fccd
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.