Merge branch 'for-linus' into for-2.6.33
Jens Axboe [Tue, 3 Nov 2009 20:14:39 +0000 (21:14 +0100)]
Conflicts:
block/cfq-iosched.c

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

1  2 
MAINTAINERS
block/cfq-iosched.c
fs/block_dev.c

diff --cc MAINTAINERS
Simple merge
@@@ -252,7 -195,8 +252,8 @@@ enum cfqq_state_flags 
        CFQ_CFQQ_FLAG_prio_changed,     /* task priority has changed */
        CFQ_CFQQ_FLAG_slice_new,        /* no requests dispatched in slice */
        CFQ_CFQQ_FLAG_sync,             /* synchronous queue */
 -      CFQ_CFQQ_FLAG_coop,             /* has done a coop jump of the queue */
 +      CFQ_CFQQ_FLAG_coop,             /* cfqq is shared */
+       CFQ_CFQQ_FLAG_coop_preempt,     /* coop preempt */
  };
  
  #define CFQ_CFQQ_FNS(name)                                            \
@@@ -1068,9 -945,15 +1070,16 @@@ static struct cfq_queue *cfq_get_next_q
  static struct cfq_queue *cfq_set_active_queue(struct cfq_data *cfqd,
                                              struct cfq_queue *cfqq)
  {
-       if (!cfqq)
+       if (!cfqq) {
                cfqq = cfq_get_next_queue(cfqd);
 +
+               if (cfqq && !cfq_cfqq_coop_preempt(cfqq))
+                       cfq_clear_cfqq_coop(cfqq);
+       }
+       if (cfqq)
+               cfq_clear_cfqq_coop_preempt(cfqq);
        __cfq_set_active_queue(cfqd, cfqq);
        return cfqq;
  }
@@@ -2424,8 -2071,16 +2433,17 @@@ cfq_should_preempt(struct cfq_data *cfq
         * if this request is as-good as one we would expect from the
         * current cfqq, let it preempt
         */
 -      if (cfq_rq_close(cfqd, rq) && (!cfq_cfqq_coop(new_cfqq) ||
 +      if (cfq_rq_close(cfqd, cfqq, rq))
++      if (cfq_rq_close(cfqd, cfqq, rq) && (!cfq_cfqq_coop(new_cfqq) ||
+           cfqd->busy_queues == 1)) {
+               /*
+                * Mark new queue coop_preempt, so its coop flag will not be
+                * cleared when new queue gets scheduled at the very first time
+                */
+               cfq_mark_cfqq_coop_preempt(new_cfqq);
+               cfq_mark_cfqq_coop(new_cfqq);
                return true;
+       }
  
        return false;
  }
diff --cc fs/block_dev.c
Simple merge