Re: [PATCH v2] block: I/O error occurs during SATA disk stress test
From: Jens Axboe <axboe@kernel.dk>
Date: 2022-08-26 19:41:01
On 8/26/22 10:06 AM, Bart Van Assche wrote:
On 8/26/22 06:36, Jens Axboe wrote:quoted
That aside, I think there's a misunderstanding here. v1 has some parts and v2 has others. Please post a v3 that has the hunk that guarantees that deadline always has the lowest bit set if assigned, and the !deadline check as well.Hi Jens, Would it be considered acceptable to store the request state (rq->state) in the lowest two bits of rq->deadline? This would reduce the deadline resolution a little bit but I think that's acceptable. Except for blk_abort_request(), all changes of rq->state and rq->deadline are already serialized. So with this approach only blk_abort_request() would have to use an atomic-compare-exchange loop.
Sure, I think that would be fine, as long as: 1) We keep the expensive bits in the actual timeout/abort path and not part of regular issue. 2) We rename the field while doing so. Might even be worthwhile to look into NOT having both timeout and deadline in struct request, it's a bit annoying to waste double the space on something that should just be one field. -- Jens Axboe