From patchwork Wed Mar 20 11:02:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 13597199 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 BD795CD11BF for ; Wed, 20 Mar 2024 02:06:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 83B336B0085; Tue, 19 Mar 2024 22:06:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5337A6B0093; Tue, 19 Mar 2024 22:06:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0CF516B0089; Tue, 19 Mar 2024 22:06:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id DFC1E6B0092 for ; Tue, 19 Mar 2024 22:06:13 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id B29FB40CA2 for ; Wed, 20 Mar 2024 02:06:13 +0000 (UTC) X-FDA: 81915777426.25.651B6C3 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by imf06.hostedemail.com (Postfix) with ESMTP id 3AEF6180007 for ; Wed, 20 Mar 2024 02:06:10 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=none; spf=pass (imf06.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.51 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=1710900372; 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=L6F1kb9dEM3TGKXFoDgePIuxOyYzETiaBERGPX18KeM=; b=7sERTMrwOFLnVGEiVOCoLZSnUWkd2f0rqcY7SO1N1AssV7J94riz7uwiCDUCbrMY4kxyYr tvCRU3agZQzlH6KokZ3wnBuU5F5ja5yymJkHXaWKKSB0G0iWPTuF3C5JAJwxFqGZk1KSOs eA8Ane4wXV7ISw1c+HRCl1CSbd0CohA= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=none; spf=pass (imf06.hostedemail.com: domain of shikemeng@huaweicloud.com designates 45.249.212.51 as permitted sender) smtp.mailfrom=shikemeng@huaweicloud.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710900372; a=rsa-sha256; cv=none; b=dxtUbfKCFWHcxFFX4BGmn4cDenpGtlC2pg/9GSYOXncyXYQAQTQ7bgPHSFDgj81u0MXkYC zxa7PrnAvS7oYFcUM9KECzt+vaS2wmtyW5AQvsyZZ6JGsuoWU+E+TUorHYryc68q5nBduy naEzKWqPHTTWOMhziivq9IBziNIDMqc= Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4TzsPz4lr5z4f3n6M for ; Wed, 20 Mar 2024 10:05:59 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.252]) by mail.maildlp.com (Postfix) with ESMTP id 9424E1A0E4C for ; Wed, 20 Mar 2024 10:06:07 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.101.6]) by APP3 (Coremail) with SMTP id _Ch0CgAHFZ2KRPplVj2CHQ--.18626S8; Wed, 20 Mar 2024 10:06:07 +0800 (CST) From: Kemeng Shi To: akpm@linux-foundation.org, tj@kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: willy@infradead.org, bfoster@redhat.com, jack@suse.cz, dsterba@suse.com, mjguzik@gmail.com, dhowells@redhat.com, peterz@infradead.org Subject: [PATCH 6/6] writeback: remove unneeded GDTC_INIT_NO_WB Date: Wed, 20 Mar 2024 19:02:22 +0800 Message-Id: <20240320110222.6564-7-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20240320110222.6564-1-shikemeng@huaweicloud.com> References: <20240320110222.6564-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: _Ch0CgAHFZ2KRPplVj2CHQ--.18626S8 X-Coremail-Antispam: 1UD129KBjvJXoW7WF1xJrWxtF1rZw4xXFWxCrg_yoW8Aw1UpF W3Cw1UKF4UArsFgFnxCasrXrnIqrZ7tFW7K3sxCw4ayF1xG3W8WFyjkw10yr4UAr93try7 ArWxtFyxZF40yrJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUPmb4IE77IF4wAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M2 8IrcIa0xkI8VA2jI8067AKxVWUAVCq3wA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAv FVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3w A2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE 3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr2 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv 67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lFIxGxcIEc7 CjxVA2Y2ka0xkIwI1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2Iq xVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r 1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_JFI_Gr1lIxAIcVC0I7IYx2IY 6xkF7I0E14v26F4j6r4UJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aV AFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZE Xa7IU0TqcUUUUUU== X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-Rspamd-Queue-Id: 3AEF6180007 X-Rspam-User: X-Stat-Signature: qznwxzwxngdgsy4trn13skjku3qzersi X-Rspamd-Server: rspam01 X-HE-Tag: 1710900370-229557 X-HE-Meta: U2FsdGVkX19niSrv4Wcluq+I/VZ8boKBIwJyCBylGjxIl1EVp/bKq8uoUBSOGHud6yG3HLOifZsRpZt/exPsVJObkvIa8oFOV9b67gbx1BeJZisoeVy4xBycfIro69cXvIEw/7gx41Hvae8q4grIKEOJrL3OHBvO9ROnD6m9N9R4heUUw6ZX3e7t0qLyJG7/VvQYJ4o76dybsvhlkHJB9RUX9vom12YyBGr29u4zSr1531MUt0iv5SXwTRh5E5UgCmw9W7DmGdz/sK5cC0YGYX/ag3pZCKQ4zdjDtA58McElbCgnbnnLOywQJRoQaHYFLFIialZ2oEYsPkXI0MLi51ZZppzLsWE/RECqdoj3r/1Cm27HW7uRZzgmpUlAw5t++9ozF+eDzq+RhUOKS5O0/eICCHrtmJQArQJNlDJtXGsYcRnESNv17Mt09qYFTFni9cJI63DkhTemxWYDeKNrj1G1n2F+j9Da7TgxcZ3+tebHgEOAbmHTZ8ADWTStMQxAl2u3G7FYHJ67cdY5iEIWRbsg5yRuM+5J7WDXvErw7pPv/aBQim2vucdKyqaJK54nAxq5ly3rWuBpWHvvFfjO1Bw67lXb/ww8re7Foh5/i1yMremqL5mfjwUN5VjKW+PG178zKQyYTqJx50Y7Nt5kuNAHbHh3GUaA3tepjXYoXy/xaBEbwpDVgkXf1Yg9BLYS1+8GlztIcZ0S7i9//5bWRWAT9o9yGY0b/cRWS/sDqzPoJZ/YeYFbjEpYxJt4VNuTFfbi5ebaV6PLYam41Bec/73cPTFaP1Cbwjg3vI1z2Ik0WSppyke2yrJzNJ9xoLT0dyOduufnYq6jze8J/2iK81gU5Jz22R40wmO7/Cn1zr5zPFCxib1VnqiMN2soOBN2Ke5Ep86esRTyCpK9UOcrKsoydqdLVXHfeBS4UKWFLleSx9D7ZYKkiaSI2w0VsiPdyiS6D8Zn2tm6xWyNfQi kB1BznL5 aWnWbVMhX6RtKXRJDg60w/PQCsy88o/MyeW+DOy+/B9VZnDwjnjVlpr/dRtwVuFjsoM6X1sY3z/5Q+zob3sIO0HJ+zHyeyjtnIdpywBkLcbDuMrXVCiDOGjKXbXwnqA8Db1ZhbJ3sM9+mSCnkQW0w0J9JnNw67wA73yUxsK/13SWCIshagqXCGCHCcDstAU5yHks3kBL3LbYP7fP+DD7P5lzQ9leRnHTQcBSSnNwsxGoPScxCeey6vFarPI7F2Zpold4+ARAvDUZRRgA15VH9FvwH5//vW2lp23Mp5DZu5rdSHmx6eeaLcXkggg== 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: List-Subscribe: List-Unsubscribe: We never use gdtc->dom set with GDTC_INIT_NO_WB, just remove unneeded GDTC_INIT_NO_WB Signed-off-by: Kemeng Shi --- mm/page-writeback.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 481b6bf34c21..09b2b0754cc5 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -154,8 +154,6 @@ struct dirty_throttle_control { .dom = &global_wb_domain, \ .wb_completions = &(__wb)->completions -#define GDTC_INIT_NO_WB .dom = &global_wb_domain - #define MDTC_INIT(__wb, __gdtc) .wb = (__wb), \ .dom = mem_cgroup_wb_domain(__wb), \ .wb_completions = &(__wb)->memcg_completions, \ @@ -210,7 +208,6 @@ static void wb_min_max_ratio(struct bdi_writeback *wb, #define GDTC_INIT(__wb) .wb = (__wb), \ .wb_completions = &(__wb)->completions -#define GDTC_INIT_NO_WB #define MDTC_INIT(__wb, __gdtc) static bool mdtc_valid(struct dirty_throttle_control *dtc) @@ -438,7 +435,7 @@ static void domain_dirty_limits(struct dirty_throttle_control *dtc) */ void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty) { - struct dirty_throttle_control gdtc = { GDTC_INIT_NO_WB }; + struct dirty_throttle_control gdtc = { }; gdtc.avail = global_dirtyable_memory(); domain_dirty_limits(&gdtc); @@ -895,7 +892,7 @@ unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh) unsigned long wb_calc_cg_thresh(struct bdi_writeback *wb) { - struct dirty_throttle_control gdtc = { GDTC_INIT_NO_WB }; + struct dirty_throttle_control gdtc = { }; struct dirty_throttle_control mdtc = { MDTC_INIT(wb, &gdtc) }; unsigned long filepages, headroom, writeback;