public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	containers@lists.linux-foundation.org, dm-devel@redhat.com,
	jens.axboe@oracle.com, nauman@google.com, dpshah@google.com,
	lizf@cn.fujitsu.com, mikew@google.com, fchecconi@gmail.com,
	paolo.valente@unimore.it, ryov@valinux.co.jp,
	fernando@oss.ntt.co.jp, s-uchida@ap.jp.nec.com,
	taka@valinux.co.jp, jmoyer@redhat.com, dhaval@linux.vnet.ibm.com,
	balbir@linux.vnet.ibm.com, righi.andrea@gmail.com,
	m-ikeda@ds.jp.nec.com, jbaron@redhat.com, agk@redhat.com,
	snitzer@redhat.com, akpm@linux-foundation.org,
	peterz@infradead.org
Subject: Re: [PATCH 02/20] io-controller: Common flat fair queuing code in elevaotor layer
Date: Mon, 08 Jun 2009 09:08:44 +0800	[thread overview]
Message-ID: <4A2C649C.8070806@cn.fujitsu.com> (raw)
In-Reply-To: <1243377729-2176-3-git-send-email-vgoyal@redhat.com>

Vivek Goyal wrote:
...
> +
> +/* Get next queue for service. */
> +struct io_queue *elv_get_next_ioq(struct request_queue *q, int extract)
> +{
> +	struct elv_fq_data *efqd = &q->elevator->efqd;
> +	struct io_entity *entity = NULL;
> +	struct io_queue *ioq = NULL;
> +	struct io_sched_data *sd;
> +
> +	/*
> +	 * one can check for which queue will be selected next while having
> +	 * one queue active. preempt logic uses it.
> +	 */
> +	BUG_ON(extract && efqd->active_queue != NULL);
> +
> +	if (!efqd->busy_queues)
> +		return NULL;
> +
> +	sd = &efqd->root_group->sched_data;
> +	if (extract)
> +		entity = bfq_lookup_next_entity(sd, 1);
> +	else
> +		entity = bfq_lookup_next_entity(sd, 0);

This if and else branch is not needed.

Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
---
 block/elevator-fq.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/block/elevator-fq.c b/block/elevator-fq.c
index 3c5f9da..655162b 100644
--- a/block/elevator-fq.c
+++ b/block/elevator-fq.c
@@ -3069,10 +3069,7 @@ struct io_queue *elv_get_next_ioq(struct request_queue *q, int extract)
 
 	sd = &efqd->root_group->sched_data;
 	for (; sd != NULL; sd = entity->my_sched_data) {
-		if (extract)
-			entity = bfq_lookup_next_entity(sd, 1);
-		else
-			entity = bfq_lookup_next_entity(sd, 0);
+		entity = bfq_lookup_next_entity(sd, extract);
 
 		/*
 		 * entity can be null despite the fact that there are busy
-- 
1.5.4.rc3


  parent reply	other threads:[~2009-06-08  1:10 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 22:41 [RFC] IO scheduler based IO controller V3 Vivek Goyal
2009-05-26 22:41 ` [PATCH 01/20] io-controller: Documentation Vivek Goyal
2009-05-29 15:42   ` Balbir Singh
2009-05-29 15:53     ` Vivek Goyal
2009-05-26 22:41 ` [PATCH 02/20] io-controller: Common flat fair queuing code in elevaotor layer Vivek Goyal
2009-05-27 20:53   ` Nauman Rafique
2009-05-28  8:52     ` Fabio Checconi
2009-05-28 16:00     ` Vivek Goyal
2009-05-28 19:41       ` Nauman Rafique
2009-05-29 16:06         ` Vivek Goyal
2009-05-29 16:57           ` Fabio Checconi
2009-05-29 19:06             ` Nauman Rafique
2009-05-29 19:16               ` Vivek Goyal
2009-06-08  1:08   ` Gui Jianfeng [this message]
2009-06-08 12:58     ` Vivek Goyal
2009-06-08  7:44   ` Gui Jianfeng
2009-06-08 13:56     ` Vivek Goyal
2009-05-26 22:41 ` [PATCH 03/20] io-controller: Charge for time slice based on average disk rate Vivek Goyal
2009-05-26 22:41 ` [PATCH 04/20] io-controller: Modify cfq to make use of flat elevator fair queuing Vivek Goyal
2009-05-26 22:41 ` [PATCH 05/20] io-controller: Common hierarchical fair queuing code in elevaotor layer Vivek Goyal
2009-06-05  9:36   ` Gui Jianfeng
2009-06-05 13:21     ` Vivek Goyal
2009-05-26 22:41 ` [PATCH 06/20] io-controller: cfq changes to use " Vivek Goyal
2009-05-26 22:41 ` [PATCH 07/20] io-controller: Export disk time used and nr sectors dipatched through cgroups Vivek Goyal
2009-05-26 22:41 ` [PATCH 08/20] io-controller: idle for sometime on sync queue before expiring it Vivek Goyal
2009-05-26 22:41 ` [PATCH 09/20] io-controller: Separate out queue and data Vivek Goyal
2009-05-26 22:41 ` [PATCH 10/20] io-conroller: Prepare elevator layer for single queue schedulers Vivek Goyal
2009-06-05  9:17   ` Gui Jianfeng
2009-06-05 13:22     ` Vivek Goyal
2009-05-26 22:42 ` [PATCH 11/20] io-controller: noop changes for hierarchical fair queuing Vivek Goyal
2009-05-26 22:42 ` [PATCH 12/20] io-controller: deadline " Vivek Goyal
2009-05-26 22:42 ` [PATCH 13/20] io-controller: anticipatory " Vivek Goyal
2009-05-26 22:42 ` [PATCH 14/20] blkio_cgroup patches from Ryo to track async bios Vivek Goyal
2009-05-26 22:42 ` [PATCH 15/20] io-controller: map async requests to appropriate cgroup Vivek Goyal
2009-05-28  9:27   ` Ryo Tsuruta
2009-05-28 16:57     ` Vivek Goyal
2009-05-28 18:04       ` Nauman Rafique
2009-05-29  3:17       ` Ryo Tsuruta
2009-05-29 13:38         ` Vivek Goyal
2009-06-01 11:25           ` Ryo Tsuruta
2009-05-26 22:42 ` [PATCH 16/20] io-controller: IO group refcounting support Vivek Goyal
2009-06-08  2:03   ` Gui Jianfeng
2009-06-08 13:53     ` Vivek Goyal
2009-05-26 22:42 ` [PATCH 17/20] io-controller: Per cgroup request descriptor support Vivek Goyal
2009-05-26 22:42 ` [PATCH 18/20] io-controller: Support per cgroup per device weights and io class Vivek Goyal
2009-05-26 22:42 ` [PATCH 19/20] io-controller: Debug hierarchical IO scheduling Vivek Goyal
2009-05-26 22:42 ` [PATCH 20/20] io-controller: experimental debug patch for async queue wait before expiry Vivek Goyal
  -- strict thread matches above, loose matches on Subject: below --
2009-06-19 20:37 [RFC] IO scheduler based io controller (V5) Vivek Goyal
2009-06-19 20:37 ` [PATCH 02/20] io-controller: Common flat fair queuing code in elevaotor layer Vivek Goyal
2009-06-22  8:46   ` Balbir Singh
2009-06-22 12:43     ` Fabio Checconi
2009-06-23  2:43       ` Vivek Goyal
2009-06-23  4:10         ` Fabio Checconi
2009-06-23  7:32           ` Balbir Singh
2009-06-23 13:42             ` Fabio Checconi
2009-06-23  2:05     ` Vivek Goyal
2009-06-23  2:20       ` Jeff Moyer
2009-06-30  6:40   ` Gui Jianfeng
2009-07-01  1:28     ` Vivek Goyal
2009-07-01  9:24   ` Gui Jianfeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A2C649C.8070806@cn.fujitsu.com \
    --to=guijianfeng@cn.fujitsu.com \
    --cc=agk@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=dhaval@linux.vnet.ibm.com \
    --cc=dm-devel@redhat.com \
    --cc=dpshah@google.com \
    --cc=fchecconi@gmail.com \
    --cc=fernando@oss.ntt.co.jp \
    --cc=jbaron@redhat.com \
    --cc=jens.axboe@oracle.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=m-ikeda@ds.jp.nec.com \
    --cc=mikew@google.com \
    --cc=nauman@google.com \
    --cc=paolo.valente@unimore.it \
    --cc=peterz@infradead.org \
    --cc=righi.andrea@gmail.com \
    --cc=ryov@valinux.co.jp \
    --cc=s-uchida@ap.jp.nec.com \
    --cc=snitzer@redhat.com \
    --cc=taka@valinux.co.jp \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox