public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sourabh Jain <sourabhjain@linux.ibm.com>
To: litaliano00 <litaliano00.contact@gmail.com>
Cc: maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com,
	chleroy@kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/fadump: Add timeout to RTAS busy-wait loops
Date: Tue, 14 Apr 2026 15:59:35 +0530	[thread overview]
Message-ID: <e0fec974-4bea-4a34-8b3b-2d9defca332a@linux.ibm.com> (raw)
In-Reply-To: <CAK-CEVPA-qi9CvPyurDarLT-OFtOQJDmFoe=+pE1bBBy5fuLOQ@mail.gmail.com>



On 14/04/26 03:07, litaliano00 wrote:
> On Mon, Apr 13, 2026, 15: 50 Sourabh Jain 
> <sourabhjain@ linux. ibm. com> wrote: > What is the rationale behind 
> choosing a 60-second limit? The 60-second value was chosen somewhat 
> arbitrarily. Looking at rtas_busy_delay_time(), the maximum
> 
> On Mon, Apr 13, 2026, 15:50 Sourabh Jain <sourabhjain@linux.ibm.com> 
> wrote:
>
>     > What is the rationale behind choosing a 60-second limit? 
>
>
>     The 60-second value was chosen somewhat arbitrarily. Looking at
>
>     rtas_busy_delay_time(), the maximum single delay returned is 100000ms
>
>     (status 9905). In practice, legitimate busy delays are expected to be
>
>     much shorter. I was following the spirit of rtas-rtc.c which uses a
>
>     5-second limit for simpler operations; fadump is a heavier firmware
>
>     operation, so I went higher. I am open to suggestions on a more
>
>     principled value.
>


phyp/RTAS is a black box to me, so it is hard to conclude
what happens during fadump register/unregister/invalidate.
However, based on QEMU's fadump implementation, all three
operations do not seem very complex.

That said, I am OK with a 60 sec timeout.

I would also recommend adding pr_debug logs when the wait
time is hit. It might help debug cases where the kernel
reaches the 60 sec limit especially during boot.

- Sourabh Jain

>
>     > Would it make sense to introduce a helper function to wrap the
>
>     > rtas_call, along with handling the wait time and timeout?
>
>
>     Absolutely, I will introduce a helper in v2. The three sites are
>
>     indeed identical except for the FADUMP_REGISTER/UNREGISTER/INVALIDATE
>
>     argument and the struct pointer/size. I will factor out the common
>
>     busy-wait loop into a static helper.
>
>
>     Will send v2 shortly from my new email adri.vero.dev@gmail.com
>
>
>     Adriano
>
>


  parent reply	other threads:[~2026-04-14 10:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-06  6:15 [PATCH] powerpc/fadump: Add timeout to RTAS busy-wait loops Adriano Vero
2026-04-07  4:06 ` Ritesh Harjani
2026-04-13 13:50 ` Sourabh Jain
     [not found]   ` <CAK-CEVPA-qi9CvPyurDarLT-OFtOQJDmFoe=+pE1bBBy5fuLOQ@mail.gmail.com>
2026-04-14 10:29     ` Sourabh Jain [this message]
2026-04-19  6:50 ` [PATCH v2] " Adriano Vero

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=e0fec974-4bea-4a34-8b3b-2d9defca332a@linux.ibm.com \
    --to=sourabhjain@linux.ibm.com \
    --cc=chleroy@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=litaliano00.contact@gmail.com \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    /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