Re: [PATCH 04/19] sched: Prepare for Core-wide rq->lock

From: Don Hiatt
Date: Fri Apr 30 2021 - 12:18:55 EST


On Thu, Apr 29, 2021 at 4:22 PM Josh Don <joshdon@xxxxxxxxxx> wrote:
>
> On Thu, Apr 29, 2021 at 2:09 PM Don Hiatt <dhiatt@xxxxxxxxxxxxxxxx> wrote:
> >
> > On Thu, Apr 29, 2021 at 1:48 PM Josh Don <joshdon@xxxxxxxxxx> wrote:
> > >
> > > On Wed, Apr 28, 2021 at 9:41 AM Don Hiatt <dhiatt@xxxxxxxxxxxxxxxx> wrote:
> > > >
> > > > I'm still seeing hard lockups while repeatedly setting cookies on qemu
> > > > processes even with
> > > > the updated patch. If there is any debug you'd like me to turn on,
> > > > just let me know.
> > > >
> > > > Thanks!
> > > >
> > > > don
> > >
> > > Thanks for the added context on your repro configuration. In addition
> > > to the updated patch from earlier, could you try the modification to
> > > double_rq_lock() from
> > > https://lkml.kernel.org/r/CABk29NuS-B3n4sbmavo0NDA1OCCsz6Zf2VDjjFQvAxBMQoJ_Lg@xxxxxxxxxxxxxx
> > > ? I have a feeling this is what's causing your lockup.
> > >
> > > Best,
> > > Josh
> >
> > Hi Josh,
> >
> > I've been running Aubrey+Peter's patch (attached) for almost 5 hours
> > and haven't had a single issue. :)
> >
> > I'm running a set-cookie script every 5 seconds on the two VMs (each
> > vm is running
> > 'sysbench --threads=1 --time=0 cpu run' to generate some load in the vm) and
> > I'm running two of the same sysbench runs on the HV while setting cookies
> > every 5 seconds.
> >
> > Unless I jinxed us it looks like a great fix. :)
> >
> > Let me know if there is anything else you'd like me to try. I'm going
> > to leave the tests running
> > and see what happens. I update with what I find.
> >
> > Thanks!
> >
> > don
>
> That's awesome news, thanks for validating. Note that with Aubrey's
> patch there is still a race window if sched core is being
> enabled/disabled (ie. if you alternate between there being some
> cookies in the system, and no cookies). In my reply I posted an
> alternative version to avoid that. If your script were to do the
> on-off flipping with the old patch, you'd might eventually see another
> lockup.

My tests have been running 24 hours now and all is good. I'll do another
test with your changes next as well as continue to test the core-sched queue.

This and all the other patches in Peter's repo:
Tested-by: Don Hiatt <dhiatt@xxxxxxxxxxxxxxxx>

Have a great day and thanks again.

don