diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2015-04-08 19:33:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-08 22:17:32 +0300 |
commit | 443be0e5affe3acb6dd81e7402951677e0a0eb35 (patch) | |
tree | 74cfc543b82a49fd7b920aade205cdca1ecb586b /net/rds/connection.c | |
parent | 1789b2c077f6d6c82b04cfe49a0fec020dc42488 (diff) | |
download | linux-443be0e5affe3acb6dd81e7402951677e0a0eb35.tar.xz |
RDS: make sure not to loop forever inside rds_send_xmit
If a determined set of concurrent senders keep the send queue full,
we can loop forever inside rds_send_xmit. This fix has two parts.
First we are dropping out of the while(1) loop after we've processed a
large batch of messages.
Second we add a generation number that gets bumped each time the
xmit bit lock is acquired. If someone else has jumped in and
made progress in the queue, we skip our goto restart.
Original patch by Chris Mason.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/connection.c')
-rw-r--r-- | net/rds/connection.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c index 7952a5b1b4c4..14f041398ca1 100644 --- a/net/rds/connection.c +++ b/net/rds/connection.c @@ -193,6 +193,7 @@ static struct rds_connection *__rds_conn_create(__be32 laddr, __be32 faddr, } atomic_set(&conn->c_state, RDS_CONN_DOWN); + conn->c_send_gen = 0; conn->c_reconnect_jiffies = 0; INIT_DELAYED_WORK(&conn->c_send_w, rds_send_worker); INIT_DELAYED_WORK(&conn->c_recv_w, rds_recv_worker); |