All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bean Huo <huobean@gmail.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-scsi@vger.kernel.org,
	Adrian Hunter <adrian.hunter@intel.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Bean Huo <beanhuo@micron.com>, Avri Altman <avri.altman@wdc.com>,
	Jinyoung Choi <j-young.choi@samsung.com>
Subject: Re: [PATCH v3 8/8] scsi: ufs: Fix a deadlock between PM and the SCSI error handler
Date: Sun, 02 Oct 2022 23:21:35 +0200	[thread overview]
Message-ID: <27eaae3fe2b3eb715091f09b38e8d500bc9def52.camel@gmail.com> (raw)
In-Reply-To: <af357394-7329-b218-ccf9-65944a35fc6e@acm.org>

On Fri, 2022-09-30 at 10:15 -0700, Bart Van Assche wrote:
> > > +       ufshcd_link_recovery(hba);
> > > +       dev_info(hba->dev, "%s() finished; outstanding_tasks =
> > > %#lx.\n",
> > > +                __func__, hba->outstanding_tasks);
> > > +
> > > +       return hba->outstanding_tasks ? SCSI_EH_RESET_TIMER :
> > > SCSI_EH_DONE;
> > 
> > Bart,
> > 
> > you have reset the device and host,  in the case, there are pending
> > TMs, Should be cleared locally, just like ufshcd_err_handler()
> > does?
> 
> Hi Bean,
> 
> Do you agree with the following?
> * SCSI task management functions are only submitted by the SCSI error
>    handler.
> * The ufshcd_link_recovery() call added by this patch can only be
>    invoked during system suspend.
> * System suspend only happens after processes and kernel threads have
>    been frozen and after sync() finished. Hence, no I/O should be in
>    progress when ufshcd_wl_suspend() is called and the SCSI error
> handler
>    should not be running either.
> * Hence, no SCSI commands other than START STOP UNIT should be in
>    progress when the ufshcd_link_recovery() call added by this
>    patch is invoked. No TMFs should be in progress either.
> 
> Thanks,
> 
> Bart.

Hi Bart,

Yes, install the whole series of changes, ufshcd_link_recovery() will
be called during the system is in suspending in the case of SSU
timeouts. in this case, outstanding_tasks should be 0? 

Kind regards,
Bean

  reply	other threads:[~2022-10-02 21:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 22:00 [PATCH v3 0/8] Fix a deadlock in the UFS driver Bart Van Assche
2022-09-29 22:00 ` [PATCH v3 1/8] scsi: core: Fix a race between scsi_done() and scsi_timeout() Bart Van Assche
2022-09-30  0:17   ` Mike Christie
2022-09-30  0:32     ` Bart Van Assche
2022-09-29 22:00 ` [PATCH v3 2/8] scsi: core: Change the return type of .eh_timed_out() Bart Van Assche
2022-09-29 22:00 ` [PATCH v3 3/8] scsi: core: Support failing requests while recovering Bart Van Assche
2022-10-03 17:27   ` Mike Christie
2022-10-03 19:20     ` Bart Van Assche
2022-09-29 22:00 ` [PATCH v3 4/8] scsi: ufs: Remove an outdated comment Bart Van Assche
2022-09-30 10:26   ` Bean Huo
2022-10-03  5:55   ` Adrian Hunter
2022-09-29 22:00 ` [PATCH v3 5/8] scsi: ufs: Use 'else' in ufshcd_set_dev_pwr_mode() Bart Van Assche
2022-09-30 10:28   ` Bean Huo
2022-10-03  5:58   ` Adrian Hunter
2022-09-29 22:00 ` [PATCH v3 6/8] scsi: ufs: Try harder to change the power mode Bart Van Assche
2022-09-30 12:14   ` Bean Huo
2022-10-03  6:10   ` Adrian Hunter
2022-10-03 16:38     ` Bart Van Assche
2022-09-29 22:00 ` [PATCH v3 7/8] scsi: ufs: Track system suspend / resume activity Bart Van Assche
2022-10-03  6:10   ` Adrian Hunter
2022-09-29 22:00 ` [PATCH v3 8/8] scsi: ufs: Fix a deadlock between PM and the SCSI error handler Bart Van Assche
2022-09-30 15:03   ` Bean Huo
2022-09-30 17:15     ` Bart Van Assche
2022-10-02 21:21       ` Bean Huo [this message]
2022-10-04  0:21         ` Bart Van Assche
2022-10-03  6:18   ` Adrian Hunter
2022-10-03 16:45     ` Bart Van Assche

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=27eaae3fe2b3eb715091f09b38e8d500bc9def52.camel@gmail.com \
    --to=huobean@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=j-young.choi@samsung.com \
    --cc=jaegeuk@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 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.