From: Phillip Susi <phill@thesusis.net>
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Uneccesary flushes waking up suspended disks
Date: Tue, 12 Mar 2024 16:35:09 -0400 [thread overview]
Message-ID: <87a5n3dw8y.fsf@vps.thesusis.net> (raw)
In-Reply-To: <20240309173700.GB143836@mit.edu>
"Theodore Ts'o" <tytso@mit.edu> writes:
> In an earlier message from you upthread, you had stated "Since the
> disk is suspended however, there is nothing in the cache to flush, so
> this is wasteful." So that sounded like the flush was happening at
> the wrong time, after the disk has already been suspended?
At some point the disk goes idle. After some time, runtime pm suspends
the disk, which, if there was anything in its write cache, is flushed.
Later, you shutdown or suspend the whole system, and the filesystem sync
issues another flush, just in case, even though there is no need for one
at this point. This causes runtime_pm to wake te disk for no reason.
With an ATA disk that is in ATA standby mode, it happily remains in
standby mode and ignores the flush request, since it knows it has
nothing in its write cache. With runtime pm, the kernel MUST wake the
drive for any request. Thus, in order to make runtime pm work at least
as well as the legacy ATA disk standby, I'm trying to eliminate this
flush command on sync, when there has in fact, been no writes to the
disk either since the last transaction committed and flushed the disk's
write cache, or since the disk was runtime suspended ( which flushed the
write cache ). In other words, if nothing has been written since the
last flush, don't flush again when tne fs is sycned.
next prev parent reply other threads:[~2024-03-12 20:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 13:53 Uneccesary flushes waking up suspended disks Phillip Susi
2024-03-07 15:37 ` Theodore Ts'o
2024-03-08 20:54 ` Phillip Susi
2024-03-09 17:37 ` Theodore Ts'o
2024-03-12 20:35 ` Phillip Susi [this message]
2024-03-11 1:32 ` Dave Chinner
2024-03-15 14:05 ` Phillip Susi
2024-03-16 4:38 ` Darrick J. Wong
2024-03-16 18:35 ` Phillip Susi
2024-03-17 22:45 ` Dave Chinner
2024-03-20 12:38 ` Phillip Susi
2024-03-20 21:58 ` Dave Chinner
2024-03-25 17:09 ` Phillip Susi
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=87a5n3dw8y.fsf@vps.thesusis.net \
--to=phill@thesusis.net \
--cc=linux-fsdevel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.