cong.c (82845079160817cc6ac64e5321bbd935e0a47b3a) cong.c (ebeeb1ad9b8adcc37c2ec21a96f39e9d35199b46)
1/*
2 * Copyright (c) 2007 Oracle. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:

--- 209 unchanged lines hidden (view full) ---

218
219 spin_lock_irqsave(&rds_cong_lock, flags);
220
221 list_for_each_entry(conn, &map->m_conn_list, c_map_item) {
222 struct rds_conn_path *cp = &conn->c_path[0];
223
224 rcu_read_lock();
225 if (!test_and_set_bit(0, &conn->c_map_queued) &&
1/*
2 * Copyright (c) 2007 Oracle. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:

--- 209 unchanged lines hidden (view full) ---

218
219 spin_lock_irqsave(&rds_cong_lock, flags);
220
221 list_for_each_entry(conn, &map->m_conn_list, c_map_item) {
222 struct rds_conn_path *cp = &conn->c_path[0];
223
224 rcu_read_lock();
225 if (!test_and_set_bit(0, &conn->c_map_queued) &&
226 !test_bit(RDS_DESTROY_PENDING, &cp->cp_flags)) {
226 !rds_destroy_pending(cp->cp_conn)) {
227 rds_stats_inc(s_cong_update_queued);
228 /* We cannot inline the call to rds_send_xmit() here
229 * for two reasons (both pertaining to a TCP transport):
230 * 1. When we get here from the receive path, we
231 * are already holding the sock_lock (held by
232 * tcp_v4_rcv()). So inlining calls to
233 * tcp_setsockopt and/or tcp_sendmsg will deadlock
234 * when it tries to get the sock_lock())

--- 191 unchanged lines hidden ---
227 rds_stats_inc(s_cong_update_queued);
228 /* We cannot inline the call to rds_send_xmit() here
229 * for two reasons (both pertaining to a TCP transport):
230 * 1. When we get here from the receive path, we
231 * are already holding the sock_lock (held by
232 * tcp_v4_rcv()). So inlining calls to
233 * tcp_setsockopt and/or tcp_sendmsg will deadlock
234 * when it tries to get the sock_lock())

--- 191 unchanged lines hidden ---