diff options
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r-- | block/cfq-iosched.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 3c7b537bf908..ae21919f15e1 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -988,9 +988,10 @@ static void cfq_group_served(struct cfq_data *cfqd, struct cfq_group *cfqg, | |||
988 | 988 | ||
989 | cfq_log_cfqg(cfqd, cfqg, "served: vt=%llu min_vt=%llu", cfqg->vdisktime, | 989 | cfq_log_cfqg(cfqd, cfqg, "served: vt=%llu min_vt=%llu", cfqg->vdisktime, |
990 | st->min_vdisktime); | 990 | st->min_vdisktime); |
991 | cfq_log_cfqq(cfqq->cfqd, cfqq, "sl_used=%u disp=%u charge=%u iops=%u" | 991 | cfq_log_cfqq(cfqq->cfqd, cfqq, |
992 | " sect=%u", used_sl, cfqq->slice_dispatch, charge, | 992 | "sl_used=%u disp=%u charge=%u iops=%u sect=%lu", |
993 | iops_mode(cfqd), cfqq->nr_sectors); | 993 | used_sl, cfqq->slice_dispatch, charge, |
994 | iops_mode(cfqd), cfqq->nr_sectors); | ||
994 | cfq_blkiocg_update_timeslice_used(&cfqg->blkg, used_sl, | 995 | cfq_blkiocg_update_timeslice_used(&cfqg->blkg, used_sl, |
995 | unaccounted_sl); | 996 | unaccounted_sl); |
996 | cfq_blkiocg_set_start_empty_time(&cfqg->blkg); | 997 | cfq_blkiocg_set_start_empty_time(&cfqg->blkg); |
@@ -2023,8 +2024,8 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd) | |||
2023 | */ | 2024 | */ |
2024 | if (sample_valid(cic->ttime_samples) && | 2025 | if (sample_valid(cic->ttime_samples) && |
2025 | (cfqq->slice_end - jiffies < cic->ttime_mean)) { | 2026 | (cfqq->slice_end - jiffies < cic->ttime_mean)) { |
2026 | cfq_log_cfqq(cfqd, cfqq, "Not idling. think_time:%d", | 2027 | cfq_log_cfqq(cfqd, cfqq, "Not idling. think_time:%lu", |
2027 | cic->ttime_mean); | 2028 | cic->ttime_mean); |
2028 | return; | 2029 | return; |
2029 | } | 2030 | } |
2030 | 2031 | ||
@@ -2772,8 +2773,14 @@ static void __cfq_exit_single_io_context(struct cfq_data *cfqd, | |||
2772 | smp_wmb(); | 2773 | smp_wmb(); |
2773 | cic->key = cfqd_dead_key(cfqd); | 2774 | cic->key = cfqd_dead_key(cfqd); |
2774 | 2775 | ||
2775 | if (ioc->ioc_data == cic) | 2776 | rcu_read_lock(); |
2777 | if (rcu_dereference(ioc->ioc_data) == cic) { | ||
2778 | rcu_read_unlock(); | ||
2779 | spin_lock(&ioc->lock); | ||
2776 | rcu_assign_pointer(ioc->ioc_data, NULL); | 2780 | rcu_assign_pointer(ioc->ioc_data, NULL); |
2781 | spin_unlock(&ioc->lock); | ||
2782 | } else | ||
2783 | rcu_read_unlock(); | ||
2777 | 2784 | ||
2778 | if (cic->cfqq[BLK_RW_ASYNC]) { | 2785 | if (cic->cfqq[BLK_RW_ASYNC]) { |
2779 | cfq_exit_cfqq(cfqd, cic->cfqq[BLK_RW_ASYNC]); | 2786 | cfq_exit_cfqq(cfqd, cic->cfqq[BLK_RW_ASYNC]); |
@@ -3080,7 +3087,8 @@ cfq_drop_dead_cic(struct cfq_data *cfqd, struct io_context *ioc, | |||
3080 | 3087 | ||
3081 | spin_lock_irqsave(&ioc->lock, flags); | 3088 | spin_lock_irqsave(&ioc->lock, flags); |
3082 | 3089 | ||
3083 | BUG_ON(ioc->ioc_data == cic); | 3090 | BUG_ON(rcu_dereference_check(ioc->ioc_data, |
3091 | lockdep_is_held(&ioc->lock)) == cic); | ||
3084 | 3092 | ||
3085 | radix_tree_delete(&ioc->radix_root, cfqd->cic_index); | 3093 | radix_tree_delete(&ioc->radix_root, cfqd->cic_index); |
3086 | hlist_del_rcu(&cic->cic_list); | 3094 | hlist_del_rcu(&cic->cic_list); |