在 2021/4/6 上午5:46, Jens Axboe 写道:
On 4/5/21 1:53 AM, Hao Xu wrote:
leverage xor to simplify code in __io_worker_busy
Signed-off-by: Hao Xu <haoxu@xxxxxxxxxxxxxxxxx>
---
fs/io-wq.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/fs/io-wq.c b/fs/io-wq.c
index 433c4d3c3c1c..8d8324eba2ec 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -276,10 +276,12 @@ static void io_wqe_dec_running(struct io_worker *worker)
*/
static void __io_worker_busy(struct io_wqe *wqe, struct io_worker *worker,
struct io_wq_work *work)
- __must_hold(wqe->lock)
+ __must_hold(w qe->lock)
Looks like something is off there? I see a v2 as well, but this one is
later, so...
v2 is sent before I saw your comment, actully both v2 and v3 make sense
for me, but now I prefer v3.