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 75F5FC433EF for ; Thu, 24 Feb 2022 05:42:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0FEEB8D0002; Thu, 24 Feb 2022 00:42:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0AE168D0001; Thu, 24 Feb 2022 00:42:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EDF838D0002; Thu, 24 Feb 2022 00:42:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id CA33F8D0001 for ; Thu, 24 Feb 2022 00:42:10 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 69B4D1363 for ; Thu, 24 Feb 2022 05:42:10 +0000 (UTC) X-FDA: 79176577620.11.D530FB2 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf31.hostedemail.com (Postfix) with ESMTP id C923620002 for ; Thu, 24 Feb 2022 05:42:09 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id EBB951F3A1; Thu, 24 Feb 2022 05:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1645681327; 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=LKmtUS8Iww56ZG9AedqwAoOu6e9VunJUN5pEfmlFqFg=; b=oacCq8DpEx+HDVYUG2DsF2wuspiuS5qhOaHg1qyYd+T9C2DteAD78mmee61D0FUkZI1YLt 89gaqCC57biyg1VI4eWpjZIyZz5bUCc+qIzPagHkvNRbHUbMXkbpK1X9DZdFRD07Aas5HD lAXZBPvJQXlq+oS7kaTZ3tDK1PH657o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1645681327; 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=LKmtUS8Iww56ZG9AedqwAoOu6e9VunJUN5pEfmlFqFg=; b=MEMewd7NbYPArVPBoXiNu4N+Gd4+gUbLnYQ+eJp9sW2uduqkIYyCem3t9SIAJPZbOtxf7E cjDOc2g76XCgQcAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CFB7B13322; Thu, 24 Feb 2022 05:42:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id spy1IqgaF2JJDwAAMHmgww (envelope-from ); Thu, 24 Feb 2022 05:42:00 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Jeff Layton" Cc: "Andrew Morton" , "Jan Kara" , "Wu Fengguang" , "Jaegeuk Kim" , "Chao Yu" , "Ilya Dryomov" , "Miklos Szeredi" , "Trond Myklebust" , "Anna Schumaker" , "Ryusuke Konishi" , "Darrick J. Wong" , "Philipp Reisner" , "Lars Ellenberg" , "Paolo Valente" , "Jens Axboe" , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-nilfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org, ceph-devel@vger.kernel.org, drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/11] ceph: remove reliance on bdi congestion In-reply-to: References: <164549971112.9187.16871723439770288255.stgit@noble.brown>, <164549983739.9187.14895675781408171186.stgit@noble.brown>, Date: Thu, 24 Feb 2022 16:41:56 +1100 Message-id: <164568131640.25116.884631856219777713@noble.neil.brown.name> X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: C923620002 X-Stat-Signature: f1cyprz97hfijtc9rwunufj8yakgcpmo Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=oacCq8Dp; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=MEMewd7N; spf=pass (imf31.hostedemail.com: domain of neilb@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=neilb@suse.de; dmarc=pass (policy=none) header.from=suse.de X-HE-Tag: 1645681329-203193 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: On Thu, 24 Feb 2022, Jeff Layton wrote: > On Tue, 2022-02-22 at 14:17 +1100, NeilBrown wrote: > > The bdi congestion tracking in not widely used and will be removed. > > > > CEPHfs is one of a small number of filesystems that uses it, setting > > just the async (write) congestion flags at what it determines are > > appropriate times. > > > > The only remaining effect of the async flag is to cause (some) > > WB_SYNC_NONE writes to be skipped. > > > > So instead of setting the flag, set an internal flag and change: > > - .writepages to do nothing if WB_SYNC_NONE and the flag is set > > - .writepage to return AOP_WRITEPAGE_ACTIVATE if WB_SYNC_NONE > > and the flag is set. > > > > The writepages change causes a behavioural change in that pageout() can > > now return PAGE_ACTIVATE instead of PAGE_KEEP, so SetPageActive() will > > be called on the page which (I think) wil further delay the next attempt > > at writeout. This might be a good thing. > > > > Signed-off-by: NeilBrown > > Maybe. I have to wonder whether all of this is really useful. > > When things are congested we'll avoid trying to issue new writeback > requests. Note that we don't prevent new pages from being dirtied here - > - only their being written back. > > This also doesn't do anything in the DIO or sync_write cases, so if we > lose caps or are doing DIO, we'll just keep churning out "unlimited" > writes in those cases anyway. I think the point of congestion tracking is to differentiate between sync and async IO. Or maybe "required" and "optional". Eventually the "optional" IO will become required, but if we can delay it until a time when there is less "required" io, then maybe we can improve perceived latency. "optional" IO here is write-back and read-ahead. If the load of "required" IO is bursty, and if we can shuffle that optional stuff into the quiet periods, we might win. Whether this is a real need is an important question that I don't have an answer for. And whether it is better to leave delayed requests in the page cache, or in the low-level queue with sync requests able to over-take them - I don't know. If you have multiple low-level queue as you say you can with ceph, then lower might be better. The block layer has REQ_RAHEAD .. maybe those request get should get a lower priority ... though I don't think they do. NFS has a 3 level priority queue, with write-back going at a lower priority ... I think... for NFSv3 at least. Sometimes I suspect that as all our transports have become faster, we have been able to ignore the extra latency caused by poor scheduling of optional requests. But at other times when my recently upgraded desktop is struggling to view a web page while compiling a kernel ... I wonder if maybe we don't have the balance right any more. So maybe you are right - maybe we can rip all this stuff out. Or maybe not. Thanks, NeilBrown