diff options
| -rw-r--r-- | block/cfq-iosched.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 8d5a2f2f7fb9..2f91c5351949 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
| @@ -1518,7 +1518,8 @@ static void __cfq_set_active_queue(struct cfq_data *cfqd, | |||
| 1518 | struct cfq_queue *cfqq) | 1518 | struct cfq_queue *cfqq) |
| 1519 | { | 1519 | { |
| 1520 | if (cfqq) { | 1520 | if (cfqq) { |
| 1521 | cfq_log_cfqq(cfqd, cfqq, "set_active"); | 1521 | cfq_log_cfqq(cfqd, cfqq, "set_active wl_prio:%d wl_type:%d", |
| 1522 | cfqd->serving_prio, cfqd->serving_type); | ||
| 1522 | cfqq->slice_start = 0; | 1523 | cfqq->slice_start = 0; |
| 1523 | cfqq->dispatch_start = jiffies; | 1524 | cfqq->dispatch_start = jiffies; |
| 1524 | cfqq->allocated_slice = 0; | 1525 | cfqq->allocated_slice = 0; |
| @@ -1788,7 +1789,11 @@ static bool cfq_should_idle(struct cfq_data *cfqd, struct cfq_queue *cfqq) | |||
| 1788 | * Otherwise, we do only if they are the last ones | 1789 | * Otherwise, we do only if they are the last ones |
| 1789 | * in their service tree. | 1790 | * in their service tree. |
| 1790 | */ | 1791 | */ |
| 1791 | return service_tree->count == 1 && cfq_cfqq_sync(cfqq); | 1792 | if (service_tree->count == 1 && cfq_cfqq_sync(cfqq)) |
| 1793 | return 1; | ||
| 1794 | cfq_log_cfqq(cfqd, cfqq, "Not idling. st->count:%d", | ||
| 1795 | service_tree->count); | ||
| 1796 | return 0; | ||
| 1792 | } | 1797 | } |
| 1793 | 1798 | ||
| 1794 | static void cfq_arm_slice_timer(struct cfq_data *cfqd) | 1799 | static void cfq_arm_slice_timer(struct cfq_data *cfqd) |
| @@ -1833,8 +1838,11 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd) | |||
| 1833 | * time slice. | 1838 | * time slice. |
| 1834 | */ | 1839 | */ |
| 1835 | if (sample_valid(cic->ttime_samples) && | 1840 | if (sample_valid(cic->ttime_samples) && |
| 1836 | (cfqq->slice_end - jiffies < cic->ttime_mean)) | 1841 | (cfqq->slice_end - jiffies < cic->ttime_mean)) { |
| 1842 | cfq_log_cfqq(cfqd, cfqq, "Not idling. think_time:%d", | ||
| 1843 | cic->ttime_mean); | ||
| 1837 | return; | 1844 | return; |
| 1845 | } | ||
| 1838 | 1846 | ||
| 1839 | cfq_mark_cfqq_wait_request(cfqq); | 1847 | cfq_mark_cfqq_wait_request(cfqq); |
| 1840 | 1848 | ||
| @@ -2042,6 +2050,7 @@ static void choose_service_tree(struct cfq_data *cfqd, struct cfq_group *cfqg) | |||
| 2042 | slice = max(slice, 2 * cfqd->cfq_slice_idle); | 2050 | slice = max(slice, 2 * cfqd->cfq_slice_idle); |
| 2043 | 2051 | ||
| 2044 | slice = max_t(unsigned, slice, CFQ_MIN_TT); | 2052 | slice = max_t(unsigned, slice, CFQ_MIN_TT); |
| 2053 | cfq_log(cfqd, "workload slice:%d", slice); | ||
| 2045 | cfqd->workload_expires = jiffies + slice; | 2054 | cfqd->workload_expires = jiffies + slice; |
| 2046 | cfqd->noidle_tree_requires_idle = false; | 2055 | cfqd->noidle_tree_requires_idle = false; |
| 2047 | } | 2056 | } |
| @@ -3308,6 +3317,7 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq) | |||
| 3308 | if (cfq_should_wait_busy(cfqd, cfqq)) { | 3317 | if (cfq_should_wait_busy(cfqd, cfqq)) { |
| 3309 | cfqq->slice_end = jiffies + cfqd->cfq_slice_idle; | 3318 | cfqq->slice_end = jiffies + cfqd->cfq_slice_idle; |
| 3310 | cfq_mark_cfqq_wait_busy(cfqq); | 3319 | cfq_mark_cfqq_wait_busy(cfqq); |
| 3320 | cfq_log_cfqq(cfqd, cfqq, "will busy wait"); | ||
| 3311 | } | 3321 | } |
| 3312 | 3322 | ||
| 3313 | /* | 3323 | /* |
