Re: [PATCH v2] block: I/O error occurs during SATA disk stress test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/26/22 10:06 AM, Bart Van Assche wrote:
> On 8/26/22 06:36, Jens Axboe wrote:
>> 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



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux