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 DC243E77188 for ; Tue, 14 Jan 2025 13:19:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 60B1E6B0085; Tue, 14 Jan 2025 08:19:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 593E36B0088; Tue, 14 Jan 2025 08:19:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 40D82280001; Tue, 14 Jan 2025 08:19:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 1FD196B0085 for ; Tue, 14 Jan 2025 08:19:14 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id B67BB42191 for ; Tue, 14 Jan 2025 13:19:13 +0000 (UTC) X-FDA: 83006113386.24.B03AE11 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf27.hostedemail.com (Postfix) with ESMTP id 30E5240019 for ; Tue, 14 Jan 2025 13:19:10 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=QMEAedVv; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=uRR5q83r; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=QMEAedVv; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=uRR5q83r; dmarc=none; spf=pass (imf27.hostedemail.com: domain of jack@suse.cz designates 195.135.223.131 as permitted sender) smtp.mailfrom=jack@suse.cz ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736860751; a=rsa-sha256; cv=none; b=d7YqTAgPDJO9wpKlbzUnbWpNE7TKuFqIbNk8+y+VmxkxtQnqny+n22x1h0FBn74W3P+tCz DHV9pQ9+yOTW4oXmHkeHP79MZCEIhqnQ6bWZmC6kPoJfokbQy+OQ6KzF1s92P9NiuSXzcd 96rwLXwU0ZFSyyxVFHVmahsHZC5jVFw= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=QMEAedVv; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=uRR5q83r; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=QMEAedVv; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=uRR5q83r; dmarc=none; spf=pass (imf27.hostedemail.com: domain of jack@suse.cz designates 195.135.223.131 as permitted sender) smtp.mailfrom=jack@suse.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736860751; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/u0m2Pp0oheGATsO4++yz537rog6jJuLIbNZvYrAA+Q=; b=7CB4srf5zP319qBWrZ0FVU1ETBzs9ShFhblqtu3/qw4CigD7YGaZ1xkdgswHcPy758GM55 XeM12gDpdzpYFDFyIIfOHcO+4qRK6V85QHI2fA3fkESRV2IicB8MlRfgI9oYNer5od9DFA /T8zcjFiUlGM/ymQHtxew4aSC6PPdG8= 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 701AF1F37C; Tue, 14 Jan 2025 13:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1736860749; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/u0m2Pp0oheGATsO4++yz537rog6jJuLIbNZvYrAA+Q=; b=QMEAedVvug7QfLUZgEkGdTLA6nJu0gsPJljxnEoBFaDJm42jKpwGFU6FuvmSzGkP4dpQEC zPKiJYp2lyXdgEHbGtX3cai0aYX4vOk57xr6PXkRoiTnlviGA0xRuNFbiDDSoBmqi7T5q0 CTPOtg//cnS5PdUQefdCR6eq1bBgaZk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1736860749; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/u0m2Pp0oheGATsO4++yz537rog6jJuLIbNZvYrAA+Q=; b=uRR5q83rELjAcL1LJ/8f5lxZmqpC8F0WHKbFnBX7lLuD/uPVSlz+fWPevA0kQvJ3zth8te 957lTnpIeOmpj3AQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1736860749; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/u0m2Pp0oheGATsO4++yz537rog6jJuLIbNZvYrAA+Q=; b=QMEAedVvug7QfLUZgEkGdTLA6nJu0gsPJljxnEoBFaDJm42jKpwGFU6FuvmSzGkP4dpQEC zPKiJYp2lyXdgEHbGtX3cai0aYX4vOk57xr6PXkRoiTnlviGA0xRuNFbiDDSoBmqi7T5q0 CTPOtg//cnS5PdUQefdCR6eq1bBgaZk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1736860749; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/u0m2Pp0oheGATsO4++yz537rog6jJuLIbNZvYrAA+Q=; b=uRR5q83rELjAcL1LJ/8f5lxZmqpC8F0WHKbFnBX7lLuD/uPVSlz+fWPevA0kQvJ3zth8te 957lTnpIeOmpj3AQ== 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 52731139CB; Tue, 14 Jan 2025 13:19:09 +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 8jwaFE1khmdYQwAAD6G6ig (envelope-from ); Tue, 14 Jan 2025 13:19:09 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 0FA22A08CD; Tue, 14 Jan 2025 14:19:01 +0100 (CET) Date: Tue, 14 Jan 2025 14:19:01 +0100 From: Jan Kara To: Guenter Roeck Cc: Jim Zhao , akpm@linux-foundation.org, jack@suse.cz, willy@infradead.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] mm/page-writeback: Consolidate wb_thresh bumping logic into __wb_calc_thresh Message-ID: References: <20241121100539.605818-1-jimzhao.ai@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 30E5240019 X-Stat-Signature: szwe3huhax393qi4ujsob8n3hfjq54do X-Rspam-User: X-HE-Tag: 1736860750-598868 X-HE-Meta: U2FsdGVkX18kL0+2ODv+8GTkQLwSVj4XvATvgeKMbvB3YRm0SS9o+VOeLXVO/HAN/F2s/DAFEP9rG4WK4+QcQWMFOnr4rX2dIimLvQm6jWsIF9/eMwHyypmHjtgn/8jdZI+NNqHG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Vmr8eiJbevuPrbqgsuD1cZfTkgKrWd+ZRHRxT5+6ngKKyazTvlj7wl5ERbXap6iGZh0TeHIuKeqmM+tk2wBphtYWYys6lpBgp23RRj+qbf/0cN0GZTayfo09pXxfZiEWmIQby/1WvAf0HtjM0y0x4dDCLC9Lu0EshMFf+YXjBAgJ/W32e4HAO3o3yjdKsH1hs8nziM+eA347SuU11LGitROHXjOMQC475x+7vWq9VKus65pIfAk+jj5WC9c2IKJU 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 Mon 13-01-25 15:05:25, Guenter Roeck wrote: > Hi, > > On Thu, Nov 21, 2024 at 06:05:39PM +0800, Jim Zhao wrote: > > Address the feedback from "mm/page-writeback: raise wb_thresh to prevent > > write blocking with strictlimit"(39ac99852fca98ca44d52716d792dfaf24981f53). > > The wb_thresh bumping logic is scattered across wb_position_ratio, > > __wb_calc_thresh, and wb_update_dirty_ratelimit. For consistency, > > consolidate all wb_thresh bumping logic into __wb_calc_thresh. > > > > Reviewed-by: Jan Kara > > Signed-off-by: Jim Zhao > > This patch triggers a boot failure with one of my 'sheb' boot tests. > It is seen when trying to boot from flash (mtd). The log says > > ... > Starting network: 8139cp 0000:00:02.0 eth0: link down > udhcpc: started, v1.33.0 > EXT2-fs (mtdblock3): error: ext2_check_folio: bad entry in directory #363: : directory entry across blocks - offset=0, inode=27393, rec_len=3072, name_len=2 > udhcpc: sending discover > udhcpc: sending discover > udhcpc: sending discover > EXT2-fs (mtdblock3): error: ext2_check_folio: bad entry in directory #363: : directory entry across blocks - offset=0, inode=27393, rec_len=3072, name_len=2 Thanks for report! Uh, I have to say I'm very confused by this. It is clear than when ext2 detects the directory corruption (we fail checking directory inode 363 which is likely /etc/init.d/), the boot fails in interesting ways. What is unclear is how the commit can possibly cause ext2 directory corruption. If you didn't verify reverting the commit fixes the issue, I'd be suspecting bad bisection but that obviously isn't the case :-) Ext2 is storing directory data in the page cache so at least it uses the subsystem which the patch impacts but how writeback throttling can cause ext2 directory corruption is beyond me. BTW, do you recreate the root filesystem before each boot? How exactly? Honza > udhcpc: no lease, failing > FAIL > /etc/init.d/S55runtest: line 29: awk: Permission denied > Found console ttySC1 > /etc/init.d/S55runtest: line 45: awk: Permission denied > can't run '/sbin/getty': No such device or address > > and boot stalls from there. There is no obvious kernel log message > associated with the problem. Reverting this patch fixes the problem. > > Bisect log is attached for reference. > > Guenter > -- Jan Kara SUSE Labs, CR