Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1437780
| From | Ming Lei <tom.leiming@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: cgroup: Fix split bio been throttled more than once |
| Date | 2016-07-06 17:00 +0200 |
| Message-ID | <rRWsV-22V-9@gated-at.bofh.it> (permalink) |
| References | <rRdFv-7cY-5@gated-at.bofh.it> <rRJFn-2ms-1@gated-at.bofh.it> <rRVGx-1Ml-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jul 6, 2016 at 10:09 PM, Tejun Heo <tj@kernel.org> wrote: > Hello, Ming. > > On Wed, Jul 06, 2016 at 09:10:00AM +0800, Ming Lei wrote: >> > Then we did some research and find that in kernel version 4.3 brought in >> > blk_queue_split() function to split the big size bio into several parts, >> > and some of them are calling the generic_make_request() again, this result >> > the bio been throttled more than once. so the actual bio sent to device is >> > less than we expected. >> >> Except for blk_queue_split(), there are other(stacked) drivers which call >> generic_make_request() too, such as drbd, dm, md and bcache. > > So, blk-throtl already uses REQ_THROTTLED to avoid throttling the same > bio multiple times. The problem seems that the flag isn't maintained > through clone. Actually the flag(bio->bi_rw) has been maintained during clone, please see __bio_clone_fast() and bio_clone_bioset(). > >> > >> > We have checked the newest kernel of 4.7-rc5, this problem is still exist. >> > >> > Based on this kind of situation, we propose a fix solution to add a flag bit >> > in bio to let the splited bio bypass the blk_queue_split(). Below is the patch >> > we used to fix this problem. >> >> The splitted bio is just a fast-cloned bio(except for discard bio) and not very >> special compared with other fast-cloned bio, which is quite common used. >> >> So I guess what you need is to bypass BIO_CLONED bio for this purpose >> since all fast-cloned bio shares the same bvec table of the source bio. > > Depending on how a device handles a bio, that could allow bios to > bypass throttling entirely, no? Wouldn't adding REQ_THROTTLED to > REQ_CLONE_MASK work? > > Thanks. > > -- > tejun Thanks, Ming Lei
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
cgroup: Fix split bio been throttled more than once "Jiale Li" <aaronlee0817@163.com> - 2016-07-04 17:10 +0200
Re: cgroup: Fix split bio been throttled more than once Tejun Heo <tj@kernel.org> - 2016-07-06 00:50 +0200
Re: cgroup: Fix split bio been throttled more than once Ming Lei <tom.leiming@gmail.com> - 2016-07-06 03:20 +0200
Re: Re: cgroup: Fix split bio been throttled more than once Tejun Heo <tj@kernel.org> - 2016-07-06 17:10 +0200
Re: Re: cgroup: Fix split bio been throttled more than once Ming Lei <tom.leiming@gmail.com> - 2016-07-06 17:40 +0200
Re: cgroup: Fix split bio been throttled more than once Ming Lei <tom.leiming@gmail.com> - 2016-07-06 03:20 +0200
Re: cgroup: Fix split bio been throttled more than once Tejun Heo <tj@kernel.org> - 2016-07-06 16:10 +0200
Re: cgroup: Fix split bio been throttled more than once Ming Lei <tom.leiming@gmail.com> - 2016-07-06 17:00 +0200
Re: Re: cgroup: Fix split bio been throttled more than once Ming Lei <tom.leiming@gmail.com> - 2016-07-08 12:40 +0200
Re: Re: cgroup: Fix split bio been throttled more than once Tejun Heo <tj@kernel.org> - 2016-07-09 17:00 +0200
csiph-web