Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753883AbbDBOXO (ORCPT ); Thu, 2 Apr 2015 10:23:14 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:28509 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753181AbbDBOT5 (ORCPT ); Thu, 2 Apr 2015 10:19:57 -0400 From: Sowmini Varadhan To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: chien.yen@oracle.com, davem@davemloft.net, rds-devel@oss.oracle.com, agrover@redhat.com, clm@fb.com, zab@zabbo.net, ajaykumar.hotchandani@oracle.com, sergei.shtylyov@cogentembedded.com, Sowmini Varadhan Subject: [PATCHv2 5/6] RDS: rds_send_xmit is called under a spinlock, lets not do a cond_resched() Date: Thu, 2 Apr 2015 10:19:39 -0400 Message-Id: <4b4fb362d20a5c97165f929d049065518f7fa108.1427983908.git.sowmini.varadhan@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1340 Lines: 47 Original patch by Chris Mason Signed-off-by: Sowmini Varadhan --- 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 linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/