Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143966
b: refs/heads/master
c: 04dc6e7
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Moyer authored and Jens Axboe committed Apr 22, 2009
1 parent e4efc21 commit 299a65e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4d00aa47e2337dcfe2d8a7215dbde3765b507167
refs/heads/master: 04dc6e71a28d4815bf9431efcafc107bb0ad2792
11 changes: 6 additions & 5 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -947,14 +947,18 @@ static inline sector_t cfq_dist_from_last(struct cfq_data *cfqd,
return cfqd->last_position - rq->sector;
}

#define CIC_SEEK_THR 8 * 1024
#define CIC_SEEKY(cic) ((cic)->seek_mean > CIC_SEEK_THR)

static inline int cfq_rq_close(struct cfq_data *cfqd, struct request *rq)
{
struct cfq_io_context *cic = cfqd->active_cic;
sector_t sdist = cic->seek_mean;

if (!sample_valid(cic->seek_samples))
return 0;
sdist = CIC_SEEK_THR;

return cfq_dist_from_last(cfqd, rq) <= cic->seek_mean;
return cfq_dist_from_last(cfqd, rq) <= sdist;
}

static struct cfq_queue *cfqq_close(struct cfq_data *cfqd,
Expand Down Expand Up @@ -1039,9 +1043,6 @@ static struct cfq_queue *cfq_close_cooperator(struct cfq_data *cfqd,
return cfqq;
}


#define CIC_SEEKY(cic) ((cic)->seek_mean > (8 * 1024))

static void cfq_arm_slice_timer(struct cfq_data *cfqd)
{
struct cfq_queue *cfqq = cfqd->active_queue;
Expand Down

0 comments on commit 299a65e

Please sign in to comment.