From: Vlastimil Babka <vbabka@suse.cz>
To: Mel Gorman <mgorman@techsingularity.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Maxim Levitsky <mlevitsk@redhat.com>,
Michal Hocko <mhocko@kernel.org>,
Pedro Falcato <pedro.falcato@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Chuyi Zhou <zhouchuyi@bytedance.com>,
Linux-MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] mm, compaction: Check if a page has been captured before draining PCP pages
Date: Tue, 7 Feb 2023 17:53:39 +0100 [thread overview]
Message-ID: <7962d171-fc29-88db-ee33-4326838d7b40@suse.cz> (raw)
In-Reply-To: <20230125134434.18017-3-mgorman@techsingularity.net>
On 1/25/23 14:44, Mel Gorman wrote:
> If a page has been captured then draining is unnecssary so check first
> for a captured page.
>
> Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> mm/compaction.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index c018b0e65720..28711a21a8a2 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -2441,6 +2441,12 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
> }
> }
>
> + /* Stop if a page has been captured */
> + if (capc && capc->page) {
> + ret = COMPACT_SUCCESS;
> + break;
> + }
> +
> check_drain:
> /*
> * Has the migration scanner moved away from the previous
> @@ -2459,12 +2465,6 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
> last_migrated_pfn = 0;
> }
> }
> -
> - /* Stop if a page has been captured */
> - if (capc && capc->page) {
> - ret = COMPACT_SUCCESS;
> - break;
> - }
> }
>
> out:
next prev parent reply other threads:[~2023-02-07 16:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 13:44 [RFC PATCH 0/4] Fix excessive CPU usage during compaction Mel Gorman
2023-01-25 13:44 ` [PATCH 1/4] mm, compaction: Rename compact_control->rescan to finish_pageblock Mel Gorman
2023-02-07 16:22 ` Vlastimil Babka
2023-01-25 13:44 ` [PATCH 2/4] mm, compaction: Check if a page has been captured before draining PCP pages Mel Gorman
2023-02-07 16:53 ` Vlastimil Babka [this message]
2023-01-25 13:44 ` [PATCH 3/4] mm, compaction: Finish scanning the current pageblock if requested Mel Gorman
2023-02-07 17:10 ` Vlastimil Babka
2023-01-25 13:44 ` [PATCH 4/4] mm, compaction: Finish pageblocks on complete migration failure Mel Gorman
2023-02-07 17:42 ` Vlastimil Babka
2023-02-13 21:50 ` Vlastimil Babka
2023-01-26 1:11 ` [RFC PATCH 0/4] Fix excessive CPU usage during compaction Andrew Morton
2023-01-26 9:04 ` Mel Gorman
2023-01-29 18:03 ` Vlastimil Babka
2023-01-29 21:00 ` Mel Gorman
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=7962d171-fc29-88db-ee33-4326838d7b40@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=mlevitsk@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pedro.falcato@gmail.com \
--cc=zhouchuyi@bytedance.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).