From: Jeff Layton <jlayton@kernel.org>
To: NeilBrown <neilb@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
Ilya Dryomov <idryomov@gmail.com>,
Miklos Szeredi <miklos@szeredi.hu>,
Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna.schumaker@netapp.com>,
Ryusuke Konishi <konishi.ryusuke@gmail.com>,
"Darrick J. Wong" <djwong@kernel.org>,
Philipp Reisner <philipp.reisner@linbit.com>,
Lars Ellenberg <lars.ellenberg@linbit.com>,
Paolo Valente <paolo.valente@linaro.org>,
Jens Axboe <axboe@kernel.dk>
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
Subject: Re: [PATCH 5/9] cephfs: don't set/clear bdi_congestion
Date: Thu, 27 Jan 2022 06:12:15 -0500 [thread overview]
Message-ID: <2e66ef3e8f5df0529d3c289f8ed0be6a051d95ea.camel@kernel.org> (raw)
In-Reply-To: <164325158958.29787.8840004338500709466.stgit@noble.brown>
On Thu, 2022-01-27 at 13:46 +1100, NeilBrown wrote:
> The bdi congestion framework is no-longer used - writeback uses other
> mechanisms to manage throughput.
>
> So remove calls to set_bdi_congested() and clear_bdi_congested(), and
> remove the writeback_count which is used only to guide the setting and
> clearing.
>
> The congestion_kb mount option is no longer meaningful, but as it is
> visible to user-space, removing it needs more consideration.
>
> Signed-off-by: NeilBrown <neilb@suse.de>
> ---
> fs/ceph/addr.c | 27 ---------------------------
> fs/ceph/super.c | 2 --
> fs/ceph/super.h | 2 --
> 3 files changed, 31 deletions(-)
>
> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index c98e5238a1b6..9147667f8cd5 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -57,11 +57,6 @@
> * accounting is preserved.
> */
>
> -#define CONGESTION_ON_THRESH(congestion_kb) (congestion_kb >> (PAGE_SHIFT-10))
> -#define CONGESTION_OFF_THRESH(congestion_kb) \
> - (CONGESTION_ON_THRESH(congestion_kb) - \
> - (CONGESTION_ON_THRESH(congestion_kb) >> 2))
> -
> static int ceph_netfs_check_write_begin(struct file *file, loff_t pos, unsigned int len,
> struct folio *folio, void **_fsdata);
>
> @@ -561,10 +556,6 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
> dout("writepage %p page %p index %lu on %llu~%llu snapc %p seq %lld\n",
> inode, page, page->index, page_off, len, snapc, snapc->seq);
>
> - if (atomic_long_inc_return(&fsc->writeback_count) >
> - CONGESTION_ON_THRESH(fsc->mount_options->congestion_kb))
> - set_bdi_congested(inode_to_bdi(inode), BLK_RW_ASYNC);
> -
> req = ceph_osdc_new_request(osdc, &ci->i_layout, ceph_vino(inode), page_off, &len, 0, 1,
> CEPH_OSD_OP_WRITE, CEPH_OSD_FLAG_WRITE, snapc,
> ceph_wbc.truncate_seq, ceph_wbc.truncate_size,
> @@ -621,10 +612,6 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
> ceph_put_wrbuffer_cap_refs(ci, 1, snapc);
> ceph_put_snap_context(snapc); /* page's reference */
>
> - if (atomic_long_dec_return(&fsc->writeback_count) <
> - CONGESTION_OFF_THRESH(fsc->mount_options->congestion_kb))
> - clear_bdi_congested(inode_to_bdi(inode), BLK_RW_ASYNC);
> -
> return err;
> }
>
> @@ -704,12 +691,6 @@ static void writepages_finish(struct ceph_osd_request *req)
> BUG_ON(!page);
> WARN_ON(!PageUptodate(page));
>
> - if (atomic_long_dec_return(&fsc->writeback_count) <
> - CONGESTION_OFF_THRESH(
> - fsc->mount_options->congestion_kb))
> - clear_bdi_congested(inode_to_bdi(inode),
> - BLK_RW_ASYNC);
> -
> ceph_put_snap_context(detach_page_private(page));
> end_page_writeback(page);
> dout("unlocking %p\n", page);
> @@ -952,14 +933,6 @@ static int ceph_writepages_start(struct address_space *mapping,
> dout("%p will write page %p idx %lu\n",
> inode, page, page->index);
>
> - if (atomic_long_inc_return(&fsc->writeback_count) >
> - CONGESTION_ON_THRESH(
> - fsc->mount_options->congestion_kb)) {
> - set_bdi_congested(inode_to_bdi(inode),
> - BLK_RW_ASYNC);
> - }
> -
> -
> pages[locked_pages++] = page;
> pvec.pages[i] = NULL;
>
> diff --git a/fs/ceph/super.c b/fs/ceph/super.c
> index bf79f369aec6..b2f38af9fca8 100644
> --- a/fs/ceph/super.c
> +++ b/fs/ceph/super.c
> @@ -801,8 +801,6 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt,
> fsc->filp_gen = 1;
> fsc->have_copy_from2 = true;
>
> - atomic_long_set(&fsc->writeback_count, 0);
> -
> err = -ENOMEM;
> /*
> * The number of concurrent works can be high but they don't need
> diff --git a/fs/ceph/super.h b/fs/ceph/super.h
> index 67f145e1ae7a..fc58adf1d36a 100644
> --- a/fs/ceph/super.h
> +++ b/fs/ceph/super.h
> @@ -120,8 +120,6 @@ struct ceph_fs_client {
>
> struct ceph_mds_client *mdsc;
>
> - atomic_long_t writeback_count;
> -
> struct workqueue_struct *inode_wq;
> struct workqueue_struct *cap_wq;
>
>
>
Thanks Neil.
I'll plan to pull this into the ceph testing branch and do some testing
with it, but at a quick glance I don't forsee any issues. This should
make v5.18, but we may be able to get it in sooner.
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2022-01-27 11:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 2:46 [PATCH 0/9] Remove remaining parts of congestions tracking code NeilBrown
2022-01-27 2:46 ` [PATCH 2/9] Remove bdi_congested() and wb_congested() and related functions NeilBrown
2022-01-27 22:10 ` Ryusuke Konishi
2022-01-27 2:46 ` [PATCH 5/9] cephfs: don't set/clear bdi_congestion NeilBrown
2022-01-27 11:12 ` Jeff Layton [this message]
2022-01-27 2:46 ` [PATCH 9/9] Remove congestion tracking framework NeilBrown
2022-01-27 2:46 ` [PATCH 8/9] block/bfq-iosched.c: use "false" rather than "BLK_RW_ASYNC" NeilBrown
2022-01-27 2:46 ` [PATCH 1/9] Remove inode_congested() NeilBrown
2022-01-28 9:37 ` Miklos Szeredi
2022-01-28 21:36 ` NeilBrown
2022-01-27 2:46 ` [PATCH 6/9] fuse: don't set/clear bdi_congested NeilBrown
2022-01-27 2:46 ` [PATCH 3/9] f2fs: change retry waiting for f2fs_write_single_data_page() NeilBrown
2022-01-28 1:34 ` Jaegeuk Kim
2022-01-27 2:46 ` [PATCH 7/9] NFS: remove congestion control NeilBrown
2022-01-27 2:46 ` [PATCH 4/9] f2f2: replace some congestion_wait() calls with io_schedule_timeout() NeilBrown
2022-01-28 1:27 ` Jaegeuk Kim
2022-01-27 22:42 ` [PATCH 0/9] Remove remaining parts of congestions tracking code Andrew Morton
2022-01-28 0:58 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e66ef3e8f5df0529d3c289f8ed0be6a051d95ea.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=anna.schumaker@netapp.com \
--cc=axboe@kernel.dk \
--cc=ceph-devel@vger.kernel.org \
--cc=chao@kernel.org \
--cc=djwong@kernel.org \
--cc=drbd-dev@lists.linbit.com \
--cc=idryomov@gmail.com \
--cc=jaegeuk@kernel.org \
--cc=konishi.ryusuke@gmail.com \
--cc=lars.ellenberg@linbit.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-nilfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=neilb@suse.de \
--cc=paolo.valente@linaro.org \
--cc=philipp.reisner@linbit.com \
--cc=trond.myklebust@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).