[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250306021031.5538-4-xueshuai@linux.alibaba.com>
Date: Thu, 6 Mar 2025 10:10:31 +0800
From: Shuai Xue <xueshuai@...ux.alibaba.com>
To: tony.luck@...el.com,
bp@...en8.de,
peterz@...radead.org,
catalin.marinas@....com,
yazen.ghannam@....com,
akpm@...ux-foundation.org,
linmiaohe@...wei.com,
nao.horiguchi@...il.com
Cc: tglx@...utronix.de,
mingo@...hat.com,
dave.hansen@...ux.intel.com,
x86@...nel.org,
hpa@...or.com,
jpoimboe@...nel.org,
linux-edac@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
baolin.wang@...ux.alibaba.com,
tianruidong@...ux.alibaba.com
Subject: [PATCH v3 3/3] mm: memory-failure: Enhance comments for return value of memory_failure()
The comments for the return value of memory_failure are not complete,
supplement the comments.
Signed-off-by: Shuai Xue <xueshuai@...ux.alibaba.com>
Reviewed-by: Jarkko Sakkinen <jarkko@...nel.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Reviewed-by: Yazen Ghannam <yazen.ghannam@....com>
Reviewed-by: Jane Chu <jane.chu@...cle.com>
Acked-by: Miaohe Lin <linmiaohe@...wei.com>
---
mm/memory-failure.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index b037952565be..8649849bcdb4 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -2216,9 +2216,13 @@ static void kill_procs_now(struct page *p, unsigned long pfn, int flags,
* Must run in process context (e.g. a work queue) with interrupts
* enabled and no spinlocks held.
*
- * Return: 0 for successfully handled the memory error,
- * -EOPNOTSUPP for hwpoison_filter() filtered the error event,
- * < 0(except -EOPNOTSUPP) on failure.
+ * Return:
+ * 0 - success,
+ * -ENXIO - memory not managed by the kernel
+ * -EOPNOTSUPP - hwpoison_filter() filtered the error event,
+ * -EHWPOISON - the page was already poisoned, potentially
+ * kill process,
+ * other negative values - failure.
*/
int memory_failure(unsigned long pfn, int flags)
{
--
2.39.3
Powered by blists - more mailing lists