From: Minchan Kim <minchan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Suren Baghdasaryan <surenb@google.com>,
John Dias <joaodias@google.com>, Michal Hocko <mhocko@suse.com>,
David Hildenbrand <david@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH] mm: page_alloc: dump migrate-failed pages only at -EBUSY
Date: Thu, 20 May 2021 12:19:55 -0700 [thread overview]
Message-ID: <YKa2Wyo9xqIErpfa@google.com> (raw)
In-Reply-To: <20210519213341.2620708-1-minchan@kernel.org>
On Wed, May 19, 2021 at 02:33:41PM -0700, Minchan Kim wrote:
> alloc_contig_dump_pages aims for helping debugging page migration
> failure by page refcount mismatch or something else of page itself
> from migration handler function. However, in -ENOMEM case, there is
> nothing to get clue from page descriptor information so just
> dump pages only when -EBUSY happens.
>
> Signed-off-by: Minchan Kim <minchan@kernel.org>
> ---
> mm/page_alloc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 3100fcb08500..c0a2971dc755 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -8760,7 +8760,8 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
>
> lru_cache_enable();
> if (ret < 0) {
> - alloc_contig_dump_pages(&cc->migratepages);
> + if (ret == -EBUSY)
> + alloc_contig_dump_pages(&cc->migratepages);
> putback_movable_pages(&cc->migratepages);
> return ret;
> }
> --
> 2.31.1.751.gd2f1c929bd-goog
>
Resend with a little modifying description.
From c5a2fea291cf46079b87cc9ac9a25fc7f819d0fd Mon Sep 17 00:00:00 2001
From: Minchan Kim <minchan@kernel.org>
Date: Wed, 19 May 2021 14:22:18 -0700
Subject: [PATCH] mm: page_alloc: dump migrate-failed pages only at -EBUSY
alloc_contig_dump_pages aims for helping debugging page migration
failure by elevated page refcount compared to expected_count.
(for the detail, please look at migrate_page_move_mapping)
However, -ENOMEM is just the case that system is under memory
pressure state, not relevant with page refcount at all. Thus,
the dumping page list is not helpful for the debugging point of view.
Signed-off-by: Minchan Kim <minchan@kernel.org>
---
mm/page_alloc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 3100fcb08500..c0a2971dc755 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -8760,7 +8760,8 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
lru_cache_enable();
if (ret < 0) {
- alloc_contig_dump_pages(&cc->migratepages);
+ if (ret == -EBUSY)
+ alloc_contig_dump_pages(&cc->migratepages);
putback_movable_pages(&cc->migratepages);
return ret;
}
--
2.31.1.818.g46aad6cb9e-goog
next prev parent reply other threads:[~2021-05-20 19:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 21:33 Minchan Kim
2021-05-20 19:19 ` Minchan Kim [this message]
2021-05-20 19:28 ` David Hildenbrand
2021-05-20 20:51 ` Minchan Kim
2021-05-21 8:08 ` David Hildenbrand
2021-05-21 17:39 ` Minchan Kim
2021-05-23 12:06 ` David Hildenbrand
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=YKa2Wyo9xqIErpfa@google.com \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=joaodias@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=surenb@google.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