[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SN6PR04MB46404C9EC8C29F75E5D1E45BFC610@SN6PR04MB4640.namprd04.prod.outlook.com>
Date: Tue, 14 Jul 2020 09:29:49 +0000
From: Avri Altman <Avri.Altman@....com>
To: Stanley Chu <stanley.chu@...iatek.com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
"bvanassche@....org" <bvanassche@....org>,
"beanhuo@...ron.com" <beanhuo@...ron.com>,
"asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
"cang@...eaurora.org" <cang@...eaurora.org>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kuohong.wang@...iatek.com" <kuohong.wang@...iatek.com>,
"peter.wang@...iatek.com" <peter.wang@...iatek.com>,
"chun-hung.wu@...iatek.com" <chun-hung.wu@...iatek.com>,
"andy.teng@...iatek.com" <andy.teng@...iatek.com>,
"chaotian.jing@...iatek.com" <chaotian.jing@...iatek.com>,
"cc.chou@...iatek.com" <cc.chou@...iatek.com>
Subject: RE: [PATCH v3] scsi: ufs: Cleanup completed request without interrupt
notification
> > > > > +cleanup:
> > > > > + spin_lock_irqsave(host->host_lock, flags);
> > > > > + if (!test_bit(tag, &hba->outstanding_reqs)) {
> > Is this needed? it was already checked in line 6439.
> >
>
> I am worried about the case that interrupt comes very lately.
scsi timeout is 30sec - do you expect an interrupt to arrive after that?
Thanks,
Avri
>For
> example, if interrupt finally comes while ufshcd_abort() is handling
> this command, then probably this command may be completed first by
> interrupt handler. In this case, ufshcd_abort() shall not clear this
> command again. In contrast, if ufshcd_abort() clears this command first,
> then interrupt shall not complete it. Thus here checking
> hba->outstanding_req with host lock held is required to prevent above
> racing.
>
> Thanks,
> Stanley Chu
>
Powered by blists - more mailing lists