Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2929876lqp; Mon, 25 Mar 2024 13:26:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWDGtjFm2D4vvt4Ji02/35dje1ibDcUKt92Ku1Cnjywnd508UuyaDMOgfzin0K2esSd0cZ/QJhx9G6r+LxpX5hWjVQif4meUEMlgoXHqA== X-Google-Smtp-Source: AGHT+IErooATmeOEjxP0qT3thqmIQJUtvwKYZpoJcgO5SKksxWWVVJA/HHxXhOyVkKl2yTt/HK6e X-Received: by 2002:a05:6214:9c5:b0:696:91d7:461d with SMTP id dp5-20020a05621409c500b0069691d7461dmr2518230qvb.45.1711398404860; Mon, 25 Mar 2024 13:26:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711398404; cv=pass; d=google.com; s=arc-20160816; b=v0DKg7ngrzNCwFfA1xgwxhRAlhoD8ZVt/781ebKypo44rrADx0bs8guzIDMRtR+lGq JIC3EJo7i0sgmv7siS/cxYzZthfFhRcmRSq9IKOyMxyNHoU8HLoqWG6EifBfvIUIkRmu 2ssENq4wewtxJtdBGCD4dN+57kvuYzdXdCOf5WBeZVBCMRq27VHdUAAB8eFJk8cG9MjO Wp19HmmdOHIwIwZXphp9GCpd7yXiQZ2OBguY8MKRTwmLhSDk7ir6lu2+w5k4L7vIJ3R5 wsZf/uCk7ZbRyY8WA++OSvuthXqaFztguaA0NCu5dvke3tDzMxE9rC7rQrR2gdJgy43t GAQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=zM//w0ZQA39ATnyT3zYBHv3F+CzIiqRVQ67zJHzHQSE=; fh=Cyb4RFmmVqhnFg1IbEG1HwwZsU5FewG5oKpgZEH3IG8=; b=QRVspxt4EUahBkBakLzuiyC8f6L3V+IxRt2MLuaZECL8XjtKMEy06exycYuBSn+Nsn 9PSevMcVe6r2PFl8yNFdEF11aAzRo+k1IMK/0F/R7RHD+dyPGkrEmEoQcyoH9X+9cVdx Oxgp7vrbMlDGY2HHockVhE95Sr2acSDUAsHmvG0ntDwPKUtqG3j2Fm5aYXOIRk+WRCBY ppYZS0mv4ScQM0NsNdECuwr1XqZ/cEyk4ZYBNeO8nUUvY2Cz1pa1yODVDXkCB6Y2Uxom nn1pJkd3Df8DoQoq1fB1bpClEqCxAWyw+eXpcWM49XSWAkcInIeiPLbkR+J1e0u+NWu4 hWXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=niXDmykL; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-117921-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117921-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gv2-20020a056214262200b0069169652ef3si3650232qvb.255.2024.03.25.13.26.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 13:26:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117921-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=niXDmykL; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-117921-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117921-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 85B031C36C53 for ; Mon, 25 Mar 2024 20:26:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C33334AEEF; Mon, 25 Mar 2024 20:26:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="niXDmykL" Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91FDE433CA; Mon, 25 Mar 2024 20:26:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711398384; cv=none; b=dGisJD8panRHS3ot5ZUitGoKkTnXhQdBokhbJu1r9TwvclY4/zmh9S7ccNIROjDq7R8xQBqVOfWvgdJ1MovBX8kXZCaFOZ/u34o75qD0weB1wWyXv6MNwvHE+dtCyC1VSgAAt4R71z3T3WzFwjx7bj4i86ycx0VgS+6qjohbWX4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711398384; c=relaxed/simple; bh=jmKUHFci2vuF+OaEjW1pVKxjDkIWXtyKZpuW9N4y/Js=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YcIe0G3mBJkOwk5UaFgSzuwVnIlkGvziJXtjGJTKwAUXrt8qROVSvvwY7hQZ56tpKVy/4DMBDf94GOQ53mc3XOpAy6ds3AK5Hlg+bA5Uz0Y3KaRoyqST8dVwlf04HUOG7ROMfR+8BraHi5unBT/lf/YAxSVyZyBguNZmY3ndjUg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=niXDmykL; arc=none smtp.client-ip=209.85.215.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-5e4613f2b56so3112873a12.1; Mon, 25 Mar 2024 13:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711398382; x=1712003182; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=zM//w0ZQA39ATnyT3zYBHv3F+CzIiqRVQ67zJHzHQSE=; b=niXDmykLrkOSN6dR4oKX4A7k175YIUV33NwdBbfuYyprhy8E5lujRFsbXPOQ5zvQ59 ca7zeVw05x9cNNIwPh2iBMCUPbpPW4ru9UNIVUqtciuJbRUyjj/F58/Xn8HXFFnvggDp MG2kgOm0EJkne3/a5lnOU18gmtwPeWP2XmJiMwoH6UA5meyqN0Ne7aCqe3tfR7GnSvm6 GrLfi1ZhzG3guELIvA9EGxo7schQj32/nW1E8MHbiGbFjpcbM5mo33cHtLif5Hv06Efn ge283dHccC0iCUKE8+GI3oR7utO/FXxpHyVKAeNSWppZNUJE/H8EqoAjYU2MH50YZwS/ QOTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711398382; x=1712003182; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zM//w0ZQA39ATnyT3zYBHv3F+CzIiqRVQ67zJHzHQSE=; b=LC7McZdFbzAOF5/t5nERNLNDEEOVWLt7CeeMtPeLBFSi+ledxgH9+78F3hbJtxzcoe /Zs1L8O/Xr9AjNkQHYxSb6a7pPD16EK5VP4ipHtQlJF3VCqt/pm4u4hphuWDvEs1jERq ZfPAJXyJ39kiUfs1mT9AqgGqEFfhznQp2HSovGkXrsShZIhq+W8GqS8N1Wh1ct6w/HtT DoGBPkhHWXYvaafPCK2CKBuxPOssdiI+ZaKaWZkHheqvZtWsYd6KIuxjM0z4m9Hmu3Rm oxzweFIO/nwsKjQ5LxLdyZJQrvsAB/8ykSKsdQIrcIjV0mZZZ/+AcaPQC8EQlqu1VVxM 7D1g== X-Forwarded-Encrypted: i=1; AJvYcCW5IEHYj9q+4/ynquSLVEL7MhlqbKNCW4dq9rDGobBM1XCd2qpmvPgldi8lK6NZ02nas6/uNJ0qV6IgJjxKveBpYtr/9tjxoX4i7eApGzVNT7DO9rF8RITMGlNAOQ4Ktmx7KUbOqgQWWVJBpA== X-Gm-Message-State: AOJu0Yy0fAFxkgttClcC3et8JPqjuoQ0mXDbbJHFWVhTgqqzBSmsijNJ mWJ3oLQ8a4/Zk5Dt2zWlFpzHfc1jAtDy09+TObYriwJPj4T+l3F3 X-Received: by 2002:a17:90a:e392:b0:29d:fe34:fa16 with SMTP id b18-20020a17090ae39200b0029dfe34fa16mr6081228pjz.21.1711398381870; Mon, 25 Mar 2024 13:26:21 -0700 (PDT) Received: from localhost (dhcp-141-239-158-86.hawaiiantel.net. [141.239.158.86]) by smtp.gmail.com with ESMTPSA id ns21-20020a17090b251500b002a068485de6sm2704002pjb.3.2024.03.25.13.26.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 13:26:21 -0700 (PDT) Sender: Tejun Heo Date: Mon, 25 Mar 2024 10:26:20 -1000 From: Tejun Heo To: Kemeng Shi 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 Subject: Re: [PATCH 6/6] writeback: remove unneeded GDTC_INIT_NO_WB Message-ID: References: <20240320110222.6564-1-shikemeng@huaweicloud.com> <20240320110222.6564-7-shikemeng@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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. Thanks. -- tejun