Commit e673914d authored by Paolo Valente's avatar Paolo Valente Committed by Jens Axboe

block, bfq: save also weight-raised service on queue merging

To prevent weight-raising information from being lost on bfq_queue merging,
also the amount of service that a bfq_queue receives must be saved and
restored when the bfq_queue is merged and split, respectively.
Tested-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d1f600fa
...@@ -1029,6 +1029,7 @@ bfq_bfqq_resume_state(struct bfq_queue *bfqq, struct bfq_data *bfqd, ...@@ -1029,6 +1029,7 @@ bfq_bfqq_resume_state(struct bfq_queue *bfqq, struct bfq_data *bfqd,
bfqq->io_start_time = bic->saved_io_start_time; bfqq->io_start_time = bic->saved_io_start_time;
bfqq->tot_idle_time = bic->saved_tot_idle_time; bfqq->tot_idle_time = bic->saved_tot_idle_time;
bfqq->wr_coeff = bic->saved_wr_coeff; bfqq->wr_coeff = bic->saved_wr_coeff;
bfqq->service_from_wr = bic->saved_service_from_wr;
bfqq->wr_start_at_switch_to_srt = bic->saved_wr_start_at_switch_to_srt; bfqq->wr_start_at_switch_to_srt = bic->saved_wr_start_at_switch_to_srt;
bfqq->last_wr_start_finish = bic->saved_last_wr_start_finish; bfqq->last_wr_start_finish = bic->saved_last_wr_start_finish;
bfqq->wr_cur_max_time = bic->saved_wr_cur_max_time; bfqq->wr_cur_max_time = bic->saved_wr_cur_max_time;
...@@ -2775,6 +2776,7 @@ static void bfq_bfqq_save_state(struct bfq_queue *bfqq) ...@@ -2775,6 +2776,7 @@ static void bfq_bfqq_save_state(struct bfq_queue *bfqq)
bic->saved_wr_coeff = bfqq->wr_coeff; bic->saved_wr_coeff = bfqq->wr_coeff;
bic->saved_wr_start_at_switch_to_srt = bic->saved_wr_start_at_switch_to_srt =
bfqq->wr_start_at_switch_to_srt; bfqq->wr_start_at_switch_to_srt;
bic->saved_service_from_wr = bfqq->service_from_wr;
bic->saved_last_wr_start_finish = bfqq->last_wr_start_finish; bic->saved_last_wr_start_finish = bfqq->last_wr_start_finish;
bic->saved_wr_cur_max_time = bfqq->wr_cur_max_time; bic->saved_wr_cur_max_time = bfqq->wr_cur_max_time;
} }
......
...@@ -440,6 +440,7 @@ struct bfq_io_cq { ...@@ -440,6 +440,7 @@ struct bfq_io_cq {
*/ */
unsigned long saved_wr_coeff; unsigned long saved_wr_coeff;
unsigned long saved_last_wr_start_finish; unsigned long saved_last_wr_start_finish;
unsigned long saved_service_from_wr;
unsigned long saved_wr_start_at_switch_to_srt; unsigned long saved_wr_start_at_switch_to_srt;
unsigned int saved_wr_cur_max_time; unsigned int saved_wr_cur_max_time;
struct bfq_ttime saved_ttime; struct bfq_ttime saved_ttime;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment