Messages in this thread | | | Subject | Re: [PATCH 3/3] kernel/workqueue: Suppress a false positive lockdep complaint | From | Bart Van Assche <> | Date | Thu, 25 Oct 2018 10:11:51 -0700 |
| |
On Thu, 2018-10-25 at 19:02 +0200, Johannes Berg wrote: > On Thu, 2018-10-25 at 15:05 +0000, Bart Van Assche wrote: > > It can happen that the direct I/O queue creates and destroys an empty > > workqueue from inside a work function. > > So, thinking about this more, can you guarantee (somehow) that the > workqueue is empty at this point?
In general, no. But for the direct I/O case this can be guaranteed. Please have a look at the code in sb_init_dio_done_wq() if you would not yet have done this.
> Do you know how to reproduce this?
The lockdep complaint in the patch description is easy to reproduce. The way I reproduce it is as follows:
git clone https://github.com/osandov/blktests (cd blktests && ./check -q nvmeof-mp)
Bart.
| |