From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D8D2C433EF for ; Wed, 13 Jul 2022 03:13:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BB7359400FA; Tue, 12 Jul 2022 23:13:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B67389400E5; Tue, 12 Jul 2022 23:13:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A2EBA9400FA; Tue, 12 Jul 2022 23:13:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 901269400E5 for ; Tue, 12 Jul 2022 23:13:58 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 5C6F712081C for ; Wed, 13 Jul 2022 03:13:58 +0000 (UTC) X-FDA: 79680607356.07.8C2EBF5 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by imf31.hostedemail.com (Postfix) with ESMTP id 05D7120068 for ; Wed, 13 Jul 2022 03:13:56 +0000 (UTC) Received: by mail-pj1-f45.google.com with SMTP id p9so10151880pjd.3 for ; Tue, 12 Jul 2022 20:13:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:to:references:from :cc:in-reply-to:content-transfer-encoding; bh=FDMapggaMDfUiCJjj7yT97cgt15vksqtjWaCxfe9SUc=; b=RtunqkIQYWvOXcSyGWW5c41JsWpGV6qtJXAJ4G0Z/TWvNmvtwi7shPk3jZU2M0q+xJ OEgbHUIy2HNPElZFbdw5M2UBLPLNYtEnyoKyyJbXGVYOuokQRLDJMDYFkiKvn+PGF6tp WpT9cm1Ih9yjC8CsqNP1uEPUeM/wQRKTGLkohadDDIqKr9gIdXILZTbOVWJ+tqofZ7oc uwMB9zdXnYAa9pYV+eIzjnBJD10HXfnDBpsO9QZhz4jINfkdWI0bRU/lxUiUFYO0AVL9 OlWeCNGBSa87V7U5s/BQq9Fs8hA4CkxGtQE4KcQxfRTR35p1vkM+mVDCEvKxgMf8q7UT XdcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :to:references:from:cc:in-reply-to:content-transfer-encoding; bh=FDMapggaMDfUiCJjj7yT97cgt15vksqtjWaCxfe9SUc=; b=42EwwH05P8MDOecMqqUatYMNY/Wqd1XNWO/Kp+Q92voG5mAa2JotzjTIyfNaNkHjcQ sGxO/QUR2g2pTpKTYeSjr2vwIBW70OB7VHwbOFFy8jcs5rblmCywJalWiZ11Z0Kzbe1b iVt9PVEf28ISwUx/9/S5ZJN0b6Q0Vl/YX6msOTKV0gM7vtCc4GEOVVH+y1propGyOEfK eeYEsAwUHkKFKQupUlWwrg7R7i05N2fyGPtoA1DuXb0AgAnGLU0f7HwVSBmEYI8ndXjm iloz+rFRX4mVvhh/aqjV+akOaIge6ZAlGFCBPDIQlB37PnJ5lO5dlwjVZFk0ZUniKzGq qQww== X-Gm-Message-State: AJIora91Nj4plyRDEgJ1He2eSlPmmAnFAWlC4pZFij6QVDXYQ9m6D8KE R0Z3YoE+2pWPXnJj1eWiMYkyyA== X-Google-Smtp-Source: AGRyM1uUQNEQWjdR44z78LRkoHlEiCf1or8EbTht4YGbpfH+SD/J0FY29kejQL6sIWtaeRRaRPl/pg== X-Received: by 2002:a17:902:e945:b0:16b:f802:1660 with SMTP id b5-20020a170902e94500b0016bf8021660mr1396319pll.7.1657682035747; Tue, 12 Jul 2022 20:13:55 -0700 (PDT) Received: from [10.85.119.42] ([139.177.225.235]) by smtp.gmail.com with ESMTPSA id jd9-20020a170903260900b0016a109c7606sm7512364plb.259.2022.07.12.20.13.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Jul 2022 20:13:55 -0700 (PDT) Message-ID: Date: Wed, 13 Jul 2022 11:13:51 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2] mm/compaction: fix set skip in fast_find_migrateblock To: Miaohe Lin , linux-mm@kvack.org References: <20220712072745.33870-1-zhouchuyi@bytedance.com> From: Chuyi Zhou Cc: Andrew Morton In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657682037; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FDMapggaMDfUiCJjj7yT97cgt15vksqtjWaCxfe9SUc=; b=AQaFgTnDfIzvUjlk7diUWheElLMvEl6Fg6KcKoekaVERlW3w7e/cuNJmUeIBTjRZ6YXFBk gG7BUIo8JUSNx/5IzSZACX0eZQT64dJDO/DyQDIjabl9KdMInKF4yHj7VoiUEBcQpIwpaI I6emFC24qSJZxdRFJoJvrkm2PpssDtg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657682037; a=rsa-sha256; cv=none; b=KT6+lbxV4sROCBJIsQoZ/d6ttsR5uztPugsO+BsJ4GtB3o5MhLjHjrnnrAB6C3w1lRzGog yoPCH6GWXdJtgjVNyIRGhVLYpdA8BjH/jcMinUdQ5LtQIujMu/jMuIm5BLcRyAGyjcT9zd MA2JepCUh999Z6TFzhf6eQwxKTPBFO0= ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=RtunqkIQ; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf31.hostedemail.com: domain of zhouchuyi@bytedance.com designates 209.85.216.45 as permitted sender) smtp.mailfrom=zhouchuyi@bytedance.com X-Stat-Signature: wiqdnwsrqxi46aa7zrej91dyewnrmou3 X-Rspamd-Queue-Id: 05D7120068 X-Rspam-User: Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=RtunqkIQ; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf31.hostedemail.com: domain of zhouchuyi@bytedance.com designates 209.85.216.45 as permitted sender) smtp.mailfrom=zhouchuyi@bytedance.com X-Rspamd-Server: rspam05 X-HE-Tag: 1657682036-421569 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 在 2022/7/13 上午10:23, Miaohe Lin 写道: > On 2022/7/12 15:27, Zhou Chuyi wrote: >> From: zhouchuyi >> >> When we successfully find a pageblock in >> fast_find_migrateblock(), the block will be set >> skip-flag through set_pageblock_skip(). >> However, when entering isolate_migratepages_block(), >> the whole pageblock will be skipped due to the branch >> 'if (!valid_page && IS_ALIGNED(low_pfn, pageblock_nr_pages))'. >> 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 flag 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%* >> >> Fixs: 'commit 70b44595eafe9 ("mm, compaction: use free lists >> to quickly locate a migration source")' > > Thanks for your patch. Yet something to improve: > > ./scripts/checkpatch.pl v2-mm-compaction-fix-set-skip-in-fast_find_migrateblock.patch > ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("")' - ie: 'commit 70b44595eafe ("mm, compaction: use free lists to quickly locate a migration source")' > #101: > Fixs: 'commit 70b44595eafe9 ("mm, compaction: use free lists > to quickly locate a migration source")' > > total: 1 errors, 0 warnings, 7 lines checked > > NOTE: For some of the reported defects, checkpatch may be able to > mechanically convert to the typical style using --fix or --fix-inplace. > > [PATCH v2] mm_compaction fix set skip in fast_find_migrateblock.eml has style problems, please review. > > NOTE: If any of the errors are false positives, please report > them to the maintainer, see CHECKPATCH in MAINTAINERS. > > And remember runing get_maintainer.pl to get the right people before sending the patch: > > ./scripts/get_maintainer.pl v2-mm-compaction-fix-set-skip-in-fast_find_migrateblock.patch > Andrew Morton <akpm@linux-foundation.org> (maintainer:MEMORY MANAGEMENT) > linux-mm@kvack.org (open list:MEMORY MANAGEMENT) > linux-kernel@vger.kernel.org (open list) > > BTW: It's not enforced but ~70 chars per line in commit log might be preferred. Thanks for your help sincerely. It seems I should use "Fixes". However, I wonder to know why I run ./scripts/checkpatch.pl it shows : total: 0 errors, 0 warnings, 7 lines checked 0001-mm-compaction-fix-set-skip-in-fast_find_migrateblock.patch has no obvious style problems and is ready for submission. I clone the kernel source from https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable. Maby I should clone the source from another place ? > >> >> Signed-off-by: zhouchuyi <zhouchuyi@bytedance.com> > > Thanks. > >> --- >> mm/compaction.c | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/mm/compaction.c b/mm/compaction.c >> index 1f89b969c..a1a2b50c8 100644 >> --- a/mm/compaction.c >> +++ b/mm/compaction.c >> @@ -1852,7 +1852,6 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc) >> pfn = cc->zone->zone_start_pfn; >> cc->fast_search_fail = 0; >> found_block = true; >> - set_pageblock_skip(freepage); >> break; >> } >> } >> >