From mboxrd@z Thu Jan 1 00:00:00 1970 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 9059FC77B7F for ; Thu, 26 Jun 2025 07:01:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F11406B009B; Thu, 26 Jun 2025 03:00:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EC1B56B009F; Thu, 26 Jun 2025 03:00:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DB0A46B00B7; Thu, 26 Jun 2025 03:00:59 -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 CB57D6B009B for ; Thu, 26 Jun 2025 03:00:59 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 6923A12238E for ; Thu, 26 Jun 2025 07:00:59 +0000 (UTC) X-FDA: 83596654638.11.6ACF063 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf18.hostedemail.com (Postfix) with ESMTP id EE8441C0008 for ; Thu, 26 Jun 2025 07:00:56 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=lZMv50Vm; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=Yk217dFj; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=yMxTBd+a; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b="duk1rWj/"; spf=pass (imf18.hostedemail.com: domain of jack@suse.cz designates 195.135.223.131 as permitted sender) smtp.mailfrom=jack@suse.cz; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1750921257; a=rsa-sha256; cv=none; b=yveqn4Dve+2Agoy1B2iIwlzdAfdIfI+0GviFIEtVxca5Fl9nsM+G15mOG7pw62hiO55GKA 0Seb0IlhHOXb2ab8DkK65XJHRrUjsQ4Qj4rsixi4PmgcCVUYUDbW+a/UX7sZjQwEMbyw+w elTrhTUJ3IKGIqpa7SZHvxQevkyHgNg= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=lZMv50Vm; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=Yk217dFj; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=yMxTBd+a; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b="duk1rWj/"; spf=pass (imf18.hostedemail.com: domain of jack@suse.cz designates 195.135.223.131 as permitted sender) smtp.mailfrom=jack@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1750921257; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=TYok1CSTlk8p1Np6qemtLfABm+ux0CRPztAQma9oeEE=; b=TyDN+YqwMGbUEIqMNhbvkYMwU41TiySvsHrIOSDlyQjw27EVRl6Hcj9Seud0ZAUbE1mONd pF2fm257rnaRXuuLhbBc80MiVrfbLaCet3h+XPcKs8TQuJGq2hn1jh10NQZnmSd4ZXwo5x YEynW2fgXjvfUMpbneyTLBk5OkRwlU8= Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 73B4C1F38D; Thu, 26 Jun 2025 07:00:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1750921250; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TYok1CSTlk8p1Np6qemtLfABm+ux0CRPztAQma9oeEE=; b=lZMv50VmlOww0cnCR4bTGtaG3/YCEjZIJ6hJx822LFw4jaavAR8G/Vy1Czng5OQFt2rpqo 8VmqFPqt9ymrt5jtflDCrYGH6sWEAnGXE85tQtvLgZkttXeDUBhoufkSAvEVNeWckZpwCd ztOc1h53cwe42qRNMb2hGgkz02xH7yA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1750921250; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TYok1CSTlk8p1Np6qemtLfABm+ux0CRPztAQma9oeEE=; b=Yk217dFjxdhtP6WJfYgThK3CuZkiB8huYjwTlCVshEt762FxRendeV0OZrAj5IskI3DNAo rfKTcHIVDloxw4Dw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1750921245; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TYok1CSTlk8p1Np6qemtLfABm+ux0CRPztAQma9oeEE=; b=yMxTBd+a/iQsREcegZkmiqbw/0ihN+mIHnZUsNghMtxNtc5daEPLhpUO2UExxfE7K3Noak 3XaGXFZvjty7loovjUFQ8MDetWfl03O/9WxgabqmYn/8/VOiaXn3znmzfCr9mb6E0iQbOh TC4CiZ9L000hnWn8ljU/pGKpcCQiiUQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1750921245; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TYok1CSTlk8p1Np6qemtLfABm+ux0CRPztAQma9oeEE=; b=duk1rWj/y7XGLICouNKWy5v3+3YZ0SE686lbDg8QHueE1OU+FF3/HRAi+tJCueom7mmVlT +Ehk8DKnFHhM5LBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6465013188; Thu, 26 Jun 2025 07:00:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id Lfl9GB3wXGgXIgAAD6G6ig (envelope-from ); Thu, 26 Jun 2025 07:00:45 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id EC3E1A0953; Thu, 26 Jun 2025 09:00:44 +0200 (CEST) Date: Thu, 26 Jun 2025 09:00:44 +0200 From: Jan Kara To: Joanne Koong Cc: Vlastimil Babka , Andrew Morton , "Matthew Wilcox (Oracle)" , Tejun Heo , Maxim Patlasov , Jan Kara , Zach O'Keefe , Jonathan Corbet , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Suren Baghdasaryan , Michal Hocko , "Kirill A. Shutemov" , Brendan Jackman , Johannes Weiner , Zi Yan , Jingbo Xu , Jeff Layton , Miklos Szeredi , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, Jens Axboe Subject: Re: [PATCH] mm, vmstat: remove the NR_WRITEBACK_TEMP node_stat_item counter Message-ID: References: <20250625-nr_writeback_removal-v1-1-7f2a0df70faa@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Stat-Signature: b1juf1qegrsddywhyttbd6ro47d7zmez X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: EE8441C0008 X-Rspam-User: X-HE-Tag: 1750921256-840087 X-HE-Meta: U2FsdGVkX1+AuO0V581BMvIYe2DXHSr0KT7AswkiL+N8Ik2HvJj2QT89oltkj/xMiMr4i0kO68lGAfRGbPv+JIxyoB6J01V9TxU4DADGIB/eumTNeMJXoVpC4qz1JQshZGgbzbxFGGxwQx7Ao+lZIgV2UOssFjybC1R8AmatnYNiQLSg9JJAh8gUe3fLEYxWMAr1zrIhdCfNZkudLpVELMBOmzcGW1HLc72mILc6HTDh7oqcDKyaqX5Qi6jN2SeztKIiqY0AqDVs68bHeST5OlZCC14VnLhr5jamTD5XOUmlBGcRyuCvlCexMHcFpfjeiSxO0W0oiwAWrVSotJtc20T+jfyEsNDwsk8Y0lVJCrGQAzj+GCbxagC/LqCfTWFNvOdcNulNaiHTSWRGOlFcEnlO4SY+1Y2WfMJtHirZKDvxR0Rp3j1MzTOhcl6PgzwbCRleDg5laSGC4iSnXAHfbFd/cXcOb8pOgI1F8BFF9D9KFdfFh/Yf2xkF04TSgxyWNz+m4MN2ttQbsg+yn+goMhYgV/cjJm8IKpYDM5uDWsDgrHLqI4WaaaEDmL53ey1P6tTJyZD+cRscb5WNtloIBvnpc9zaiq0n2vSemY0Ln/UEP2gHxGG3e/Ed22nZOLfY7Mm5j3Hx+rWMZsn3GxLu3dLsuDgav3FiXavgFynyKIfRICxnq4dQzEEW0OWngFpyJUuvTVjtN0RHrhgIGXqzN5vwLA7bTQ6U1KUHxcp0kh30mbOn/9O21rqHlqYzH8LycE0gjkXy8eYbDFQXBZrYV0zV8HAdnOpfKg2PO+qas78bQLzTojgTYpd41tGtNKyq7OfmZBYpjGacS0h+ttcQWDvj8l8E2qt/YD75Wd6UxoIen2aeMS/O9mvKKaBBKx5+xxoSC30a2AsQ/0mxhKYQv6REGow8cu7SSa7lZB9SrnvQQLvZV75JEKl4TMJt5HjMKM1dP+tRwcgi53CRzVQ rIPqcs6X CCXD0+07WnmGPF8bu1Py4ufWHE2lP1i79cYkjBykb5jutsdWll1hx73FrERPB3Pv3Y/3p9tCaw+BxuE3Q9C2GG+uJWiNKpEgJacK2M76g/A3wokMbjqr1FA232ym5KgHLhEPHnBmFEpg1h7Gzzt1D9Y6/eN2QYcsskSOW6rzbPvh7trbhWSTmcOE4otG+F5KMZVxbbIFPlHMcywcVmFWgAkEnZZo8oftZROJzeXoh3UKxjZ4SB8VLb1X1tR5CZlOW71e4ZZMqpaAl2MArIgHJ3jnNqf0gao57OFW0+C4Mjj4spE/XtnLcioJO3f/ZAeZtxMyALzkf6KqLyrcPVcz/jgxzSWC4NWFZq98oAsWWU/MIVKD35nus/NSLXLr6ECxNW8lR5Z+yQLu6e+HPaQu3DjH41StmwarJbGrF 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: On Wed 25-06-25 14:38:01, Joanne Koong wrote: > On Wed, Jun 25, 2025 at 8:51 AM Vlastimil Babka wrote: > > > > The only user of the counter (FUSE) was removed in commit 0c58a97f919c > > ("fuse: remove tmp folio for writebacks and internal rb tree") so follow > > the established pattern of removing the counter and hardcoding 0 in > > meminfo output, as done recently with NR_BOUNCE. Update documentation > > for procfs, including for the value for Bounce that was missed when > > removing its counter. > > > > Signed-off-by: Vlastimil Babka > > --- > > The removal of the counter is straightforward. The reason for the large > > Cc list is that there is a comment in mm/page-writeback.c function > > wb_position_ratio() that mentions NR_WRITEBACK_TEMP, and just deleting > > the sentence feels to me it could be the wrong thing to do - maybe the > > strictlimit feature itself is now obsolete? It sure does mention FUSE > > as the main reason to exist, but commit 5a53748568f79 that introduced it > > also mentions slow USB sticks as a possibile scenario. Has that > > happened? I'm not familiar enough with this so I'd rather highlight this > > and ask for input here than make "git grep NR_WRITEBACK_TEMP" return > > nothing. > > My understanding is that even without the fuse use case, strictlimit > is still used for other devices via the /sys/class/bdi interface (eg > /sys/class/bdi//strict_limit) so I don't think the feature itself > is obsolete. > > It's not clear to me whether fuse still needs strictlimit now that it > doesn't have tmp writeback pages, but it'd be great to get an answer > to this, as strictlimit currently leads to too much dirty throttling > when large folios are enabled in fuse. Well, Miklos would be the definitive source of truth here but as far as I know strictlimit is still desirable for FUSE even without NR_WRITEBACK_TEMP. Otherwise dirty pages in mappings where writeback can be potentially very slow (and definitely under userspace control) could consume most of the global dirty limit which is not what you usually want. That being said I can definitely see there are usecases of FUSE mounts where you don't want this extra throttling. But then it's upto sysadmin to configure min/max_ratio properly in these cases to avoid excessive throttling. Regarding the comment, I'm frankly not certain how strictlimit solved NR_WRITEBACK_TEMP issue because NR_WRITEBACK_TEMP was never included in any computations there AFAICS. It just helped to limit amount of outstanding dirty pages for FUSE mappings and thus indirectly limited the scope of NR_WRITEBACK_TEMP issue. Anyway I think the sentence is obsolete now and deleting it is indeed the right solution because FUSE writeback is now properly accounted in the dirty limit. Honza -- Jan Kara SUSE Labs, CR