diff options
author | Daniel Wagner <wagi@monom.org> | 2018-04-03 15:37:32 +0200 |
---|---|---|
committer | Daniel Wagner <wagi@monom.org> | 2018-04-03 16:50:12 +0200 |
commit | 5dc39c8b1dd9f1458adc33313da2cecf7497d0eb (patch) | |
tree | 4166b821bfd1a55eddff5e3e2e3781a55f1d3a46 /block | |
parent | e160d17b4d66294773424b6bf91dd3de5cd675f0 (diff) | |
parent | 3753696b0aee3f3f55e161ef41d2cb0ea7e6e225 (diff) |
Merge tag 'v4.4.123' into v4.4-rt
This is the 4.4.123 stable release
Conflicts:
fs/aio.c
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-cgroup.c | 4 | ||||
-rw-r--r-- | block/blk-throttle.c | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 8161090a1970..46ba2402c8f9 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1078,10 +1078,8 @@ int blkcg_init_queue(struct request_queue *q) if (preloaded) radix_tree_preload_end(); - if (IS_ERR(blkg)) { - blkg_free(new_blkg); + if (IS_ERR(blkg)) return PTR_ERR(blkg); - } q->root_blkg = blkg; q->root_rl.blkg = blkg; diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 2149a1ddbacf..17bdd6b55beb 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -505,6 +505,17 @@ static void throtl_dequeue_tg(struct throtl_grp *tg) static void throtl_schedule_pending_timer(struct throtl_service_queue *sq, unsigned long expires) { + unsigned long max_expire = jiffies + 8 * throtl_slice; + + /* + * Since we are adjusting the throttle limit dynamically, the sleep + * time calculated according to previous limit might be invalid. It's + * possible the cgroup sleep time is very long and no other cgroups + * have IO running so notify the limit changes. Make sure the cgroup + * doesn't sleep too long to avoid the missed notification. + */ + if (time_after(expires, max_expire)) + expires = max_expire; mod_timer(&sq->pending_timer, expires); throtl_log(sq, "schedule timer. delay=%lu jiffies=%lu", expires - jiffies, jiffies); |