Re: Uneccesary flushes waking up suspended disks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Theodore Ts'o" <tytso@xxxxxxx> 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.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux