linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/3]cfq-iosched: do cleanup
@ 2010-11-08  2:07 Shaohua Li
  2010-11-08 13:59 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Shaohua Li @ 2010-11-08  2:07 UTC (permalink / raw)
  To: lkml; +Cc: Jens Axboe, vgoyal, czoccolo

some random fixes for cfq-iosched. My last post seems lost, so repost
them.

Thanks,
Shaohua


Some functions should return boolean.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
 block/cfq-iosched.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Index: linux/block/cfq-iosched.c
===================================================================
--- linux.orig/block/cfq-iosched.c	2010-11-01 13:34:53.000000000 +0800
+++ linux/block/cfq-iosched.c	2010-11-08 09:54:32.000000000 +0800
@@ -646,11 +646,11 @@ cfq_set_prio_slice(struct cfq_data *cfqd
 static inline bool cfq_slice_used(struct cfq_queue *cfqq)
 {
 	if (cfq_cfqq_slice_new(cfqq))
-		return 0;
+		return false;
 	if (time_before(jiffies, cfqq->slice_end))
-		return 0;
+		return false;
 
-	return 1;
+	return true;
 }
 
 /*
@@ -1901,10 +1901,10 @@ static bool cfq_should_idle(struct cfq_d
 	 * in their service tree.
 	 */
 	if (service_tree->count == 1 && cfq_cfqq_sync(cfqq))
-		return 1;
+		return true;
 	cfq_log_cfqq(cfqd, cfqq, "Not idling. st->count:%d",
 			service_tree->count);
-	return 0;
+	return false;
 }
 
 static void cfq_arm_slice_timer(struct cfq_data *cfqd)
@@ -2367,12 +2367,12 @@ static inline bool cfq_slice_used_soon(s
 {
 	/* the queue hasn't finished any request, can't estimate */
 	if (cfq_cfqq_slice_new(cfqq))
-		return 1;
+		return true;
 	if (time_after(jiffies + cfqd->cfq_slice_idle * cfqq->dispatched,
 		cfqq->slice_end))
-		return 1;
+		return true;
 
-	return 0;
+	return false;
 }
 
 static bool cfq_may_dispatch(struct cfq_data *cfqd, struct cfq_queue *cfqq)




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 1/3]cfq-iosched: do cleanup
  2010-11-08  2:07 [patch 1/3]cfq-iosched: do cleanup Shaohua Li
@ 2010-11-08 13:59 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2010-11-08 13:59 UTC (permalink / raw)
  To: Shaohua Li; +Cc: lkml, vgoyal@redhat.com, czoccolo@gmail.com

On 2010-11-08 03:07, Shaohua Li wrote:
> some random fixes for cfq-iosched. My last post seems lost, so repost
> them.

Thanks, I will queue this up for 2.6.38.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-08 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-08  2:07 [patch 1/3]cfq-iosched: do cleanup Shaohua Li
2010-11-08 13:59 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).