From: Jeff Layton <jlayton@kernel.org>
To: NeilBrown <neilb@suse.de>
Cc: Jan Kara <jack@suse.cz>,
linux-doc@vger.kernel.org, "Darrick J. Wong" <djwong@kernel.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
drbd-dev@lists.linbit.com,
Paolo Valente <paolo.valente@linaro.org>,
Miklos Szeredi <miklos@szeredi.hu>,
Trond Myklebust <trond.myklebust@hammerspace.com>,
Ilya Dryomov <idryomov@gmail.com>,
linux-ext4@vger.kernel.org, linux-nilfs@vger.kernel.org,
Jaegeuk Kim <jaegeuk@kernel.org>,
ceph-devel@vger.kernel.org,
Ryusuke Konishi <konishi.ryusuke@gmail.com>,
Jens Axboe <axboe@kernel.dk>,
linux-nfs@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Philipp Reisner <philipp.reisner@linbit.com>,
linux-f2fs-devel@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org,
Lars Ellenberg <lars.ellenberg@linbit.com>,
Wu Fengguang <fengguang.wu@intel.com>,
Anna Schumaker <anna.schumaker@netapp.com>
Subject: Re: [f2fs-dev] [PATCH 06/11] ceph: remove reliance on bdi congestion
Date: Fri, 04 Mar 2022 06:14:03 -0500 [thread overview]
Message-ID: <1c5aa5552850dc90bdeb5f8bc0e4f5dd3270a382.camel@kernel.org> (raw)
In-Reply-To: <164636204663.29369.1845040729675190216@noble.neil.brown.name>
On Fri, 2022-03-04 at 13:47 +1100, NeilBrown wrote:
> On Thu, 24 Feb 2022, Jeff Layton wrote:
> > On Thu, 2022-02-24 at 16:41 +1100, NeilBrown wrote:
> > > 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 <neilb@suse.de>
> > > >
> > > > 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.
> > >
> >
> > In that case, maybe we should be counting in-flight reads too and deny
> > readahead when the count crosses some threshold? It seems a bit silly to
> > only look at writes when it comes to "congestion".
>
> I agree that seems a bit silly.
>
> >
> > > 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.
> > >
> >
> > I lean more toward just removing it. The existing implementation seems a
> > bit half-baked with the gaps in what's being counted. Granted, the
> > default congestion threshold is pretty high with modern memory sizes, so
> > it probably doesn't come into play much in practice, but removing it
> > would reduce some complexity in the client.
>
> I'd love to have some test that could reliably generate congestion and
> measure latencies for other IO. Without that, it is mostly guess work.
> So I cannot argue against your proposal, and do agree that removing the
> code would reduce complexity. I have no idea what the costs might be -
> if any. Hence my focus was on not changing behaviour.
>
Fair enough -- caution is warranted.
I think the thing to do here is to take your patch for now, and then we
can look at just removing all of this stuff at some point in the future.
That would also give us a fallback that doesn't require the old
congestion infrastructure if it turns out that it is needed.
I'm assuming this is going in via Andrew's tree, but let us know if
you'd like us to take any of these in via the ceph tree.
Thanks,
--
Jeff Layton <jlayton@kernel.org>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2022-03-04 11:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 3:17 [f2fs-dev] [PATCH 00/11] Remove remaining parts of congestion tracking code NeilBrown
2022-02-22 3:17 ` [f2fs-dev] [PATCH 07/11] Remove inode_congested() NeilBrown
2022-02-22 3:17 ` [f2fs-dev] [PATCH 06/11] ceph: remove reliance on bdi congestion NeilBrown
2022-02-23 15:43 ` Jeff Layton
2022-02-24 5:41 ` NeilBrown
2022-02-24 11:30 ` Jeff Layton
2022-03-04 2:47 ` NeilBrown
2022-03-04 11:14 ` Jeff Layton [this message]
2022-02-22 3:17 ` [f2fs-dev] [PATCH 11/11] Remove congestion tracking framework NeilBrown
2022-02-22 3:17 ` [f2fs-dev] [PATCH 03/11] MM: improve cleanup when ->readpages doesn't process all pages NeilBrown
2022-03-01 13:00 ` Miklos Szeredi
2022-03-04 2:23 ` NeilBrown
2022-02-22 3:17 ` [f2fs-dev] [PATCH 04/11] fuse: remove reliance on bdi congestion NeilBrown
2022-03-01 13:27 ` Miklos Szeredi
2022-03-04 2:42 ` NeilBrown
2022-02-22 3:17 ` [f2fs-dev] [PATCH 05/11] nfs: " NeilBrown
2022-02-22 3:17 ` [f2fs-dev] [PATCH 08/11] Remove bdi_congested() and wb_congested() and related functions NeilBrown
2022-02-22 3:17 ` [f2fs-dev] [PATCH 02/11] MM: document and polish read-ahead code NeilBrown
2022-02-22 3:17 ` [f2fs-dev] [PATCH 01/11] DOC: convert 'subsection' to 'section' in gfp.h NeilBrown
2022-02-22 3:17 ` [f2fs-dev] [PATCH 10/11] block/bfq-iosched.c: use "false" rather than "BLK_RW_ASYNC" NeilBrown
2022-02-22 3:17 ` [f2fs-dev] [PATCH 09/11] f2fs: replace congestion_wait() calls with io_schedule_timeout() NeilBrown
-- strict thread matches above, loose matches on Subject: below --
2022-02-10 5:37 [f2fs-dev] [PATCH 00/11] Remove remaining parts of congestion tracking code NeilBrown
2022-02-10 5:37 ` [f2fs-dev] [PATCH 06/11] ceph: remove reliance on bdi congestion NeilBrown
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=1c5aa5552850dc90bdeb5f8bc0e4f5dd3270a382.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=djwong@kernel.org \
--cc=drbd-dev@lists.linbit.com \
--cc=fengguang.wu@intel.com \
--cc=idryomov@gmail.com \
--cc=jack@suse.cz \
--cc=jaegeuk@kernel.org \
--cc=konishi.ryusuke@gmail.com \
--cc=lars.ellenberg@linbit.com \
--cc=linux-doc@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).