Re: [GIT PULL] ata fixes for 6.5-rc5

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

 



On Sat, 5 Aug 2023 at 19:26, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>  (a) split manage_start_stop into three bits for the three actual
> cases it deals with: (stop_on_suspend, stop_on_shutdown,
> start_on_resume).
>
>  (b) then not set the "start_on_resume" bit

Side note: the ATA layer already has

 - ATA_FLAG_NO_POWEROFF_SPINDOWN

which seems to basically be very close to "don't send stop on shutdown"

And in fact, it looks like

 - ATA_FLAG_NO_HIBERNATE_SPINDOWN

is in turn very close to "don't send stop on suspend". So if that
manage_start_stop had been just split into those three actions, it
sounds like those ATA_FLAG flags we have would basically have
translated to setting those bits too.

And the whole "start" seems to be translated to "ATA_CMD_VERIFY for
the first sector", which would seem to be literally just a random
command intentionally chosen to not return any actual data.

The *only* effect of doing that 'start' is to cause extra disk IO
early that is then ignored. Logically it doesn't actually do anything
useful, and it would seem like it might actually be an actively bad
thing (ie spinning up a disk on a laptop for potentially no actual
good reason, and waiting for this all to happen).

End result: it really smells like ATA fundamentally doesn't want the
whole 'manage_start_stop' noise AT ALL.

You just removed the nasty early start with that 'no_start_on_resume'
bit, and the spindown seems to be questionable on at least some
machines too.

So I wonder: did somebody test just removing the setting of that flag entirely?

I guess ATA is legacy enough these days that people want to make
minimal changes, although that 'no_start_on_resume' really doesn't
smell all that much more minimal to me than not sending spindown
commands.

        Linus



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux