lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A92095A.4070804@cn.fujitsu.com>
Date:	Mon, 24 Aug 2009 11:30:34 +0800
From:	Gui Jianfeng <guijianfeng@...fujitsu.com>
To:	Vivek Goyal <vgoyal@...hat.com>
CC:	linux-kernel@...r.kernel.org,
	containers@...ts.linux-foundation.org, dm-devel@...hat.com,
	jens.axboe@...cle.com, ryov@...inux.co.jp,
	balbir@...ux.vnet.ibm.com, righi.andrea@...il.com,
	nauman@...gle.com, dpshah@...gle.com, lizf@...fujitsu.com,
	mikew@...gle.com, fchecconi@...il.com, paolo.valente@...more.it,
	fernando@....ntt.co.jp, s-uchida@...jp.nec.com, taka@...inux.co.jp,
	jmoyer@...hat.com, dhaval@...ux.vnet.ibm.com,
	m-ikeda@...jp.nec.com, agk@...hat.com, akpm@...ux-foundation.org,
	peterz@...radead.org, jmarchan@...hat.com
Subject: Re: [PATCH 12/24] io-controller: Wait for requests to complete from
 last queue before new queue is scheduled

Vivek Goyal wrote:
...
>  void elv_schedule_dispatch(struct request_queue *q)
> @@ -2260,6 +2264,17 @@ void *elv_select_ioq(struct request_queue *q, int force)
>  	}
>  
>  expire:
> +	if (efqd->fairness && !force && ioq && ioq->dispatched) {
> +		/*
> +		 * If there are request dispatched from this queue, don't
> +		 * dispatch requests from new queue till all the requests from
> +		 * this queue have completed.
> +		 */
> +		elv_log_ioq(efqd, ioq, "select: wait for requests to finish"
> +				" disp=%lu", ioq->dispatched);
> +		ioq = NULL;
> +		goto keep_queue;
> +	}
>  	elv_slice_expired(q);
>  new_queue:
>  	ioq = elv_set_active_ioq(q, new_ioq);
> @@ -2375,6 +2390,10 @@ void elv_ioq_completed_request(struct request_queue *q, struct request *rq)
>  				goto done;
>  			}
>  
> +			/* Wait for requests to finish from this queue */
> +			if (efqd->fairness && ioq->dispatched)

Since we have the routing to access to ioq->dispatched, why not to use it.

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

diff --git a/block/elevator-fq.c b/block/elevator-fq.c
index d04e925..f1e0de5 100644
--- a/block/elevator-fq.c
+++ b/block/elevator-fq.c
@@ -3120,7 +3120,7 @@ void elv_ioq_completed_request(struct request_queue *q, struct request *rq)
 			}
 
 			/* Wait for requests to finish from this queue */
-			if (efqd->fairness && ioq->dispatched)
+			if (efqd->fairness && elv_ioq_nr_dispatched(ioq))
 				goto done;
 
 			/* Expire the queue */
@@ -3135,7 +3135,7 @@ void elv_ioq_completed_request(struct request_queue *q, struct request *rq)
 		 * If this is the last queue in the group and we did not
 		 * decide to idle on queue, idle on group.
 		 */
-		if (elv_iog_should_idle(ioq) && !ioq->dispatched
+		if (elv_iog_should_idle(ioq) && !elv_ioq_nr_dispatched(ioq)
 		    && !timer_pending(&efqd->idle_slice_timer)) {
 			/*
 			 * If queue has used up its slice, wait for the
-- 
1.5.4.rc3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ