linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
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: Only force pageblock scan completion when skip hints are obeyed
Date: Thu, 25 May 2023 12:01:18 +0200	[thread overview]
Message-ID: <f34401f5-48a9-d881-dcbd-2a9fea0a7914@suse.cz> (raw)
In-Reply-To: <20230515113344.6869-3-mgorman@techsingularity.net>

On 5/15/23 13:33, Mel Gorman wrote:
> fast_find_migrateblock relies on skip hints to avoid rescanning a recently
> selected pageblock but compact_zone() only forces the pageblock scan
> completion to set the skip hint if in direct compaction.  While this
> prevents direct compaction repeatedly scanning a subset of blocks due
> to fast_find_migrateblock(), it does not prevent proactive compaction,
> node compaction and kcompactd encountering the same problem described
> in commit cfccd2e63e7e ("mm, compaction: finish pageblocks on complete
> migration failure").
> 
> Force the scan completion of a pageblock to set the skip hint if skip
> hints are obeyed to prevent fast_find_migrateblock() repeatedly selecting
> a subset of pageblocks.
> 
> Suggested-by: Vlastimil Babka <vbabka@suse.cz>
> Signed-off-by: Mel Gorman <mgorman@techsingularity.net>

Acked-by: Vlastimil Babka <vbabka@suse.cz>

> ---
>  mm/compaction.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 81791c124bb8..accc6568091a 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -2456,7 +2456,8 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
>  			}
>  			/*
>  			 * If an ASYNC or SYNC_LIGHT fails to migrate a page
> -			 * within the current order-aligned block, scan the
> +			 * within the current order-aligned block and
> +			 * fast_find_migrateblock may be used then scan the
>  			 * remainder of the pageblock. This will mark the
>  			 * pageblock "skip" to avoid rescanning in the near
>  			 * future. This will isolate more pages than necessary
> @@ -2465,7 +2466,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
>  			 * recently partially scanned.
>  			 */
>  			if (!pageblock_aligned(cc->migrate_pfn) &&
> -			    cc->direct_compaction && !cc->finish_pageblock &&
> +			    !cc->ignore_skip_hint && !cc->finish_pageblock &&
>  			    (cc->mode < MIGRATE_SYNC)) {
>  				cc->finish_pageblock = true;
>  



  reply	other threads:[~2023-05-25 10:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15 11:33 [PATCH 0/4] Follow-up "Fix excessive CPU usage during compaction" Mel Gorman
2023-05-15 11:33 ` [PATCH 1/4] mm: compaction: Ensure rescanning only happens on partially scanned pageblocks Mel Gorman
2023-05-25  9:57   ` Vlastimil Babka
2023-05-15 11:33 ` [PATCH 2/4] mm: compaction: Only force pageblock scan completion when skip hints are obeyed Mel Gorman
2023-05-25 10:01   ` Vlastimil Babka [this message]
2023-05-15 11:33 ` [PATCH 3/4] mm: compaction: Update pageblock skip when first migration candidate is not at the start Mel Gorman
2023-05-25 13:37   ` Vlastimil Babka
2023-05-29 10:33     ` Mel Gorman
2023-05-29 12:43       ` Vlastimil Babka
     [not found]         ` <20230602111622.swtxhn6lu2qwgrwq@techsingularity.net>
     [not found]           ` <152e0730-0ddc-a1f8-7122-275d51741a1d@suse.cz>
     [not found]             ` <20230602124825.24a775kwwuf4rs6v@techsingularity.net>
     [not found]               ` <2c802986-3726-f79c-6383-cc03adb9fb0c@suse.cz>
2023-06-07  3:38                 ` Baolin Wang
2023-06-07 12:24                 ` Mel Gorman
2023-05-15 11:33 ` [PATCH 4/4] Revert "Revert "mm/compaction: fix set skip in fast_find_migrateblock"" Mel Gorman
2023-05-25 13:42   ` Vlastimil Babka
2023-05-19  6:43 ` [PATCH 0/4] Follow-up "Fix excessive CPU usage during compaction" Raghavendra K T
2023-05-21 19:20   ` Mel Gorman
2023-05-23 13:47 ` Baolin Wang

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=f34401f5-48a9-d881-dcbd-2a9fea0a7914@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