Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Keith Busch <kbusch@meta.com>,
	bhelgaas@google.com, linux-pci@vger.kernel.org
Subject: Re: [PATCH] pci: allow user specifiy a reset wait timeout
Date: Mon, 10 Feb 2025 16:15:54 +0100	[thread overview]
Message-ID: <Z6oYKnX9HHPDoCU2@wunner.de> (raw)
In-Reply-To: <Z6oUNYyPzAFkDOSR@kbusch-mbp>

On Mon, Feb 10, 2025 at 07:59:01AM -0700, Keith Busch wrote:
> On Sat, Feb 08, 2025 at 05:50:04AM +0100, Lukas Wunner wrote:
> > On Fri, Feb 07, 2025 at 12:43:10PM -0800, Keith Busch wrote:
> > > The spec does not provide any upper limit to how long a device may
> > > return Request Retry Status. It just says "Some devices require a
> > > lengthy self-initialization sequence to complete". The kernel
> > > arbitrarily chose 60 seconds since that really ought to be enough. But
> > > there are devices where this turns out not to be enough.
> > > 
> > > Since any timeout choice would be arbitrary, and 60 seconds is generally
> > > more than enough for the majority of hardware, let's make this a
> > > parameter so an admin can adjust it specifically to their needs if the
> > > default timeout isn't appropriate.
> > 
> > There are d3hot_delay and d3cold_delay members in struct pci_dev.
> > How about adding a reset_delay which can be set in a device-specific
> > quirk?  I think I'd prefer that over a command line parameter.
> > 
> > A D3cold -> D0 transition implies a reset, but I'm not sure it's
> > appropriate to (ab)use d3cold_delay as a reset_delay.
> 
> My concern with quirking it is that we'd have to settle on what we think
> is the worst case timeout, then it becomes compiled into that kernel for
> that device. The devices I'm dealing with are actively under
> development, and the time to ready gets bigger or smaller as updates
> occur, or some new worst case scenario is discovered. Making this a boot
> time decicion really helps with experimentation here.

I understand, but honestly this doesn't sound like something which
needs to be in the upstream kernel.  If it's for experimentation only,
I'd keep it in the downstream kernel used for experimentation
and if it turns out that 60 sec is insufficient for the final
production device, I'd submit a quirk for that.

Thanks,

Lukas

  reply	other threads:[~2025-02-10 15:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 20:43 [PATCH] pci: allow user specifiy a reset wait timeout Keith Busch
2025-02-08  4:50 ` Lukas Wunner
2025-02-10 14:59   ` Keith Busch
2025-02-10 15:15     ` Lukas Wunner [this message]
2025-02-10 15:32       ` Keith Busch
2025-02-13 13:37 ` Ilpo Järvinen

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=Z6oYKnX9HHPDoCU2@wunner.de \
    --to=lukas@wunner.de \
    --cc=bhelgaas@google.com \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-pci@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