mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 23:36:23 +09:00
rxrpc: Fix client call queueing, waiting for channel
[ Upstream commit69ffaebb90
] rxrpc_get_client_conn() adds a new call to the front of the waiting_calls queue if the connection it's going to use already exists. This is bad as it allows calls to get starved out. Fix this by adding to the tail instead. Also change the other enqueue point in the same function to put it on the front (ie. when we have a new connection). This makes the point that in the case of a new connection the new call goes at the front (though it doesn't actually matter since the queue should be unoccupied). Fixes:45025bceef
("rxrpc: Improve management and caching of client connection objects") Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Marc Dionne <marc.dionne@auristor.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6858840739
commit
a63c7fca08
|
@ -351,7 +351,7 @@ static int rxrpc_get_client_conn(struct rxrpc_call *call,
|
|||
* normally have to take channel_lock but we do this before anyone else
|
||||
* can see the connection.
|
||||
*/
|
||||
list_add_tail(&call->chan_wait_link, &candidate->waiting_calls);
|
||||
list_add(&call->chan_wait_link, &candidate->waiting_calls);
|
||||
|
||||
if (cp->exclusive) {
|
||||
call->conn = candidate;
|
||||
|
@ -430,7 +430,7 @@ static int rxrpc_get_client_conn(struct rxrpc_call *call,
|
|||
call->conn = conn;
|
||||
call->security_ix = conn->security_ix;
|
||||
call->service_id = conn->service_id;
|
||||
list_add(&call->chan_wait_link, &conn->waiting_calls);
|
||||
list_add_tail(&call->chan_wait_link, &conn->waiting_calls);
|
||||
spin_unlock(&conn->channel_lock);
|
||||
_leave(" = 0 [extant %d]", conn->debug_id);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user