Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3321069lqp; Tue, 26 Mar 2024 06:17:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUv9j7a/0EQ/j6wlDyvQLs40ECU81jA8n9zZgBt9tUnEZ472woXaZd6yWjw8OzA5CHaWMwWezO2TZXgeb/dM0UkFQD+X6KU1yBdc0blhQ== X-Google-Smtp-Source: AGHT+IEH39GzRJmFgWJCJKI0XEArutu2A/7yI1LS8AZ9HgshUtO9Uo5wQH1zOgl94IhduH8HY4Io X-Received: by 2002:a17:906:53ce:b0:a47:3526:81a3 with SMTP id p14-20020a17090653ce00b00a47352681a3mr855762ejo.48.1711459076474; Tue, 26 Mar 2024 06:17:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711459076; cv=pass; d=google.com; s=arc-20160816; b=aUOrO6HwZ/IL6N6TX1mC9BX9fb1ny3rkV8tcfamIaQFSOxi5kM1KM339mZxpnaunFs 9JXjTY8X36qMKbe0xw9XupDkoGXJYXF/taqPshAtZVcP4YMFNK5yxcaQUAR5DX40wSvv akPn0h3VV/aRvqOAFM/xTBK7cf+7UHa9sWF0giFjZetZkfSyF9/7bcNrVtxrSJklJk7f gBXhF2NPDuhIdsNUgDnygEVHYT3HL/B/0B8Z13vpFS5RxkY4A7Lu1LkDQJ3+MMHShXua AdqjdH2WiguxOeMbjTsm7ZqRrd5U0QaCV+ftEDN6QnGSNdO+qyaAWGoEbyzfyK0PBYN1 6Jjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:date:message-id:from :references:cc:to:subject; bh=J0kF/tvMTxOE4wHckY4TKUxoaAoK5tEOS6kSjFqYUsQ=; fh=ytAxz69HzZPbZXQQ+QtSjowkGdz4aZw5JOT0me23EF8=; b=quwdj0vbCGImnbSNU408ADtXiWbc3Jy0kfVp32/hSDpY2T1zXhFskS+3KUYwV6KdQ+ QeiIrSgLZ0zZziVniGVo7HKCzoFZADii50rschmGNrC09yFTRVpMHs3KggHH78K93wP6 5ETaiyRjBdEpu757gmTvAvmgnQGNNJZeW3kJbfU/bTJsfkICm37cOzvaqQvdk9xRpx8O zm+C7qmdHET4ZxYUQHMnqxloFu9AnkdyKhweo4AViCVJ2XXI5vMZUAs/G86wkOjrgXQC UuSXbpollO+no5aAMbIjEtpVegzdFEKnkVh6DwapZw3NmtJND3xyzRbeeKfg6XijkIQD HiDw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-119047-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119047-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g3-20020a170906198300b00a466a1f0812si3537810ejd.177.2024.03.26.06.17.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 06:17:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119047-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-119047-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119047-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 380DE1F34528 for ; Tue, 26 Mar 2024 13:17:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF60574420; Tue, 26 Mar 2024 13:17:45 +0000 (UTC) Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1342267A00; Tue, 26 Mar 2024 13:17:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711459065; cv=none; b=oDKxboh+HoZjz7Qbgh5ARR5YzcAo1BDhZhZcbhXVKhCnOby8uYouk8LoHJ/7B4sx6j2mYScU/mCe/bmyxQloRoXckgM4K94mF1X9qshcpqAAnWe3cC3+Sipz3kIz6JzgM6hnXhKos4NVSOMRSeH3x6KhiUwWknyKOgFpU2Ubcl8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711459065; c=relaxed/simple; bh=ndHjaV/rVUIwd/4CjCvA+hMzKMiCuqACQXGueoTMwNA=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=MOVC0TviOiDtp1uh/IrxxWD+d1GxvdX0sOs4v4gvGH8P6S93s4atgKHKAZ91HEs8jCse64J+YVuGSVPbZcxXjuKrVkjajjkwHWwQ8CIsSIQJSC6j08ZUcTBhDcjtEx4oKLODHt0cZF4t+CF0VuR7OWtnbpHnXjWDxeTInE2q6ys= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4V3r224nH7z4f3jLm; Tue, 26 Mar 2024 21:17:30 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.75]) by mail.maildlp.com (Postfix) with ESMTP id C2C201A0199; Tue, 26 Mar 2024 21:17:38 +0800 (CST) Received: from [10.174.178.129] (unknown [10.174.178.129]) by APP2 (Coremail) with SMTP id Syh0CgBHtwrxygJmG1g9IQ--.29068S2; Tue, 26 Mar 2024 21:17:38 +0800 (CST) Subject: Re: [PATCH 6/6] writeback: remove unneeded GDTC_INIT_NO_WB To: Tejun Heo Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, willy@infradead.org, bfoster@redhat.com, jack@suse.cz, dsterba@suse.com, mjguzik@gmail.com, dhowells@redhat.com, peterz@infradead.org References: <20240320110222.6564-1-shikemeng@huaweicloud.com> <20240320110222.6564-7-shikemeng@huaweicloud.com> From: Kemeng Shi Message-ID: <82ade435-3ad8-7628-4c1d-09399ebdec49@huaweicloud.com> Date: Tue, 26 Mar 2024 21:17:37 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 7bit X-CM-TRANSID:Syh0CgBHtwrxygJmG1g9IQ--.29068S2 X-Coremail-Antispam: 1UD129KBjvJXoWxJr4kCw4fGFWxGw4rGr43GFg_yoW8Xw4rpF 4fJ3WUKay5Xa9a9rnFkw4xXr98KrWxK3y3X3s0kw45CFs7G3WfGr1jq3yFgF17Ar1fJrn8 ZrWxtas3Xa1UA3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUv2b4IE77IF4wAFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4 vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7Cj xVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x 0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG 6I80ewAv7VC0I7IYx2IY67AKxVWUXVWUAwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFV Cjc4AY6r1j6r4UM4x0Y48IcVAKI48JM4IIrI8v6xkF7I0E8cxan2IY04v7Mxk0xIA0c2IE e2xFo4CEbIxvr21l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxV Aqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q 6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6x kF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVW3JVWrJr1lIxAIcVC2z280aVAF wI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa 7IU189N3UUUUU== X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ on 3/26/2024 4:26 AM, Tejun Heo wrote: > On Thu, Mar 21, 2024 at 03:12:21PM +0800, Kemeng Shi wrote: >> >> >> on 3/20/2024 11:15 PM, Tejun Heo wrote: >>> Hello, >>> >>> On Wed, Mar 20, 2024 at 07:02:22PM +0800, Kemeng Shi wrote: >>>> We never use gdtc->dom set with GDTC_INIT_NO_WB, just remove unneeded >>>> GDTC_INIT_NO_WB >>>> >>>> Signed-off-by: Kemeng Shi >>> ... >>>> void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty) >>>> { >>>> - struct dirty_throttle_control gdtc = { GDTC_INIT_NO_WB }; >>>> + struct dirty_throttle_control gdtc = { }; >>> >>> Even if it's currently not referenced, wouldn't it still be better to always >>> guarantee that a dtc's dom is always initialized? I'm not sure what we get >>> by removing this. >> As we explicitly use GDTC_INIT_NO_WB to set global_wb_domain before >> calculating dirty limit with domain_dirty_limits, I intuitively think the dirty >> limit calculation in domain_dirty_limits is related to global_wb_domain when >> CONFIG_WRITEBACK_CGROUP is enabled while the truth is not. So this is a little >> confusing to me. >> Would it be acceptable to you that we keep useing GDTC_INIT_NO_WB but >> define GDTC_INIT_NO_WB to null fow now and redefine GDTC_INIT_NO_WB when some >> member of gdtc is really needed. >> Of couse I'm not insistent on this. Would like to hear you suggestion. Thanks! > > Ah, I see. In that case, the proposed change of removing GDTC_INIT_NO_WB > looks good to me. Sure, will do it in next version. Thanks! > > Thanks. >