[1/6] mm: compaction: drop the redundant page validation in update_pageblock_skip()
Message ID | 5142e15b9295fe8c447dbb39b7907a20177a1413.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 k13csp348062vqr; Thu, 25 May 2023 06:01:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5a5vXWN5/YpNEUEMtbLxvAPTHqgfBdgalK1nQxddmrZ/ibjTGp7BF9+hwGg+hQqmrkw/r1 X-Received: by 2002:a17:902:b204:b0:1af:eb1c:80ba with SMTP id t4-20020a170902b20400b001afeb1c80bamr1535552plr.8.1685019693442; Thu, 25 May 2023 06:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685019693; cv=none; d=google.com; s=arc-20160816; b=Lsz8zRzJMGrNH3etqaFMK9f8uLa56gVWACHr02ItSwrpFPHYBVhv+n7BuoSx4k4g9b LbHwie0SA0xHa4wTg1FuEdcWm/XW1zxZgiXfkqEIf+NPwsl57ie84ioyTc1Lk/7i6eez 5xaxeHMq4DRiqvZAZbP5s+Q9at4lilRiMs0t3Cr0X//fYuTHz+/NtRpNtGAnGIn+TXxM QcvbJ7lcuTHCkVYDuJnUapkEsXcpkCF69Nkpo7TZyYXavZC/T4ny+IalTrJp/vcP5haG 9xiD0VfbgvtI6o7W7wsPwMtRC6RcsIPxEyjtKsxd7YyHIwcmKFx2izVfke+7BBvbR59H 0tZA== 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=3zql6VrCbwQTXhnkE3JZRhUnjSXniNlSH3VFs4iHJ90=; b=lWlpIhR0mTzFb3JP4l5QCr+gxF1Dto2I74JXtl+SYDA9+KTmfzwHVe68Z+JoZJ/lwI eJJIvWXqOsFN7bGZwzMLEvKBTwuEADe2tKjTUWELnzWkimq2wL7tutxGB9k/tZm+9c1t LFBCa3GFgie3QdfxSrvUjo5n6UNJ2hGjvqQGl/L3YYRyLkXaVzn81Rywz3asQHgeo1iI eAJD+8F4GKPa+LFmnRb73uPZLZPxov3WbysI2MlXZg9pSFs97WHt1OUXk4qOduPA3gWW i3dKNcOXhcqAsdZdgsKxoNEgvUFODpdvnT6zmRGN8LRuR9RtA0Lj5F7gIrzGLhoBt9lM +sVw== 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 n4-20020a170903110400b001ab23cbe13bsi1537835plh.104.2023.05.25.06.01.17; Thu, 25 May 2023 06:01:33 -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 S236025AbjEYMyT (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Thu, 25 May 2023 08:54:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231263AbjEYMyS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 25 May 2023 08:54:18 -0400 Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EB7B135 for <linux-kernel@vger.kernel.org>; Thu, 25 May 2023 05:54:16 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VjSNUk1_1685019251; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VjSNUk1_1685019251) by smtp.aliyun-inc.com; Thu, 25 May 2023 20:54:12 +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 1/6] mm: compaction: drop the redundant page validation in update_pageblock_skip() Date: Thu, 25 May 2023 20:53:56 +0800 Message-Id: <5142e15b9295fe8c447dbb39b7907a20177a1413.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?1766871209850345222?= X-GMAIL-MSGID: =?utf-8?q?1766871209850345222?= |
Series |
Misc cleanups and improvements for compaction
|
|
Commit Message
Baolin Wang
May 25, 2023, 12:53 p.m. UTC
The caller has validated the page before calling pdate_pageblock_skip(),
thus drop the redundant page validation in update_pageblock_skip().
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
---
mm/compaction.c | 3 ---
1 file changed, 3 deletions(-)
Comments
On 5/25/23 14:53, Baolin Wang wrote: > The caller has validated the page before calling pdate_pageblock_skip(), ^ u > thus drop the redundant page validation in update_pageblock_skip(). > > Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> > --- > mm/compaction.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/mm/compaction.c b/mm/compaction.c > index 163e2ec70aff..426bb6ce070b 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -436,9 +436,6 @@ static void update_pageblock_skip(struct compact_control *cc, > if (cc->no_set_skip_hint) > return; > > - if (!page) > - return; > - > set_pageblock_skip(page); > > /* Update where async and sync compaction should restart */
On 5/30/2023 3:27 PM, Vlastimil Babka wrote: > On 5/25/23 14:53, Baolin Wang wrote: >> The caller has validated the page before calling pdate_pageblock_skip(), > ^ u Ah, sorry for typos. And I see Andrew has already helped to correct this typo. Thanks Andrew :) >> thus drop the redundant page validation in update_pageblock_skip(). >> >> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com> > > Acked-by: Vlastimil Babka <vbabka@suse.cz> Thanks for your reviewing. >> --- >> mm/compaction.c | 3 --- >> 1 file changed, 3 deletions(-) >> >> diff --git a/mm/compaction.c b/mm/compaction.c >> index 163e2ec70aff..426bb6ce070b 100644 >> --- a/mm/compaction.c >> +++ b/mm/compaction.c >> @@ -436,9 +436,6 @@ static void update_pageblock_skip(struct compact_control *cc, >> if (cc->no_set_skip_hint) >> return; >> >> - if (!page) >> - return; >> - >> set_pageblock_skip(page); >> >> /* Update where async and sync compaction should restart */
diff --git a/mm/compaction.c b/mm/compaction.c index 163e2ec70aff..426bb6ce070b 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -436,9 +436,6 @@ static void update_pageblock_skip(struct compact_control *cc, if (cc->no_set_skip_hint) return; - if (!page) - return; - set_pageblock_skip(page); /* Update where async and sync compaction should restart */