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 A28A2C433F5 for ; Tue, 1 Mar 2022 10:32:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C1E4E8D0002; Tue, 1 Mar 2022 05:32:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BA69C8D0001; Tue, 1 Mar 2022 05:32:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A6E598D0002; Tue, 1 Mar 2022 05:32:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0038.hostedemail.com [216.40.44.38]) by kanga.kvack.org (Postfix) with ESMTP id 93C288D0001 for ; Tue, 1 Mar 2022 05:32:21 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 423178249980 for ; Tue, 1 Mar 2022 10:32:21 +0000 (UTC) X-FDA: 79195452882.25.C228B90 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf03.hostedemail.com (Postfix) with ESMTP id 9360820009 for ; Tue, 1 Mar 2022 10:32:20 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 2FF4121637; Tue, 1 Mar 2022 10:32:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1646130739; 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=La5buFbnjrPhn2o1sUWwzQOTEyfMerZi3ZYeAU8/Uv0=; b=ir6wKv7+9TEqXDAv3qmydQ5wBbusxZq25vcTSERRcfsYAthVuwyzGudcKtcu5nR7eD8N9w Xf1dhJfFABjK3gR6RVu2WwBtXG7aTJA9ivU3pX+9IyTxtrODSdDHmoGMphU/lnLO+kWTuX xskgcZyntzbQGHPrndLL+oVBRDjnBFo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1646130739; 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=La5buFbnjrPhn2o1sUWwzQOTEyfMerZi3ZYeAU8/Uv0=; b=tKcMBac1PgJGoG8rsYC6c4tom0Ydqe9lf86KLgjfVmM5zQc0oUPxg2PqqyEdGUi7u05yLw yje4esCKuBhlKoAA== Received: from quack3.suse.cz (unknown [10.100.224.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 19928A3B89; Tue, 1 Mar 2022 10:32:19 +0000 (UTC) Received: by quack3.suse.cz (Postfix, from userid 1000) id 8B603A0608; Tue, 1 Mar 2022 11:32:18 +0100 (CET) Date: Tue, 1 Mar 2022 11:32:18 +0100 From: Jan Kara To: Richard Weinberger Cc: wuchi.zero@gmail.com, =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , jack@suse.cz, tj@kernel.org, mszeredi@redhat.com, sedat.dilek@gmail.com, axboe@fb.com, akpm@linux-foundation.org, torvalds@linux-foundation.org, linux-mm , linux-mtd , linux-fsdevel , linux-kernel Subject: Re: Different writeback timing since v5.14 Message-ID: <20220301103218.ulbmakdy4gbw2fso@quack3.lan> References: <2104629126.100059.1646129517209.JavaMail.zimbra@nod.at> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2104629126.100059.1646129517209.JavaMail.zimbra@nod.at> X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 9360820009 X-Stat-Signature: z7h8fnb4i1mkm6hirfkk9eofjqmk43ct Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=ir6wKv7+; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=tKcMBac1; dmarc=none; spf=pass (imf03.hostedemail.com: domain of jack@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=jack@suse.cz X-HE-Tag: 1646130740-371851 Content-Transfer-Encoding: quoted-printable 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: Hi! On Tue 01-03-22 11:11:57, Richard Weinberger wrote: > Rafa=C5=82 and I discovered that page writeback on UBIFS behaves differ= ent since v5.14. > When a simple write, such as "echo foo > /mnt/ubibfs/bar.txt", happens = it takes > a few seconds until writeback calls ubifs_writepage(). >=20 > Before commit ab19939a6a50 ("mm/page-writeback: Fix performance when BD= I's share of ratio is 0.") > it was 30 seconds (vm.dirty_expire_centisecs), after this change it hap= pens after 5 seconds > (vm.dirty_writeback_centisecs). >=20 > Is this expected? > Just want to make sure that the said commit didn't uncover an UBIFS iss= ue. Yes, I think it is expected. Likely the background threshold for UBIFS bd= i is very small (probably UBIFS is not used much for writeback compared to other filesystems). Previously, we just used wb_stat() which returned 0 (PCP counter inexact value) and so background writeback didn't trigger. N= ow we use wb_stat_sum() when threshold is small, get exact value of dirty pages and decide to start background writeback. The only thing is, whether it is really expected that the threshold for UBIFS bdi is so small. You can check the values in /sys/kernel/debug/bdi//stats. Honza --=20 Jan Kara SUSE Labs, CR