diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/cfq-iosched.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 0eb4aff9df68..7e13f04b5ed4 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -947,14 +947,18 @@ static inline sector_t cfq_dist_from_last(struct cfq_data *cfqd, | |||
947 | return cfqd->last_position - rq->sector; | 947 | return cfqd->last_position - rq->sector; |
948 | } | 948 | } |
949 | 949 | ||
950 | #define CIC_SEEK_THR 8 * 1024 | ||
951 | #define CIC_SEEKY(cic) ((cic)->seek_mean > CIC_SEEK_THR) | ||
952 | |||
950 | static inline int cfq_rq_close(struct cfq_data *cfqd, struct request *rq) | 953 | static inline int cfq_rq_close(struct cfq_data *cfqd, struct request *rq) |
951 | { | 954 | { |
952 | struct cfq_io_context *cic = cfqd->active_cic; | 955 | struct cfq_io_context *cic = cfqd->active_cic; |
956 | sector_t sdist = cic->seek_mean; | ||
953 | 957 | ||
954 | if (!sample_valid(cic->seek_samples)) | 958 | if (!sample_valid(cic->seek_samples)) |
955 | return 0; | 959 | sdist = CIC_SEEK_THR; |
956 | 960 | ||
957 | return cfq_dist_from_last(cfqd, rq) <= cic->seek_mean; | 961 | return cfq_dist_from_last(cfqd, rq) <= sdist; |
958 | } | 962 | } |
959 | 963 | ||
960 | static struct cfq_queue *cfqq_close(struct cfq_data *cfqd, | 964 | static struct cfq_queue *cfqq_close(struct cfq_data *cfqd, |
@@ -1039,9 +1043,6 @@ static struct cfq_queue *cfq_close_cooperator(struct cfq_data *cfqd, | |||
1039 | return cfqq; | 1043 | return cfqq; |
1040 | } | 1044 | } |
1041 | 1045 | ||
1042 | |||
1043 | #define CIC_SEEKY(cic) ((cic)->seek_mean > (8 * 1024)) | ||
1044 | |||
1045 | static void cfq_arm_slice_timer(struct cfq_data *cfqd) | 1046 | static void cfq_arm_slice_timer(struct cfq_data *cfqd) |
1046 | { | 1047 | { |
1047 | struct cfq_queue *cfqq = cfqd->active_queue; | 1048 | struct cfq_queue *cfqq = cfqd->active_queue; |