aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJustin TerAvest <teravest@google.com>2011-07-12 02:31:45 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-07-12 02:35:10 -0400
commit4aede84b33d6beb401136a3deca0651ae07c5e99 (patch)
tree831266dbb15227584da5011ae4bb1e5038a69677 /block
parenta07405b7802691d29ab3b23bdc76ee6d006aad0b (diff)
fixlet: Remove fs_excl from struct task.
fs_excl is a poor man's priority inheritance for filesystems to hint to the block layer that an operation is important. It was never clearly specified, not widely adopted, and will not prevent starvation in many cases (like across cgroups). fs_excl was introduced with the time sliced CFQ IO scheduler, to indicate when a process held FS exclusive resources and thus needed a boost. It doesn't cover all file systems, and it was never fully complete. Lets kill it. Signed-off-by: Justin TerAvest <teravest@google.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 762bd509b71b..d8b108737b72 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -134,7 +134,7 @@ struct cfq_queue {
134 134
135 /* io prio of this group */ 135 /* io prio of this group */
136 unsigned short ioprio, org_ioprio; 136 unsigned short ioprio, org_ioprio;
137 unsigned short ioprio_class, org_ioprio_class; 137 unsigned short ioprio_class;
138 138
139 pid_t pid; 139 pid_t pid;
140 140
@@ -2869,7 +2869,6 @@ static void cfq_init_prio_data(struct cfq_queue *cfqq, struct io_context *ioc)
2869 * elevate the priority of this queue 2869 * elevate the priority of this queue
2870 */ 2870 */
2871 cfqq->org_ioprio = cfqq->ioprio; 2871 cfqq->org_ioprio = cfqq->ioprio;
2872 cfqq->org_ioprio_class = cfqq->ioprio_class;
2873 cfq_clear_cfqq_prio_changed(cfqq); 2872 cfq_clear_cfqq_prio_changed(cfqq);
2874} 2873}
2875 2874
@@ -3593,30 +3592,6 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq)
3593 cfq_schedule_dispatch(cfqd); 3592 cfq_schedule_dispatch(cfqd);
3594} 3593}
3595 3594
3596/*
3597 * we temporarily boost lower priority queues if they are holding fs exclusive
3598 * resources. they are boosted to normal prio (CLASS_BE/4)
3599 */
3600static void cfq_prio_boost(struct cfq_queue *cfqq)
3601{
3602 if (has_fs_excl()) {
3603 /*
3604 * boost idle prio on transactions that would lock out other
3605 * users of the filesystem
3606 */
3607 if (cfq_class_idle(cfqq))
3608 cfqq->ioprio_class = IOPRIO_CLASS_BE;
3609 if (cfqq->ioprio > IOPRIO_NORM)
3610 cfqq->ioprio = IOPRIO_NORM;
3611 } else {
3612 /*
3613 * unboost the queue (if needed)
3614 */
3615 cfqq->ioprio_class = cfqq->org_ioprio_class;
3616 cfqq->ioprio = cfqq->org_ioprio;
3617 }
3618}
3619
3620static inline int __cfq_may_queue(struct cfq_queue *cfqq) 3595static inline int __cfq_may_queue(struct cfq_queue *cfqq)
3621{ 3596{
3622 if (cfq_cfqq_wait_request(cfqq) && !cfq_cfqq_must_alloc_slice(cfqq)) { 3597 if (cfq_cfqq_wait_request(cfqq) && !cfq_cfqq_must_alloc_slice(cfqq)) {
@@ -3647,7 +3622,6 @@ static int cfq_may_queue(struct request_queue *q, int rw)
3647 cfqq = cic_to_cfqq(cic, rw_is_sync(rw)); 3622 cfqq = cic_to_cfqq(cic, rw_is_sync(rw));
3648 if (cfqq) { 3623 if (cfqq) {
3649 cfq_init_prio_data(cfqq, cic->ioc); 3624 cfq_init_prio_data(cfqq, cic->ioc);
3650 cfq_prio_boost(cfqq);
3651 3625
3652 return __cfq_may_queue(cfqq); 3626 return __cfq_may_queue(cfqq);
3653 } 3627 }