From patchwork Wed Aug 2 09:37:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13337512 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 1887CEB64DD for ; Wed, 2 Aug 2023 01:37:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5685F280113; Tue, 1 Aug 2023 21:37:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4866E280112; Tue, 1 Aug 2023 21:37:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E1AB5280113; Tue, 1 Aug 2023 21:37:35 -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 96ED2280110 for ; Tue, 1 Aug 2023 21:37:35 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6B82AB2605 for ; Wed, 2 Aug 2023 01:37:35 +0000 (UTC) X-FDA: 81077452470.10.C703377 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by imf16.hostedemail.com (Postfix) with ESMTP id 3341518000A for ; Wed, 2 Aug 2023 01:37:32 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=none; dmarc=none; spf=none (imf16.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690940253; 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=E8Ghhfo476pomQiMg5Ny4FSukhbg2Nff++sDyzBNwac=; b=0Xikjltoy/rrX4g5NahV2Mn/+mTonyxO9SIUjGQOQ12Wq9BpXGcJYkuFt9/VTLyUSHao/Y L8JY+W8iJxQZuVKL4ijV8QJ8IBkWryn39KZbHeHdWNMG/Qh+16vL0vAp3umS/zufLYcNke G88NoOeP4HfI60vTiOoujPl94Cm4NZk= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; dmarc=none; spf=none (imf16.hostedemail.com: domain of shikemeng@huaweicloud.com has no SPF policy when checking 45.249.212.56) smtp.mailfrom=shikemeng@huaweicloud.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690940253; a=rsa-sha256; cv=none; b=YCC/e672Vv6ftL3EiIsa6MDbaI14PvBIcQ8tPMOjoJKe8CYDbX8LBO8tP/NpfiBfghTaUd 7i09IN71UEJAPWC5npuvr5GYwfeGwRLEtNu26UWrb7oKptcIqYhSdYEb0sAGklqAUfhSg6 CN7G+pq6DxBMkJNWIPZX9MO6SXe2mDw= Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4RFvjf5HZLz4f3jMY for ; Wed, 2 Aug 2023 09:37:26 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP4 (Coremail) with SMTP id gCh0CgAXzrFTs8lkvrtvPQ--.56352S10; Wed, 02 Aug 2023 09:37:29 +0800 (CST) From: Kemeng Shi To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, baolin.wang@linux.alibaba.com, mgorman@techsingularity.net, david@redhat.com Cc: shikemeng@huaweicloud.com Subject: [PATCH v2 8/8] mm/compaction: only set skip flag if cc->no_set_skip_hint is false Date: Wed, 2 Aug 2023 17:37:41 +0800 Message-Id: <20230802093741.2333325-9-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230802093741.2333325-1-shikemeng@huaweicloud.com> References: <20230802093741.2333325-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: gCh0CgAXzrFTs8lkvrtvPQ--.56352S10 X-Coremail-Antispam: 1UD129KBjvdXoWrtw4ktF1DJF1Utw1kKw43trb_yoW3trc_Jr 10yF4rtw1avr93AFn8Xw47Cr1kKrWDCrnrWF1kXr4ay3yqya1vq3WDXrnrXw15XFW7ur9x GaykZF48GFya9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbDAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M28IrcIa0xkI8V A2jI8067AKxVWUAVCq3wA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJ M28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2I x0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK 6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4 xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8 JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20V AGYxC7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAF wI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc4 0Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r4j6ryUMIIF0xvE2Ix0cI8IcVCY1x0267AK xVWxJVW8Jr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F 4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0pRvJPtU UUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 3341518000A X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: h6zbcdcmp6oizzay4izh57qtxrtbnf6u X-HE-Tag: 1690940252-498694 X-HE-Meta: U2FsdGVkX1+lWAoPUA5wJB72hMKOo7EM9nkbuf9FMnXsHSuVOTthbyeE12n4AUm0/XJPSws8dRYszSWH0hVd2SdZNIbgc1mUP4GnPHgPiHIBkJMCqQvkfX94mvLlqZV/sMH9gXyncJ9tmHBH8BmToI13ZpZ2u5MBUc2Vz7RjDfjGBeKFArJLQ3krWbWG2lT8iS6JDsw4HfLd2dKVPd63NHVv+hSFw6hAXmEqZrXm5nK3ej0VnrUBCTHC6a5M0Dk6I3Pekihd+XfvPGlOEk9Izf6dxubePn2D40bcWx9e6b57lRA5u2mfwp9vs+71jKgzvdo1NBgpj5Z/KvX2TwomABgijY4TSJeFa3sa844hIWinX/ahLS6H+om9UONkLPFak/uSJ6YDT5SEK9OwZwdKP2PIAXGKoAM9wEeHtH3fLi0G7NFvwcHwlh3XzFOaP3gBFSehu8dnwU5j47TvLHEkMMK+90P8UC194qFbqN5msSx32BvyN2N0iedInJ+NJN1E16qXDRryM1alpObryMoNS4EPn+I9JMN/fRAwm5O9I/MHCnWH5EELPsJiOcg6R4M6QaDhTnDe/sB5WS0hW0+f9kuFswX64bYQiVjMX/SzD1iQ+PhUuQTd6igemWyJvdtd+9thzY8py7Aj9m52OYthNn9uEaZxxA6erWy2VAoNQSh5LDaa2GscQ6V7wT/b2Q6j6vSuvVeMwdbFo876h0J6A0A8qaiNE1Sx5sopENM781TaM4r4XyxV4SAcZRzDuaFq4fjuggtOSBn513L15AMG8/JTdT7LE7n3M6+bE2VHOiH4xLPMg1zQYpkFq4t/Oe3ymVQsCDEw7pWhCGbF27Hr/byYdKvFg5lzLGi53EU1bAaNTAbCWsV0WjnCwd4RzaI69bgRKP8BccLYroJJdA0avlw0vWCNil0S+eEmNtOP23Hj91/Vk2CQ4T2TFCLrYoSdHgOsMwImJrbg/wAVRgH h+rYfZ2J 6CHdSyGQ1HFlFl2X03X5s9ZXDWDhW+UFVIxgtZEpG0ear4Ob+O1ML1uF+VqmdsSM4bVshfpy4Xujrul1BIuXWsFtwaF2c1zn3L9ZL1Lph25gs+fiEnnZJ1YZNeumPJrCgCTBE0oRa2kxiPrperUmne0ok423DMeCQK6wnY4ECA7WliCWKaq+01ihC0ZpmVk79lxGKZ+OfJEFgKxf0dGE3aFS7DXgj8VeP4HQyflgPoUEdv6O7JqIa8jLq0WXLmY9zy9zsp3u5htFL6GLCE3kwAnncIu0kvU391gqcePfqTf8sduC6tOoVQYPiNznEWAiMb3ZcN5o/S2B1wh1mdCVNAg8aWA== 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: Keep the same logic as update_pageblock_skip, only set skip if no_set_skip_hint is false which is more reasonable. Signed-off-by: Kemeng Shi Reviewed-by: David Hildenbrand --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/compaction.c b/mm/compaction.c index a1cc327d1b32..afc31d27f1ba 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1421,7 +1421,7 @@ fast_isolate_around(struct compact_control *cc, unsigned long pfn) isolate_freepages_block(cc, &start_pfn, end_pfn, &cc->freepages, 1, false); /* Skip this pageblock in the future as it's full or nearly full */ - if (start_pfn >= end_pfn) + if (start_pfn >= end_pfn && !cc->no_set_skip_hint) set_pageblock_skip(page); }