[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aG9zIQTuMqmfauVE@infradead.org>
Date: Thu, 10 Jul 2025 01:00:33 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Jeff Layton <jlayton@...nel.org>
Cc: NeilBrown <neil@...wn.name>, Trond Myklebust <trondmy@...nel.org>,
Anna Schumaker <anna@...nel.org>,
Chuck Lever <chuck.lever@...cle.com>,
Olga Kornievskaia <okorniev@...hat.com>,
Dai Ngo <Dai.Ngo@...cle.com>, Tom Talpey <tom@...pey.com>,
Mike Snitzer <snitzer@...nel.org>, linux-nfs@...r.kernel.org,
linux-kernel@...r.kernel.org, axboe@...nel.dk,
kundanthebest@...il.com, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH RFC 0/2] nfsd: issue POSIX_FADV_DONTNEED after
READ/WRITE/COMMIT
On Sat, Jul 05, 2025 at 07:32:58AM -0400, Jeff Layton wrote:
> That is the fundamental question: should we delay writeback or not? It
> seems like delaying it is probably best, even in the modern era with
> SSDs, but we do need more numbers here (ideally across a range of
> workloads).
If you have asynchronous writeback there's probably no good reason to
delay it per-se. But it does make sense to wait long enough to have
a large I/O size, especially with some form of parity raid you'll want
to fill up the chunk, but also storage devices themselves will perform
much better with a larger size. e.g. for HDD you'll want to write 1MB
batches, and similar write sizes also help with for SSDs. While the
write performance itself might not be much worse with smaller I/O
especially for high quality ones, large I/O helps to reduce the
internal fragmentation and thus later reduces garbage collection
overhead and thus increases life time.
> > Ideally DONTCACHE should only affect cache usage and the latency of
> > subsequence READs. It shouldn't affect WRITE behaviour.
> >
>
> It definitely does affect it today. The ideal thing IMO would be to
> just add the dropbehind flag to the folios on writes but not call
> filemap_fdatawrite_range_kick() on every write operation.
Yes, a mode that sets drop behind but leaves writeback to the
writeback threads can be interesting. Right now it will still be
bottlenecked by the single writeback thread, but work on this is
underway.
Powered by blists - more mailing lists