mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Indan Zupancic" <indan@nul.nu>
To: "Tejun Heo" <htejun@gmail.com>
Cc: "Paul Mundt" <lethal@linux-sh.org>,
	jeff@garzik.org, linux-ide@vger.kernel.org,
	linux-kernel@vger.kernel.org, garyhade@us.ibm.com
Subject: Re: [PATCH] libata: implement ata_wait_after_reset()
Date: Sun, 20 May 2007 00:54:49 +0200 (CEST)	[thread overview]
Message-ID: <2318.81.207.0.53.1179615289.squirrel@secure.samage.net> (raw)
In-Reply-To: <464F409D.9030408@gmail.com>

On Sat, May 19, 2007 20:23, Tejun Heo wrote:
> Indan Zupancic wrote:
>> Resume takes now ten seconds or more, while it used to take only a few seconds,
>> what changed? A few kernel versions ago (2.6.21-rc or so?) it retried in 5 seconds
>> instead of 10, but even that is too long.
>
> There are two different things at play here...
>
> 1. We dropped libata specific suspend/resume implementation in favor of
> sd driven one.  Unfortunately, the new implementation currently can't do
> background spinup, so that's probably why you can feel the delay.  We
> need to figure out how to do background spinup with the new implementation.

What are the advantages of that, except slower resume? ;-)

> 2. To make reset finish in defined time, each reset try now has defined
> deadlines.  I was trying to be conservative so I chose 10sec for the
> first try.

Right. So to me it seems that failed, because the undefined reset time is just
replaced with a fixed ad hoc sleep, which is longer than any undefined reset
mechanism. So where did the advantage go? Better to go back to how it was,
is my impression. Or make that deadline 10 seconds and after that give up,
instead of the other way round. Or just move to async reset.

>  It's driven by timing table near the top of libata-eh.c, so
> adjusting the table is easy and maybe we can be a bit more aggressive
> with the first two tries.  But if we solve #1, this shouldn't matter too
> much.

#2 seems totally unrelated to #1, as #1 is about spinup, and #2 about reset.
Only relation is that #2 slows down #1 because #1 needs to wait on #2.


>> Maybe a silly question, but why do we wait for the harddisk to show up? Maybe that
>> makes a little bit of sense at bootup, but for resume from ram, where nothing is
>> supposed to have changed, it seems a bit strange. Why not wait when something tries
>> to access the harddisk or something?
>
> I hope it's explained now.

Almost. Explained is why we wait on the disk, but that's only the sd_resume part.
It's still unclear why resume must wait till the reset is done.


>> I wonder if sil_pci_device_resume() and sd_resume() know about each other...
>> I'll disable sd_resume() and see how that goes.
>
> Yeap, that should work.  In most configurations, devices spin up
> immediately after power is restored.  sd_resume() just waits for the
> device to be revalidated in such cases.

And it kicks the disk into action. Why? Only thing it does is sending a START_STOP
command. I assume that causes the disk to spin up. But for e.g. laptopmode I can
imagine that's quite annoying. I think sd_resume() is totally unnecessary and can
be removed, because it seems wrong to always force the harddisk to spin up,
background spin up or not.

Greetings,

Indan



  reply	other threads:[~2007-05-19 22:55 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-10  7:20 libata reset-seq merge broke sata_sil on sh Paul Mundt
2007-05-10 11:28 ` Tejun Heo
2007-05-10 11:53   ` Tejun Heo
2007-05-10 12:46     ` Paul Mundt
2007-05-10 13:08       ` Tejun Heo
2007-05-11  0:52         ` Paul Mundt
2007-05-11  9:39           ` Tejun Heo
2007-05-12  3:49             ` Paul Mundt
2007-05-16  0:30               ` Paul Mundt
2007-05-16 16:44                 ` [PATCH] libata: implement ata_wait_after_reset() Tejun Heo
2007-05-17  0:50                   ` Paul Mundt
2007-05-17  0:59                     ` Paul Mundt
2007-05-19 15:54                   ` Indan Zupancic
2007-05-19 18:23                     ` Tejun Heo
2007-05-19 22:54                       ` Indan Zupancic [this message]
2007-05-20  9:50                         ` Tejun Heo
2007-05-20 13:26                           ` Indan Zupancic
2007-05-20 17:09                             ` Tejun Heo
2007-05-20 19:35                               ` Indan Zupancic
2007-05-19 16:39                   ` Indan Zupancic
2007-05-19 18:43                     ` Tejun Heo
2007-05-19 19:04                       ` Tejun Heo
2007-05-19 22:33                         ` sd_resume redundant? [was: [PATCH] libata: implement ata_wait_after_reset()] Indan Zupancic
2007-05-20  9:54                           ` Tejun Heo
2007-05-20 14:27                             ` Indan Zupancic
2007-05-20 17:17                               ` Tejun Heo
2007-05-20 19:47                                 ` Indan Zupancic
2007-05-21  6:02                         ` [PATCH] libata: implement ata_wait_after_reset() Paul Mundt
2007-05-29  1:31                   ` Jeff Garzik
2007-05-29  7:33                     ` Tejun Heo

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=2318.81.207.0.53.1179615289.squirrel@secure.samage.net \
    --to=indan@nul.nu \
    --cc=garyhade@us.ibm.com \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®