Message ID | 0eb2cd2407ffb259ae6e3071e10f70f2d41d0f3e.1685018752.git.baolin.wang@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp347558vqr; Thu, 25 May 2023 06:01:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6EtnaxQJF3PsFWtTOqKMxm6W5xuJ18LE/UhOn/Dn0CUchOvlg/78IeBJQBOOEH10sb/y2Q X-Received: by 2002:a05:6a00:2382:b0:64c:e899:dcd1 with SMTP id f2-20020a056a00238200b0064ce899dcd1mr8390418pfc.5.1685019661424; Thu, 25 May 2023 06:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685019661; cv=none; d=google.com; s=arc-20160816; b=VdyHRU3S1Jjgkx+nPHCxv30dXoAKsdKl3slQ4bd4fUneaChV/WpHogEirSVQWR5FuQ JApbcSqdd0UMinMTpseKDCUKnQdYV5ZAYjggG+CxbLnFOcTtGCY/pvSkB2Wu7yKSPZSr uqFuUCce1+tTCYZEXxX3IXo6OD3bnRqiCVZBd9RS6wJ8vkzgEAmX1dtTgDxK7bjlX3Iq jOnXaHOiM/wdsOQgws3JKUXiWi3vR6CfWqRq4mZKalX7m0+gGqBtIbUQSlISxeVgX1AE RR0VckakkQinJEgvGtQl0BiPLX+o7B2OnErAILcpxKxccDJfcdLl6B57lW1QYBSRwhEf HCcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=G6LTpZvzHfBwjs0sQGnuwspELdetmSx1jF49jzAUX2k=; b=wp+8fpNsd6KXT2KVDfOS65wqbAA8cexxa4SjKIfAMsR+PawXN4fgFskj9cf5tWK33O 0TY3LCnmaysT3qQL0NQlzP/1PNsNlpluZYXaU3ZG5rEW5FobgLCSJmc3DOZ3CzsOBvJn qlFucV/1ApBGffsUu2BChZ8FcZp/UCqRMECuuLkxEskp6mtFLWsRs3WAXrdEZ/9DQStO QlzFxZunjQOSDMNr5CaKNXjzEKb7+gJCzisbV1uKnpi29xmNl344Ji7NSXIcq4m57GB1 mquJ/Wi8X5dQaSXAVsaUayZMp/jcCJz/DKl8k+mmklCfOTgPfkAGOKwUmzlfSXkj2huj SjsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h62-20020a638341000000b005192652814bsi1144405pge.541.2023.05.25.06.00.48; Thu, 25 May 2023 06:01:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240973AbjEYMy1 (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Thu, 25 May 2023 08:54:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239813AbjEYMyU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 25 May 2023 08:54:20 -0400 Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0A44183 for <linux-kernel@vger.kernel.org>; Thu, 25 May 2023 05:54:19 -0700 (PDT) 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 <baolin.wang@linux.alibaba.com> 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: <cover.1685018752.git.baolin.wang@linux.alibaba.com> References: <cover.1685018752.git.baolin.wang@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766871176809074202?= X-GMAIL-MSGID: =?utf-8?q?1766871176809074202?= |
Series |
Misc cleanups and improvements for compaction
|
|
Commit Message
Baolin Wang
May 25, 2023, 12:53 p.m. UTC
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 <baolin.wang@linux.alibaba.com>
---
mm/compaction.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 5/25/23 14:53, Baolin Wang wrote: > 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 <baolin.wang@linux.alibaba.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> > --- > 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); > }
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); }