From: Phillip Susi <phill@thesusis.net>
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] [RFC] Fix jbd2 to stop waking up sleeping disks on sync
Date: Thu, 29 Feb 2024 15:19:50 -0500 [thread overview]
Message-ID: <877cin58gp.fsf@vps.thesusis.net> (raw)
In-Reply-To: <20240229145858.GE272762@mit.edu>
"Theodore Ts'o" <tytso@mit.edu> writes:
> Because no metadata changed, jbd2 will not even *start* a (jbd2)
> transaction as a result of that write (overwrite) to an already
> allocated data block.. Since it didn't start a jbd2 transaction for
> this file system operation, there's no reason to force a jbd2
> transaction to close.
>
> (Note: this could because there *is* no currently existing open
> transaction, or there might be a currently open transaction, but it's
> not relevent to the activity associated with the file descriptor being
> fsync'ed.)
>
> This is a critical performance optimization, because for many database
> workloads, which are overwriting existing blocks and using
> fdatasync(2), there is no reason to force a jbd2 transaction commit
> for every single fdatasync(2) issued by the database. However, we
> still need to send a cache flush operation so that the data block is
> safely persistend onto stable storage.
So maybe what ext4's sync_fs needs to know is whether ANY writes have
been done since the last transaction committed? Is there a way to know
that? As long as NOTHING has been written since the last commit, then
there is no need to issue a flush.
prev parent reply other threads:[~2024-02-29 20:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 21:25 [PATCH] [RFC] Fix jbd2 to stop waking up sleeping disks on sync Phillip Susi
2024-02-29 8:07 ` Theodore Tso
2024-02-29 14:23 ` Phillip Susi
2024-02-29 14:58 ` Theodore Ts'o
2024-02-29 20:19 ` Phillip Susi [this message]
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=877cin58gp.fsf@vps.thesusis.net \
--to=phill@thesusis.net \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).