linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Chuyi Zhou <zhouchuyi@bytedance.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@techsingularity.net>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH v3] mm/compaction: fix set skip in fast_find_migrateblock
Date: Mon, 15 Aug 2022 11:22:48 +0800	[thread overview]
Message-ID: <61a5f144-0c9b-342b-865f-0c57a56e6d80@bytedance.com> (raw)
In-Reply-To: <70a434b2-7f1c-7fad-a7b7-cb038a13fd2c@bytedance.com>



在 2022/8/15 上午11:20, Chuyi Zhou 写道:
> 
> 
> 在 2022/8/15 上午9:24, Andrew Morton 写道:
>> On Tue, 19 Jul 2022 09:28:54 +0100 Mel Gorman 
>> <mgorman@techsingularity.net> wrote:
>>
>>> The return block indeed may not be aligned. It could simply be a
>>> restart. The changelog could still do with a little clarification but
>>> your patch is still fine.
>>
>> I'm not seeing a v4 so I merged the v3.  It would be great if someone
>> could please send along an updated changelog?
> 
> Hi, Morton, Here is the updated changelog:
> The fast_find_migrateblock could return a block aligned with
> pageblock_nr_pages. When we successfully find a block, we use
> pageblock_start_pfn(free_pfn) to get the first pfn of the pageblock,
> the block will be set skip through *set_pageblock_skip*, normally
> the value get from pageblock_start_pfn should be aligned with
> *pageblock_nr_pages*. Then the *first pfn* will be passed to
> isolate_migratepages_block, the whole pageblock will be skipped
> due to the branch
> if (!valid_page && IS_ALIGNED(low_pfn, pageblock_nr_pages)), because
> !valid_page will be true for the first pageblock, and the low_pfn could
> be aligned with pageblock_nr_pages as mentioned above. Eventually we
> will goto isolate_abort and isolate nothing. That cause
> fast_find_migrateblock useless.
> In this Patch, when we find a suitable pageblock in fast_find_
> migrateblock, we do noting but let isolate_migratepages_block
> to set skip to the pageblock after scan it. Normally,
> we would isolate some pages from the fast-find block.
> I use mmtest/thpscale-madvhugepage test it. Here is the result:
>                               baseline               patch
> Amean     fault-both-1      1331.66 (   0.00%)     1261.04 *   5.30%*
> Amean     fault-both-3      1383.95 (   0.00%)     1191.69 *  13.89%*
> Amean     fault-both-5      1568.13 (   0.00%)     1445.20 *   7.84%*
> Amean     fault-both-7      1819.62 (   0.00%)     1555.13 *  14.54%*
> Amean     fault-both-12     1106.96 (   0.00%)     1149.43 *  -3.84%*
> Amean     fault-both-18     2196.93 (   0.00%)     1875.77 *  14.62%*
> Amean     fault-both-24     2642.69 (   0.00%)     2671.21 *  -1.08%*
> Amean     fault-both-30     2901.89 (   0.00%)     2857.32 *   1.54%*
> Amean     fault-both-32     3747.00 (   0.00%)     3479.23 *   7.15%*
> 
> Fixes: 70b44595eafe9 ("mm, compaction: use free lists to quickly locate 
> a migration source")
> Signed-off-by: zhouchuyi <zhouchuyi@bytedance.com>
> =======================================================================
> Mel think it could be possible that the fast_find_migrateblock can return
> a pageblock not aligned pageblock_nr_pages. In that case,
> isolate_migratepages_block would not set skip flag.
> I want to fix this problem in v4.


  parent reply	other threads:[~2022-08-15  3:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13  6:20 Chuyi Zhou
2022-07-13 15:28 ` Andrew Morton
2022-07-14 11:50   ` Mel Gorman
2022-07-15 15:26     ` Chuyi Zhou
2022-07-19  8:28       ` Mel Gorman
2022-08-15  1:24         ` Andrew Morton
     [not found]           ` <70a434b2-7f1c-7fad-a7b7-cb038a13fd2c@bytedance.com>
2022-08-15  3:22             ` Chuyi Zhou [this message]
     [not found]         ` <7d2bbb38-a96c-8212-8f89-915cd2c8668f@bytedance.com>
2022-08-17  3:10           ` Chuyi Zhou
2023-01-09 19:43         ` Vlastimil Babka
2023-01-11 14:21           ` Mel Gorman
2023-01-13 17:13             ` Vlastimil Babka

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=61a5f144-0c9b-342b-865f-0c57a56e6d80@bytedance.com \
    --to=zhouchuyi@bytedance.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    /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