[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d82305ef-1672-a648-f0b6-882bef1659f1@huaweicloud.com>
Date: Thu, 18 Aug 2022 09:16:28 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Tejun Heo <tj@...nel.org>, Yu Kuai <yukuai1@...weicloud.com>
Cc: mkoutny@...e.com, axboe@...nel.dk, ming.lei@...hat.com,
cgroups@...r.kernel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, yi.zhang@...wei.com,
"yukuai3@...wei.com >> yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH v7 4/9] blk-throttle: fix io hung due to configuration
updates
Hi, Tejun!
在 2022/08/18 1:52, Tejun Heo 写道:
> On Wed, Aug 17, 2022 at 09:30:30AM +0800, Yu Kuai wrote:
>>> Would it be easier if the fields were signed? It's fragile and odd to
>>> explain "these are unsigned but if they underflow they behave just like
>>> signed when added" when they can just be signed. Also, I have a hard time
>>> understand what "preempt" means above.
>>
>> I think preempt shound never happen based on current FIFO
>> implementation, perhaps
>
> Can you elaborate what "preempt" is?
Here preempt means that the bio that is throttled later somehow get
dispatched earlier, Michal thinks it's better to comment that the code
still works fine in this particular scenario.
>
>>>> + if (bps_limit != U64_MAX)
>>>> + tg->bytes_skipped[rw] +=
>>>> + calculate_bytes_allowed(bps_limit, jiffy_elapsed) -
>>>> + tg->bytes_disp[rw];
>>>> + if (iops_limit != UINT_MAX)
>>>> + tg->io_skipped[rw] +=
>>>> + calculate_io_allowed(iops_limit, jiffy_elapsed) -
>>>> + tg->io_disp[rw];
>>>
>>> So, this is calculating the budgets to carry over. Can we name them
>>> accordingly? I don't know what "skipped" means.
>>
>> Yeah, thanks for you advice, art of naming is a little hard for me...
>> How do you think about these name: extended_bytes/io_budget?
>
> How about carryover_{ios|bytes}?
Yes, that sounds good.
By the way, should I use 'ios' here instead of 'io'? I was confused
because there are many places that is using 'io' currently.
Thanks,
Kuai
>
> Thanks.
>
Powered by blists - more mailing lists