mirror of
https://github.com/adulau/aha.git
synced 2024-12-26 18:56:14 +00:00
cfq: set workload as expired if it doesn't have any slice left
When a group is resumed, if it doesn't have workload slice left, we should set workload_expires as expired. Otherwise, we might start from where we left in previous group by error. Thanks the idea from Corrado. Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
82bbbf28db
commit
66ae291978
1 changed files with 3 additions and 1 deletions
|
@ -2113,7 +2113,9 @@ static void cfq_choose_cfqg(struct cfq_data *cfqd)
|
|||
cfqd->workload_expires = jiffies + cfqg->saved_workload_slice;
|
||||
cfqd->serving_type = cfqg->saved_workload;
|
||||
cfqd->serving_prio = cfqg->saved_serving_prio;
|
||||
}
|
||||
} else
|
||||
cfqd->workload_expires = jiffies - 1;
|
||||
|
||||
choose_service_tree(cfqd, cfqg);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue