lkml.org 
[lkml]   [2016]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Re: cgroup: Fix split bio been throttled more than once
On Sat, Jul 9, 2016 at 10:53 PM, Tejun Heo <tj@kernel.org> wrote:
> Hello, Ming.
>
> On Fri, Jul 08, 2016 at 06:35:06PM +0800, Ming Lei wrote:
>> I am wondering why REQ_THROTTLED is cleared for the original bio
>> even it has been charged and will be issued to driver, and is it allowed
>> to throttle and charge the same bio for many times?
>
> So, IIUC, the flag is just to prevent the bio from recursing while
> being issued from blk-throtl after queued there for throttling. We
> can probably extend the flag. I'm not sure how it'd interact with
> stacked drivers tho. It'd definitely need to be cleared before
> traveling down to a lower level device.

I think I understand it now, in case of stacked driver, the cloned bio
will be submitted
to a new request queue belonging to lower disk, and orignal bio's
REQ_THROTTLED flag should be cleared.

But in case of bio splitting, the remainder bio is just the orignal
bio with front part
splitted out, and it need to submit to same queue again, so it should be
bypassed of throttling because it has been charged already.

So looks Jiale's patch is correct, also seems 'blkg_rwstat_add()' should be
avoided for the remainder bio too in blkcg_bio_issue_check().

thanks,
Ming Lei

\
 
 \ /
  Last update: 2016-07-10 11:41    [W:0.076 / U:1.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site