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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 08 Aug 2009 16:14:51 +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, nauman@...gle.com, dpshah@...gle.com,
	ryov@...inux.co.jp, balbir@...ux.vnet.ibm.com,
	righi.andrea@...il.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
Subject: Re: [PATCH 22/24] io-controller: Per io group bdi congestion interface

Vivek Goyal wrote:
...
> +/* Set io group congestion on and off thresholds */
> +void elv_io_group_congestion_threshold(struct request_queue *q,
> +						struct io_group *iog)
> +{
> +	int nr;
> +
> +	nr = q->nr_group_requests - (q->nr_group_requests / 8) + 1;
> +	if (nr > q->nr_group_requests)
> +		nr = q->nr_group_requests;
> +	iog->nr_congestion_on = nr;
> +
> +	nr = q->nr_group_requests - (q->nr_group_requests / 8)
> +			- (q->nr_group_requests / 16) - 1;
> +	if (nr < 1)
> +		nr = 1;
> +	iog->nr_congestion_off = nr;

Vivek,

Since we determine whether io group is congenssed or not just by checking 
iog->nr_congestion_on, we can get rid of iog->nr_congestion_off here.

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

diff --git a/block/elevator-fq.c b/block/elevator-fq.c
index 66b10eb..e73da31 100644
--- a/block/elevator-fq.c
+++ b/block/elevator-fq.c
@@ -1267,12 +1267,6 @@ void elv_io_group_congestion_threshold(struct request_queue *q,
 	if (nr > q->nr_group_requests)
 		nr = q->nr_group_requests;
 	iog->nr_congestion_on = nr;
-
-	nr = q->nr_group_requests - (q->nr_group_requests / 8)
-			- (q->nr_group_requests / 16) - 1;
-	if (nr < 1)
-		nr = 1;
-	iog->nr_congestion_off = nr;
 }
 
 static inline int elv_is_iog_congested(struct request_queue *q,
diff --git a/block/elevator-fq.h b/block/elevator-fq.h
index 0581e55..2815279 100644
--- a/block/elevator-fq.h
+++ b/block/elevator-fq.h
@@ -266,9 +266,8 @@ struct io_group {
 	/* Single ioq per group, used for noop, deadline, anticipatory */
 	struct io_queue *ioq;
 
-	/* io group congestion on and off threshold for request descriptors */
+	/* io group congestion on threshold for request descriptors */
 	unsigned int nr_congestion_on;
-	unsigned int nr_congestion_off;
 
 	/* request list associated with the group */
 	struct request_list rl;
-- 
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