mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Stanley Jhu <stanleyjhu@google.com>, Jens Axboe <axboe@kernel.dk>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
	Praveen Talari <praveen.talari@oss.qualcomm.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	linux-block@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] block: Keep RPM_ACTIVE in blk_pre_runtime_resume() when already active
Date: Tue, 3 Nov 2026 12:54:35 -0800	[thread overview]
Message-ID: <6e42537e-c7da-4b44-90bf-dc4cf30be6cf@acm.org> (raw)
In-Reply-To: <20261029040001.2100001-1-stanleyjhu@google.com>

On 10/29/26 12:08 AM, Stanley Jhu wrote:
> @@ -153,7 +154,9 @@ void blk_pre_runtime_resume(struct request_queue *q)
>   		return;
>   
>   	spin_lock_irq(&q->queue_lock);
> -	q->rpm_status = RPM_RESUMING;
> +	/* Keep RPM_ACTIVE if a prior failed resume reactivated the queue. */
> +	if (q->rpm_status != RPM_ACTIVE)
> +		q->rpm_status = RPM_RESUMING;
>   	spin_unlock_irq(&q->queue_lock);
>   }
>   EXPORT_SYMBOL(blk_pre_runtime_resume);


Stanley, the analysis looks right to me. Could you make the invariant 
explicit? Only move SUSPENDED -> RESUMING in blk_pre_runtime_resume(), 
and only call blk_clear_pm_only() in blk_post_runtime_resume() if 
old_status == RPM_RESUMING. Please also describe in the commit message 
how this was tested. With those changes:

Reviewed-by: Bart Van Assche bvanassche@acm.org

Separately: since commit eef1d74bf88f, ufshcd_recover_pm_error() no 
longer sees power.runtime_error after a resume failure. Its handling of 
that case is probably dead code now.

Thanks,

Bart.

      parent reply	other threads:[~2026-11-03 20:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29  7:08 Stanley Jhu
2026-10-29 16:22 ` Bart Van Assche
2026-11-03 19:49   ` Brian Norris
2026-11-03 20:51     ` Bart Van Assche
2026-11-03 20:54 ` Bart Van Assche [this message]

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=6e42537e-c7da-4b44-90bf-dc4cf30be6cf@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=praveen.talari@oss.qualcomm.com \
    --cc=rafael@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stanleyjhu@google.com \
    --cc=stern@rowland.harvard.edu \
    /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®