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: <4b4fb362d20a5c97165f929d049065518f7fa108.1427936719.git.sowmini.varadhan@oracle.com>
Date:	Thu,  2 Apr 2015 09:50:48 -0400
From:	Sowmini Varadhan <sowmini.varadhan@...cle.com>
To:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	chien.yen@...cle.com, davem@...emloft.net,
	rds-devel@....oracle.com, agrover@...hat.com, clm@...com,
	zab@...bo.net, ajaykumar.hotchandani@...cle.com,
	Sowmini Varadhan <sowmini.varadhan@...cle.com>
Subject: [PATCH 5/6] RDS: rds_send_xmit is called under a spinlock, lets not do a cond_resched()

Original patch by Chris Mason

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@...cle.com>
---
 net/rds/send.c |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/net/rds/send.c b/net/rds/send.c
index aec3f9d..23135a8 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -199,7 +199,6 @@ int rds_send_xmit(struct rds_connection *conn)
 			same_rm++;
 			if (same_rm >= 4096) {
 				printk_ratelimited(KERN_ERR "RDS: Stuck rm\n");
-				cond_resched();
 				ret = -EAGAIN;
 				break;
 			}
@@ -427,17 +426,8 @@ int rds_send_xmit(struct rds_connection *conn)
 		smp_mb();
 		if (!list_empty(&conn->c_send_queue) &&
 		    send_gen == conn->c_send_gen) {
-			cond_resched();
-			/* repeat our check after the resched in case
-			 * someone else was kind enough to empty or process
-			 * the queue
-			 */
-			smp_mb();
-			if (!list_empty(&conn->c_send_queue) &&
-			    send_gen == conn->c_send_gen) {
-				rds_stats_inc(s_send_lock_queue_raced);
-				goto restart;
-			}
+			rds_stats_inc(s_send_lock_queue_raced);
+			goto restart;
 		}
 	}
 out:
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ