Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5918809pxb; Thu, 27 Jan 2022 02:25:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzaJEjf5tPQ38i67ekzfVo6yaru/12t2j0ExiZRmiiIbSswI8tJps+7jEM8tLIHmHPYeVRL X-Received: by 2002:a05:6402:26cd:: with SMTP id x13mr2967039edd.354.1643279113116; Thu, 27 Jan 2022 02:25:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643279113; cv=none; d=google.com; s=arc-20160816; b=EpGvxkBfLMjZmrVrDOlLFDQzzMTKE5XrF3OnCnAw32UO8oCMUU2xu84m9dgvP+fByf Jk00r7DDs8Vr5x0yMwBnw3M+cIB+8IaTlrO2m4oqmO1wQdBFf7NwixLrzSNIEESkcY1G MdDQTxMAQXQgGkp7fDG4aCNHoOBLtq60e1pcKpQWvvUxAnqL3HmTMRLOOVxyx3HffePr Sa3xgYwiQOyNOa/zBtrzKfuIM3tcZGAKWYdXxvQr7wE5TFKMv5N48CY74iJoL5cM9ZMc KQi+OAKskbtapEwHRkGT6LDgVVCpatL/Pnv9tssK6gXu80SCSjwEBSzFPA6XnUOcW8Fy Rhpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature:dkim-signature; bh=Y1aXkZm3vGEbDQ2TliKD25GZMctmdkQ6PpfcUSoKNn4=; b=RWePZu7sq7ahU0nJsZgXfHLunIUK3q85wGH1/hkBwJBMy2raAdbfWxOrkfhmRZqIgX ORU3l1CnBSTrBXy9+IddPCRUQuOtgWk7geCOMMdd0tC/qrYmXuDFBFJRFKa/IA1Qxy3h nliunhqOzvJicFTMdwc30WvePAsohyOhR1qjJ5j3jMEjKr5JW0xDw5llCcRjVBo/Lza6 hRABzyKM/pxkqOCXjN4u2J40mi7urvH4kqhGAZLYPj1cw5dtdLLBkjKBH3QHXbhXhhCu 32yuF34oTQeG0JlBYonGMlrWHemveheykOzYxT1yJCTFzW9gFdNZW4bqdB1VFlVZbZbn EhtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="iKuO/pFv"; dkim=neutral (no key) header.i=@suse.de header.b=o7L95KLh; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o8si1172533ejy.773.2022.01.27.02.24.48; Thu, 27 Jan 2022 02:25:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="iKuO/pFv"; dkim=neutral (no key) header.i=@suse.de header.b=o7L95KLh; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235382AbiA0Css (ORCPT + 99 others); Wed, 26 Jan 2022 21:48:48 -0500 Received: from smtp-out2.suse.de ([195.135.220.29]:54968 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233161AbiA0Csr (ORCPT ); Wed, 26 Jan 2022 21:48:47 -0500 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 5F1EE1F3AF; Thu, 27 Jan 2022 02:48:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1643251725; 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=Y1aXkZm3vGEbDQ2TliKD25GZMctmdkQ6PpfcUSoKNn4=; b=iKuO/pFvd/uxxEXD+TDMVC91aqp4wHW5W0GKf/YBfpsCMKaqylpo+su+GTLOqGsrVwhDyE nwPNg1RKM8e1Me9JSv79QL1h0R21rPA/01WWlikszufSsXm+6l8GpCCSefHqw2Neqt48aR 0rHFWiDRVkgXkzGaEvWGC3L0gHL1KtE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1643251725; 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=Y1aXkZm3vGEbDQ2TliKD25GZMctmdkQ6PpfcUSoKNn4=; b=o7L95KLhcEyU7sp1r7lBF22DT3yl1OaEF+4Yr9q72waZ8jlqTVOwzVSrElBPDvv2XH+bIB JRbq7SRtYRMuCDAQ== 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 6C7E013E46; Thu, 27 Jan 2022 02:48:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8LLTCQYI8mEsLAAAMHmgww (envelope-from ); Thu, 27 Jan 2022 02:48:38 +0000 Subject: [PATCH 6/9] fuse: don't set/clear bdi_congested From: NeilBrown To: Andrew Morton , Jaegeuk Kim , Chao Yu , Jeff Layton , Ilya Dryomov , Miklos Szeredi , Trond Myklebust , Anna Schumaker , Ryusuke Konishi , "Darrick J. Wong" , Philipp Reisner , Lars Ellenberg , Paolo Valente , Jens Axboe Cc: 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, linux-block@vger.kernel.org Date: Thu, 27 Jan 2022 13:46:29 +1100 Message-ID: <164325158958.29787.9472805850412952920.stgit@noble.brown> In-Reply-To: <164325106958.29787.4865219843242892726.stgit@noble.brown> References: <164325106958.29787.4865219843242892726.stgit@noble.brown> User-Agent: StGit/0.23 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org The bid congestion framework is no longer used to manage writeout etc, so drop updating it in fuse. Signed-off-by: NeilBrown --- fs/fuse/control.c | 17 ----------------- fs/fuse/dev.c | 8 -------- 2 files changed, 25 deletions(-) diff --git a/fs/fuse/control.c b/fs/fuse/control.c index 000d2e5627e9..7cede9a3bc96 100644 --- a/fs/fuse/control.c +++ b/fs/fuse/control.c @@ -164,7 +164,6 @@ static ssize_t fuse_conn_congestion_threshold_write(struct file *file, { unsigned val; struct fuse_conn *fc; - struct fuse_mount *fm; ssize_t ret; ret = fuse_conn_limit_write(file, buf, count, ppos, &val, @@ -178,22 +177,6 @@ static ssize_t fuse_conn_congestion_threshold_write(struct file *file, down_read(&fc->killsb); spin_lock(&fc->bg_lock); fc->congestion_threshold = val; - - /* - * Get any fuse_mount belonging to this fuse_conn; s_bdi is - * shared between all of them - */ - - if (!list_empty(&fc->mounts)) { - fm = list_first_entry(&fc->mounts, struct fuse_mount, fc_entry); - if (fc->num_background < fc->congestion_threshold) { - clear_bdi_congested(fm->sb->s_bdi, BLK_RW_SYNC); - clear_bdi_congested(fm->sb->s_bdi, BLK_RW_ASYNC); - } else { - set_bdi_congested(fm->sb->s_bdi, BLK_RW_SYNC); - set_bdi_congested(fm->sb->s_bdi, BLK_RW_ASYNC); - } - } spin_unlock(&fc->bg_lock); up_read(&fc->killsb); fuse_conn_put(fc); diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index cd54a529460d..e1b4a846c90d 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -315,10 +315,6 @@ void fuse_request_end(struct fuse_req *req) wake_up(&fc->blocked_waitq); } - if (fc->num_background == fc->congestion_threshold && fm->sb) { - clear_bdi_congested(fm->sb->s_bdi, BLK_RW_SYNC); - clear_bdi_congested(fm->sb->s_bdi, BLK_RW_ASYNC); - } fc->num_background--; fc->active_background--; flush_bg_queue(fc); @@ -540,10 +536,6 @@ static bool fuse_request_queue_background(struct fuse_req *req) fc->num_background++; if (fc->num_background == fc->max_background) fc->blocked = 1; - if (fc->num_background == fc->congestion_threshold && fm->sb) { - set_bdi_congested(fm->sb->s_bdi, BLK_RW_SYNC); - set_bdi_congested(fm->sb->s_bdi, BLK_RW_ASYNC); - } list_add_tail(&req->list, &fc->bg_queue); flush_bg_queue(fc); queued = true;