Re: [PATCH] x86/sgx: Avoid softlockup from sgx_vepc_release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 17, 2023 at 6:02 PM Jarkko Sakkinen <jarkko@xxxxxxxxxx> wrote:
>
> On Thu Aug 17, 2023 at 10:00 AM UTC, Huang, Kai wrote:
> > On Thu, 2023-08-17 at 09:38 +0200, Jinpu Wang wrote:
> > > > This adds cond_resched() to the first two loops: releasing non-SECS pages and
> > > > releasing SECS pages which don't have children on remote vepc instance(s).
> > > > There is a third round loop to release SECS pages which have children on remote
> > > > vepc instance(s).  I think it's better to add cond_resched() there too, although
> > > > it's extremely unlikely it could trigger softlockup w/o cond_resched().
> > >
> > > I also think the third one are extremely unlikely could cause softlockup.
> > > And our tests do not hit it either.
> >
> > If we only consider your tests, then I believe you even don't need the second
> > cond_resched()?
> >
> > I think we should just add cond_resched() to all the three loops.  No harm, and
> > we don't need to worry about this anymore.
>
> I'm fine with this.

Ok, as both of you think it's better to cover all 3 cases. I will do
it in v3 later today.
>
> BR, Jarkko
Thx!




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux