fs/io-wq.c:291:2-11: second lock on line 291 (fwd)
PATCH 11/11 fs/io-wq.c:291:2-11: second lock on line 291 (fwd)
Hello,
This is actually complaining about the continues on lines 295 and 298. I guess the calls to io_wq_run_queue and __io_worker_idle release the lock in the case of success?
julia
---------- Forwarded message ----------
Date: Thu, 24 Oct 2019 16:03:20 +0800
From: kbuild test robot <[email protected]>
To: kbuild(a)lists.01.org
Cc: Julia Lawall <[email protected]>
Subject: [block:for-5.5/io_uring-wq 11/11] fs/io-wq.c:291:2-11: second lock on
line 291
CC: kbuild-all(a)lists.01.org
TO: Jens Axboe <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.5/io_uring-wq head: f27f11bf017ca5918ab91b63aa146fbb053c7558 commit: f27f11bf017ca5918ab91b63aa146fbb053c7558 [11/11] io_uring: replace workqueue with io-wq
:::::: branch date: 8 hours ago
:::::: commit date: 8 hours ago
If you fix the issue, kindly add following tag
Quoted 1 line
Quoted 1 line
fs/io-wq.c:291:2-11: second lock on line 291
fs/io-wq.c:291:2-11: second lock on line 313
# https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=f27f11bf017ca5918ab91b63aa146fbb053c7558
git remote add block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git remote update block
git checkout f27f11bf017ca5918ab91b63aa146fbb053c7558
vim +291 fs/io-wq.c
f27f11bf017ca5 Jens Axboe 2019-10-22 279
f27f11bf017ca5 Jens Axboe 2019-10-22 280 static int io_wq_worker(void *data)
f27f11bf017ca5 Jens Axboe 2019-10-22 281 {
f27f11bf017ca5 Jens Axboe 2019-10-22 282 struct io_worker *worker = data;
f27f11bf017ca5 Jens Axboe 2019-10-22 283 struct io_wq *wq = worker->wq;
f27f11bf017ca5 Jens Axboe 2019-10-22 284 DEFINE_WAIT(wait);
f27f11bf017ca5 Jens Axboe 2019-10-22 285
f27f11bf017ca5 Jens Axboe 2019-10-22 286 io_worker_start(wq, worker);
f27f11bf017ca5 Jens Axboe 2019-10-22 287
f27f11bf017ca5 Jens Axboe 2019-10-22 288 while (!test_bit(IO_WQ_BIT_EXIT, &wq->state)) {
f27f11bf017ca5 Jens Axboe 2019-10-22 289 prepare_to_wait(&worker->wait, &wait, TASK_INTERRUPTIBLE);
f27f11bf017ca5 Jens Axboe 2019-10-22 290
f27f11bf017ca5 Jens Axboe 2019-10-22 @291 spin_lock(&wq->lock);
f27f11bf017ca5 Jens Axboe 2019-10-22 292 if (io_wq_run_queue(wq)) {
f27f11bf017ca5 Jens Axboe 2019-10-22 293 __set_current_state(TASK_RUNNING);
f27f11bf017ca5 Jens Axboe 2019-10-22 294 io_worker_handle_work(worker);
f27f11bf017ca5 Jens Axboe 2019-10-22 295 continue;
f27f11bf017ca5 Jens Axboe 2019-10-22 296 }
f27f11bf017ca5 Jens Axboe 2019-10-22 297 if (__io_worker_idle(wq, worker))
f27f11bf017ca5 Jens Axboe 2019-10-22 298 continue;
f27f11bf017ca5 Jens Axboe 2019-10-22 299 spin_unlock(&wq->lock);
f27f11bf017ca5 Jens Axboe 2019-10-22 300 if (signal_pending(current))
f27f11bf017ca5 Jens Axboe 2019-10-22 301 flush_signals(current);
f27f11bf017ca5 Jens Axboe 2019-10-22 302 if (schedule_timeout(WORKER_IDLE_TIMEOUT))
f27f11bf017ca5 Jens Axboe 2019-10-22 303 continue;
f27f11bf017ca5 Jens Axboe 2019-10-22 304 /* timed out, exit unless we're the fixed worker */
f27f11bf017ca5 Jens Axboe 2019-10-22 305 if (test_bit(IO_WQ_BIT_EXIT, &wq->state) ||
f27f11bf017ca5 Jens Axboe 2019-10-22 306 !(worker->flags & IO_WORKER_F_FIXED))
f27f11bf017ca5 Jens Axboe 2019-10-22 307 break;
f27f11bf017ca5 Jens Axboe 2019-10-22 308 }
f27f11bf017ca5 Jens Axboe 2019-10-22 309
f27f11bf017ca5 Jens Axboe 2019-10-22 310 finish_wait(&worker->wait, &wait);
f27f11bf017ca5 Jens Axboe 2019-10-22 311
f27f11bf017ca5 Jens Axboe 2019-10-22 312 if (test_bit(IO_WQ_BIT_EXIT, &wq->state)) {
f27f11bf017ca5 Jens Axboe 2019-10-22 313 spin_lock(&wq->lock);
f27f11bf017ca5 Jens Axboe 2019-10-22 314 if (!list_empty(&wq->work_list))
f27f11bf017ca5 Jens Axboe 2019-10-22 315 io_worker_handle_work(worker);
f27f11bf017ca5 Jens Axboe 2019-10-22 316 else
f27f11bf017ca5 Jens Axboe 2019-10-22 317 spin_unlock(&wq->lock);
f27f11bf017ca5 Jens Axboe 2019-10-22 318 }
f27f11bf017ca5 Jens Axboe 2019-10-22 319
f27f11bf017ca5 Jens Axboe 2019-10-22 320 io_worker_exit(worker);
f27f11bf017ca5 Jens Axboe 2019-10-22 321 return 0;
f27f11bf017ca5 Jens Axboe 2019-10-22 322 }
f27f11bf017ca5 Jens Axboe 2019-10-22 323---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation