Re: [PATCH] workqueue: Fix spurious sanity check failures in destroy_workqueue()

2019-09-20 Thread Tejun Heo
Hello, On Thu, Sep 19, 2019 at 10:49:04AM +0800, Lai Jiangshan wrote: > Looks good to me. > > There is one test in show_pwq() > """ > worker == pwq->wq->rescuer ? "(RESCUER)" : "", > """ > I'm wondering if it needs to be updated to > """ > worker->rescue_wq ? "(RESCUER)" : "", > """ Hmm... yeah

Re: [PATCH] workqueue: Fix spurious sanity check failures in destroy_workqueue()

2019-09-18 Thread Lai Jiangshan
Looks good to me. There is one test in show_pwq() """ worker == pwq->wq->rescuer ? "(RESCUER)" : "", """ I'm wondering if it needs to be updated to """ worker->rescue_wq ? "(RESCUER)" : "", """ And document "/* MD: rescue worker */" might be better than current "/* I: rescue worker */", although

[PATCH] workqueue: Fix spurious sanity check failures in destroy_workqueue()

2019-09-18 Thread Tejun Heo
Before actually destrying a workqueue, destroy_workqueue() checks whether it's actually idle. If it isn't, it prints out a bunch of warning messages and leaves the workqueue dangling. It unfortunately has a couple issues. * Mayday list queueing increments pwq's refcnts which gets detected as b