Message ID | 20240123183332.876854-5-shikemeng@huaweicloud.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 A472BC47DDC for <linux-mm@archiver.kernel.org>; Tue, 23 Jan 2024 10:36:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 77FA76B0087; Tue, 23 Jan 2024 05:36:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 584886B0092; Tue, 23 Jan 2024 05:36:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3606A6B0085; Tue, 23 Jan 2024 05:36:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id C008A6B0085 for <linux-mm@kvack.org>; Tue, 23 Jan 2024 05:36:02 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 7FB5EC09D6 for <linux-mm@kvack.org>; Tue, 23 Jan 2024 10:36:02 +0000 (UTC) X-FDA: 81710220564.05.F4499C3 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by imf10.hostedemail.com (Postfix) with ESMTP id 05A6EC000A for <linux-mm@kvack.org>; Tue, 23 Jan 2024 10:35:56 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.56 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706006160; a=rsa-sha256; cv=none; b=RvxMQH2eEuf/tEI9hs9puKix4zGnM5DQLxyXOSyffPDRQtr36dHIoP1Us7Feqdtwr5brZD V6B6+JuVGn8calJuJpna6qIRgV6JbCY4nkMaKIXcae6iA9rS7feHMZgGzymgMyB1Gu7FWy rex95f5810vGQhJEThlT7DvKaHmtjG8= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.56 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706006160; 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=518Jn1m04qVNd/hB6FcaFbxdgjO4h5CJ9DcA/eDdQqM=; b=7RTNrxsINM/qY0cMCgOJyub4hasp2s8hBkB1LuhHDxXhErWKfhXFVCLl/045+rwA7MXmch RJf+21q9P2nCEv9bMHD5bDMv8N8jXqVc+wML0Cw4FdrBb4XC/NR/JzDtWQzi3G0h8zKofs jd9F2V1VI3InM7P0rcqT1ztIqn1/tgs= Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4TK3QX5Y0vz4f3khd for <linux-mm@kvack.org>; Tue, 23 Jan 2024 18:35:48 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id AC9EE1A038B for <linux-mm@kvack.org>; Tue, 23 Jan 2024 18:35:52 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP1 (Coremail) with SMTP id cCh0CgA3Bg+Flq9ly6DjBg--.30161S6; Tue, 23 Jan 2024 18:35:52 +0800 (CST) From: Kemeng Shi <shikemeng@huaweicloud.com> To: willy@infradead.org, akpm@linux-foundation.org Cc: tj@kernel.org, hcochran@kernelspring.com, mszeredi@redhat.com, axboe@kernel.dk, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] mm: remove redundant check in wb_min_max_ratio Date: Wed, 24 Jan 2024 02:33:31 +0800 Message-Id: <20240123183332.876854-5-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20240123183332.876854-1-shikemeng@huaweicloud.com> References: <20240123183332.876854-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: cCh0CgA3Bg+Flq9ly6DjBg--.30161S6 X-Coremail-Antispam: 1UD129KBjvdXoWrKFy5XrW7Jw1fXF4kXr4UXFb_yoWfXrc_XF nxtr95A3W7WFy3Ga1I9as0yrs7Kws5Cryxuw4j9an3tFyrKr1FvFs5ZF1DAw1UWF42qasx Gws8uF45ZrsrWjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbS8YFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l87I20VAvwVAaII0Ic2I_JFv_Gryl82 xGYIkIc2x26280x7IE14v26r126s0DM28IrcIa0xkI8VCY1x0267AKxVW5JVCq3wA2ocxC 64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM2 8EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq 3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8w Aqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE 14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjc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ktdzA/clrNL4citvKURtLEzYTcGZoSVp9CymRFAHs8bHUvJnPiOOmNqiweiTPP1LsRV1qdRt3MThUcltylFk2RqUfOmzKt4SZBUvUnXXjaxPlAztc9UV0Zi8qIVVrjhDgMSxIcGEjNij5wtoz6umRnwblIpxlenhWEpCHw+SFdjmiCjB11wwui5wIJtPObXsd9h5NJy5jd+dvVTfvuhwb3zGkseLS4UvTm/EAIkRdd42i5Y4sUsbixu1VYT1caZFZmzdVepRjy1/nC/b7wBaB3u0BUXDhNJTGIyxS++M/29qjeHAI31I3Kq3P1lk9l22ThJ4PN5Yt1Uq8GUhMFhnijtYxkSmUkTMR5fiwcTauoRITocELfuX1AYm28nXgJrmQKKQD0DIDNmaOlXrzASV3ceZLzmZpY2nLzZyzSu0c+nLr26NW9l npb3Jh5x 402yo56PLkR/AydL/oHEy8D5kwl/x4TJpwg5uywZWp6wEF4CFI6On2zRE69udO0Q4uiVkrr9StqEqNz0Z3DpSvcGQxitvBlTyMlk3FXKvkNsCDnFn7YBfe3MagIPgjnu0hO5i2pClZYr469CO7JLMohVGBwDTyOrL/56JVmIixcZ8annTUOBol7Fv1IvKBYHSR+rumxKjdmfg2dEyQhivULGXl8FHXB7ui22FUmfm3Jx26LqiwEZrBRaOBovfRcTulmCLrt6DyOA3gPwH/LZI1WOFiNlTkI5NWh0cDBOZC8kq9zc= 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Fix and cleanups to page-writeback
|
expand
|
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 5c19ebffe5be..f25393034c76 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -198,10 +198,8 @@ static void wb_min_max_ratio(struct bdi_writeback *wb, min *= this_bw; min = div64_ul(min, tot_bw); } - if (max < 100 * BDI_RATIO_SCALE) { - max *= this_bw; - max = div64_ul(max, tot_bw); - } + max *= this_bw; + max = div64_ul(max, tot_bw); } *minp = min;
We initialize bdi->max_ratio with a valid value (100 * BDI_RATIO_SCALE) in bdi_init and we always set bdi->max_ratio with a valid value (< 100 * BDI_RATIO_SCALE) in __bdi_set_max_ratio. So the validation of max_ratio in wb_min_max_ratio is redundant. Just remove it. Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> --- mm/page-writeback.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)