OSDN Git Service

io_uring: split overflow state into SQ and CQ side
authorJens Axboe <axboe@kernel.dk>
Thu, 19 Dec 2019 00:12:20 +0000 (17:12 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 21 Jan 2020 00:03:59 +0000 (17:03 -0700)
commitad3eb2c89fb24d14ac81f43eff8e85fece2c934d
treeb3c2367e4243763908815e839f12d9ed3829ad2e
parentd3656344fea0339fb0365c8df4d2beba4e0089cd
io_uring: split overflow state into SQ and CQ side

We currently check ->cq_overflow_list from both SQ and CQ context, which
causes some bouncing of that cache line. Add separate bits of state for
this instead, so that the SQ side can check using its own state, and
likewise for the CQ side.

This adds ->sq_check_overflow with the SQ state, and ->cq_check_overflow
with the CQ state. If we hit an overflow condition, both of these bits
are set. Likewise for overflow flush clear, we clear both bits. For the
fast path of just checking if there's an overflow condition on either
the SQ or CQ side, we can use our own private bit for this.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c