Re: [PATCH] block: Fix inflight statistic for MQ submission with !elevator

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

 



Ming Lei <tom.leiming@xxxxxxxxx> writes:

> On Mon, Aug 31, 2020 at 11:37 PM Gabriel Krisman Bertazi
> <krisman@xxxxxxxxxxxxx> wrote:

>> -       if (rq->part == mi->part)
>> +       if (rq->part == mi->part && rq->state == MQ_RQ_IN_FLIGHT)
>>                 mi->inflight[rq_data_dir(rq)]++;
>
> The fix looks fine. However, we have helper of
> blk_mq_request_started() for this purpose.

Thanks for the review.

I was aware of blk_mq_request_started, but it forces a READ_ONCE which
on Alpha includes a mb() for every tagged request, which doesn't seem
necessary or desired here.  I might be wrong though, memory barriers
are hard. :)

let's see what Jens says about the other points, so I don't spin this
unnecessarily.

-- 
Gabriel Krisman Bertazi



[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