Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp913988rwd; Thu, 25 May 2023 05:55:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7UHaSOlDaslkrEndi3ChCRLQxxB+VGUSHdsCkp6o3+JzH3KZFCGUEL2U0nt01sZsLniUrG X-Received: by 2002:a17:90a:b804:b0:252:e7db:66df with SMTP id n4-20020a17090ab80400b00252e7db66dfmr1408573pjr.49.1685019330647; Thu, 25 May 2023 05:55:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685019330; cv=none; d=google.com; s=arc-20160816; b=qliLEcyJ67+zZxF4T9ctsNV8QTSpOO6vbVCC5uLpjm5rZOHBSyvsSrY79RyCHk1gGi I3MmagIDnvbvxYSmudW5TtHyelrGr+/HisKECsqbVordz49hKGjRawc5ZPtH3E76oaKp n+51ZwEkltnEcVIkn2HiQUsH4WmfBFx8+dBiIfhemtA19resnjHqJYGRGF7btrMuMZjT ZgKZSd0Nwx6wi44tcetqOX1H7nLKuN43bmwBkQPQyWslL6kHZPsw2o+thfkZ6cEbaftD JUfTgsVOBqnbX4V5VUpbytV2K7WOcekJ2uby8KOCcF66+sihz+m10Guf/CbP1nd1+SOS 47PQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n16-20020a17090aab9000b002476be78cd2si2024343pjq.121.2023.05.25.05.55.18; Thu, 25 May 2023 05:55:30 -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 S240847AbjEYMy1 (ORCPT + 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 ); 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 ; 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 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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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); } -- 2.27.0