From patchwork Thu May 25 12:53:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 13255182 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 C180FC77B7A for ; Thu, 25 May 2023 12:54:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5E134900005; Thu, 25 May 2023 08:54:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 56A8A280001; 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 43252900006; Thu, 25 May 2023 08:54:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 33C23900005 for ; Thu, 25 May 2023 08:54:21 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id F0E56AE5AB for ; Thu, 25 May 2023 12:54:20 +0000 (UTC) X-FDA: 80828770680.10.F0BD917 Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) by imf01.hostedemail.com (Postfix) with ESMTP id A685640010 for ; Thu, 25 May 2023 12:54:17 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf01.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.110 as permitted sender) smtp.mailfrom=baolin.wang@linux.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=3zql6VrCbwQTXhnkE3JZRhUnjSXniNlSH3VFs4iHJ90=; b=NyM2XW1oa10BcGB3XHR3VeDytq6lk0pHqB6gGLbc8EySayyznkzWXmZUGhCqSpZZ86NbSi e6xJXHvgrK58H1Etn7UildiYqTN/afaAdw1lg5UGgwbn3aAJyylmSNzhn3a1GrdTCtLZbW bqMV74Y8uPgY5SsTdTRoFCPiRzjw4rw= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf01.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.110 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685019259; a=rsa-sha256; cv=none; b=ubLIfsA3PkAPfh7jPwA5uOeQ8GDoYJIDurv7qb3pMNkB1jd+BR0273wSRqU7xjbDeNm8Dh NqJIXOyh8rPNhM2A49rLRLI+nEvmXBsvCvqwBBx+rFmmF4Vrlz74FeshYwZRFwEx2NBpP8 d+TUvmXEbqZ+BC0Nxi3co+yh+ZPyQH4= 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 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: References: MIME-Version: 1.0 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: A685640010 X-Stat-Signature: h85ohcybhamjgto6gtyfrrji9k49rq1o X-Rspam-User: X-HE-Tag: 1685019257-338848 X-HE-Meta: U2FsdGVkX1+0M4wsy+T+lFzfXcTKLLiqcBfmkIW4oHdbedE7fa8U0cn6zTvDlkkXh1gZJFCBz4sLbEb7JrSUZT7Y5tUrqVlxOFPYtHx05tp0ujg4q2LsZS9djkQb+7n0+JqnUIfQrfoSqlPc7OpU2184ph1jyuBlvZUWN1wVGY+L67rZcMiC6TMlXvZ7Z8Chkfv1XrrIYxNmaZE5M56SVvzWXFtSlaNE/ShXuyeaT82LMnvZyqj+uGhgTly0G2mAeoNVR8zhwvMI6b6OSiK/WLQHzdJ7mS+WcUmlc8RG19MnVZZ3YU34ARB4zRfACUB4myAFdBCHtPpTDSjMU/8FuMmr3ofiSXsWFNb04YZ0ghF9gpMSYeVsSdp4jjuxBzIl68qmKKpDIL+MrFdLidbMuYnt0ZDkMT7h2RWxuVsEx9nRdBdnWlHj8MTKm5g3R3JAfqZH+hS00RiHIkV3wfziUZu9JTFB+1SpOTHbO4W4vphxj6K8ok0576Ag2nxkQgEFiy8+plEKe+cdNRb/XM55WQqlUKQADIKRF5wzQoc641Wm5prMvJQYuKWhxDGDZhZBZegO8U1JsNPtx8/9CA5cSVlkEJJKJfLjomi/YWj6WGxqG7+8cd7kbBamAy6FhBkGZFR2eRYhMAYPcVhLyk2pLLJxiyLogrUdRriGui99J1H7TDdx6PDYLQeNTPGkK5DcHiIaUL+ixhIWacVUsLt/YFgFhlCPOfOPg/da1jbjxS5tV/zkKRoxWxScgofUllT9QhLGFTkavo2ZhN6R+LWoaQYis7DevX6Y9HpU2C6xo5XqONxtoGrz3eX9ln4zP0qGqsXF6711m/ZgPQOU0J0BOXix8Rd5iTX0ndtamEc+5NLA6gG9bgV0Zx9oFI1+GQdnUFM0EjIastm2IzZzXvsmO7lBQIqdKe7gQTeYFhazLd4T3fqhc4rnQ/Uore4PI+xgYdon0Vqflka9ha0oBdy v3Ob2drY PrI6PuTTvhpXQKycRpSviKu4S2/OHo+3UWdW5Qwv3OGaF+StW0KZRrp+M2LDHwIp42wo30SUW2yQuENvwl+calTjL82PyGQZpi7qSAYZtvXzFbkkC+ySdi8zp4+W+jNc2kw1MiHuTo2szROo= 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: 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 Acked-by: Vlastimil Babka --- 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 */