From patchwork Thu May 25 12:53:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 13255183 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 85AF8C7EE2D for ; Thu, 25 May 2023 12:54:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B3B1E280001; Thu, 25 May 2023 08:54:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AE9D3280002; Thu, 25 May 2023 08:54:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 98A1C280001; Thu, 25 May 2023 08:54:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 762BA280002 for ; Thu, 25 May 2023 08:54:21 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id DF07DAE5F1 for ; Thu, 25 May 2023 12:54:20 +0000 (UTC) X-FDA: 80828770680.08.B5CE494 Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) by imf11.hostedemail.com (Postfix) with ESMTP id CA9144000D for ; Thu, 25 May 2023 12:54:18 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=none; spf=pass (imf11.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.98 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685019259; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G6LTpZvzHfBwjs0sQGnuwspELdetmSx1jF49jzAUX2k=; b=XMAlBHbKk5qfXZ2oXryVKDdq0Gwi5dTtyIasOLd35vNibC17AdkN6Vkn6WOMbszS4/5LOK DqPoZ3pxRWkZGohbKSlA6JMD9o4sF8rxWeVUZFTjjMi9tScxovLRnaChJbZ05VTttvL7OD ctiAcYYcn+xw6/kKJWa+YQ2K/26AZYU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685019259; a=rsa-sha256; cv=none; b=DkyDElHarnAfLRQz4JdzC9gHSYiGDZ2VblNjFompE7AFbOvOu12XPTzu0jze5xX07YRG3o oG2z1S8+xgJVHfaR55dIJm8RUev5ZlW4f/JGWbflYkPlihkWzMXTQMJ7MyMs6lOahtEYws xRqEUUA8HZkwrbFtqlqCZPdImbN/Mt8= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=none; spf=pass (imf11.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.98 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VjSJ3hf_1685019254; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VjSJ3hf_1685019254) by smtp.aliyun-inc.com; Thu, 25 May 2023 20:54:15 +0800 From: Baolin Wang To: akpm@linux-foundation.org Cc: mgorman@techsingularity.net, vbabka@suse.cz, baolin.wang@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/6] mm: compaction: only set skip flag if cc->no_set_skip_hint is false Date: Thu, 25 May 2023 20:53:59 +0800 Message-Id: <0eb2cd2407ffb259ae6e3071e10f70f2d41d0f3e.1685018752.git.baolin.wang@linux.alibaba.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: CA9144000D X-Rspam-User: X-Stat-Signature: tw8zbzao96pa8y5cw5ggbkpzpfbji8iy X-Rspamd-Server: rspam03 X-HE-Tag: 1685019258-866050 X-HE-Meta: U2FsdGVkX19ZlsLrBwce27H9kSF25Sdxggsg5N7fo92u9y+Czs72iyH9Tn575L1OXqPccjZ5UwlHNM13v9cj5oY8vZM4cQyGfab+0ejYBY3eBxOY1uH3NfpZIzsvZ1YsIDEMJPqOt+nqUJqEtcYr6gx9y0KQepsV/WuPS7mxxsC+L3LEHKFLJlf8hcNhvF7y6CMLOXTVGjXAU5HkMwxH/p9H1IQH567PnxqVaKGKlK68J+8LSuKj4OgiQumyloJdag+xpMUsMTM1Vr6ekErfxt9M7I6q6/v8J57g6ZNOavgJwbYWEPobbZscfhwtOnuMWgNlYLdRK1Qqfp98Lh7JmqOMTT23VX/UC1kW2LnQq88wS04j4xBy4Yzj/sruQXEpNn8OabGpUZjPmj0r53d89cG1cEvD0AGmlKD7JvI5ndMRzzdGemUpyAoIdZrIkPy9W7rbEdf88ELZJv/cG44UAoso6v8zL3J8JGQgT5/6TyPmTsMA4UTnk/i9Y/nayROHjOEfaQZ0fPl6pMudGLm7e8q0KZfqyhPf9d1f9HxNec9e4rkes9tAOYVO9muJCdHrg6SdLwFZTP9NZ9nF04gujjoAATt1PUdYECSc78BGYYdjhuff08asid5+qC8VIwEnJMZO+wHKQERRsVyTCXHKBicBLKmMrAFk5CDP3304WhTRlV61NzXdW83CkcNDr42tF3hqMWUadzm2gM3ZV/6CyNjlade/1nkmtNuhr7GN8OzKDczqKMpshn55fP9B6gM6NAEiDwF+DzOjW3Q01bMNO1s78w/mdhUsuFvjvQEXHBbNf193JRASgEGznWt3GXRTmhd/DJhZKvmpdmW9WbyN4jptbiVdFSZb4eQlk3csFErdqmyX6B8FoYmYAfZ7pDuj6lU2le+HM3409LjI+K9CNF9GBZPfg0ggBbSBssnwygOw3P2WSOpieWznP4FTE3k658Tjqys31lBpQZUwn1q ZMLT+jBv b/WQFBcHWq/lHh3b2QT246/H9L3MrqkUuI6oMhSx3qJBzjc4eANckfu4Z77VCNsP8lpg0W4uib/rrBnNI/wkc/euk4sc9W21+JlGEu3SRNUT8VtUgWiL+ULQqGMvYZrbCHEon923WZd8ygIo= 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: To keep the same logic as test_and_set_skip(), only set the skip flag if cc->no_set_skip_hint is false, which makes code more reasonable. Signed-off-by: Baolin Wang Acked-by: Vlastimil Babka --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/compaction.c b/mm/compaction.c index 1e5183f39ca9..65d8d9223acc 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1223,7 +1223,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, * rescanned twice in a row. */ if (low_pfn == end_pfn && (!nr_isolated || cc->finish_pageblock)) { - if (valid_page && !skip_updated) + if (!cc->no_set_skip_hint && valid_page && !skip_updated) set_pageblock_skip(valid_page); update_cached_migrate(cc, low_pfn); }