All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [git pull] PCI fixes
Date: Wed, 07 Dec 2011 16:58:44 +0900	[thread overview]
Message-ID: <4EDF1CB4.5040305@jp.fujitsu.com> (raw)
In-Reply-To: <CA+55aFwuZxGZhXyhj+cb5WLnFPDh45Dy6BwgmvEQKAM5swaM6w@mail.gmail.com>

(2011/12/07 1:14), Linus Torvalds wrote:
> On Tue, Dec 6, 2011 at 12:08 AM, Kenji Kaneshige
> <kaneshige.kenji@jp.fujitsu.com>  wrote:
>>
>> In the past, pciehp waits 100 ms instead of 1 sec after checking the link
>> state. This 100 ms was based on PCIe spec.
>
> I would like to point out that these kinds of delays are *really*
> annoying to users. And they add up.
>
> One second per se is not a huge problem, but imagine that you're
> hotplugging some regular user device (think thunderbolt or something
> that we'd expect normal users to see). First one second for the kernel
> to even see it, then some random udev rules, then some disk spinup
> times or whatever, and soon a few delays here and a few delays there,
> and it takes say three seconds for the folder to show up on the
> desktop (or whatever acknowledgement of "yes, I see your device now").
>
> That's a *long* time, and it's irritating to the user. It makes the
> user think "the machine is slow".
>
> We used to have this exact problem with USB hotplugging with slow
> devices, so I know. It's still not necessarily immediate, but it's
> better than it has been.
>
> One second *total* is what people will consider pretty much immediate.
> Any more than that is "thumb twiddling time".
>
> And quite frankly, an unconditional one-second delay here seems bad.
> Two seconds was unacceptable, one second is just bad.
>
>>                                                               This is
>> based on the PCIe description "software must allow 1 second after the Data
>> Link Layer Link Active bit reads 1b before it is permitted to determine
>> that a hot plugged device which fails to return a Successful Completion for
>> a Valid Configuration Request is a broken device".
>
> Quite frankly, the way that reads to me says "you must wait at most 1s
> before you consider a device broken".
>
> But a *successful* read of the LT bit should abort the wait early. So
> that good devices that aren't broken can complete setup much faster.
>
> Please try to make something like that work. Instead of always waiting
> for one second, wait for up to one second only for failure cases. Any
> possibility of that?
>
> Clearly most devices are perfectly fine almost immediately. It's sad
> to wait for good devices for no good reason.
>

Thank you for comments. Yes, I think we can do more efforts on this.

To improve this, I think what we need is something to know if configuration
request to the hot-added device starts working. One possible idea so far is
to enable CRS Software Visibility and check vendor ID. The pci_scan_device()
function already has vendor ID check, but the code to enable CRS was removed
for some reason.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ad7edfe0490877864dc0312e5f3315ea37fc4b3a

Regards,
Kenji Kaneshige

  parent reply	other threads:[~2011-12-07  7:59 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23 22:44 [git pull] PCI fixes Jesse Barnes
2011-11-23 23:02 ` Linus Torvalds
2011-12-05 19:22   ` Jesse Barnes
2011-12-06  8:08     ` Kenji Kaneshige
2011-12-06 16:14       ` Linus Torvalds
2011-12-06 22:36         ` Yinghai Lu
2011-12-07  8:18           ` Kenji Kaneshige
2011-12-07 19:20             ` Yinghai Lu
2011-12-07  7:58         ` Kenji Kaneshige [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-05 21:49 Jesse Barnes
2012-02-17 17:24 Jesse Barnes
2011-12-17 17:29 Jesse Barnes
2011-12-18  2:33 ` Yinghai Lu
2011-12-18  5:52   ` Jesse Barnes
2011-12-18 22:14     ` Linus Torvalds
2012-01-06 20:46       ` Jesse Barnes
2012-01-07  1:14         ` Yinghai Lu
2011-08-19 16:17 Jesse Barnes
2011-08-19 16:46 ` Greg KH
2011-08-19 17:12   ` Jesse Barnes
2011-08-19 17:19     ` Jesse Barnes
2011-06-23 20:37 Jesse Barnes
2011-06-24 15:38 ` Linus Torvalds
2011-06-24 15:53   ` Jesse Barnes
2011-06-24 16:07     ` Linus Torvalds
2011-06-24 16:11       ` Jesse Barnes
2011-06-24 22:56         ` Linus Torvalds
2011-06-25  0:00           ` Jesse Barnes
2011-06-25  0:17             ` Yinghai Lu
2011-06-28 17:02           ` Jesse Barnes
2011-06-29  1:04             ` Ram Pai
2011-03-25 17:22 Jesse Barnes
2010-12-17 23:29 Jesse Barnes
2010-11-15 17:45 Jesse Barnes
2010-11-16 11:16 ` Andreas Schwab
2010-11-16 11:23   ` Wolfram Sang
2010-11-16 17:00   ` Jesse Barnes
2010-08-31 15:49 Jesse Barnes
2010-06-09 22:53 Jesse Barnes
2010-06-09 23:14 ` Linus Torvalds
2010-06-10  0:20   ` Jesse Barnes
2010-06-11 21:02   ` Jesse Barnes
2010-06-11 21:02     ` Jesse Barnes
2010-04-29  3:14 Jesse Barnes
2010-04-23 20:37 Jesse Barnes
2010-03-26 23:33 Jesse Barnes
2010-01-29  0:25 Jesse Barnes
2010-01-07 22:34 Jesse Barnes
2009-12-28 16:10 Jesse Barnes
2009-11-11  8:12 Jesse Barnes
2009-10-12 17:32 Jesse Barnes
2009-08-10 17:30 Jesse Barnes
2009-07-06 18:00 Jesse Barnes
2009-06-06 20:32 Jesse Barnes
2009-05-15 22:09 Jesse Barnes
2009-04-27 18:54 Jesse Barnes
2009-04-07 18:00 Jesse Barnes
2009-02-26 22:24 Jesse Barnes
2009-02-26 22:36 ` Matthew Wilcox
2009-02-26 22:39   ` Jesse Barnes
2009-02-27  0:45 ` Jesse Barnes
2009-02-13 22:07 Jesse Barnes
2009-02-03  2:19 Jesse Barnes
2009-01-21 22:00 Jesse Barnes
2008-12-19  1:30 Jesse Barnes
2008-11-13 20:50 Jesse Barnes
2008-11-07 17:00 Jesse Barnes
2008-09-23 19:14 Jesse Barnes
2008-09-13  0:02 Jesse Barnes
2008-08-25 17:07 Jesse Barnes
2008-08-19 17:03 Jesse Barnes
2008-08-11 17:27 Jesse Barnes
2008-07-07 22:34 Jesse Barnes
2008-06-14 20:23 Jesse Barnes
2008-06-14 20:29 ` Rafael J. Wysocki
2008-06-06 18:26 Jesse Barnes
2008-06-06 22:04 ` Jeff Garzik
2008-06-06 22:16   ` Jesse Barnes
2008-05-27 22:55 Jesse Barnes
2008-05-20 17:51 Jesse Barnes
2008-05-13 17:42 Jesse Barnes

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=4EDF1CB4.5040305@jp.fujitsu.com \
    --to=kaneshige.kenji@jp.fujitsu.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 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.