[PATCH] 2.5.25 Clean up RPC receive code
Divorces task xid<->request slot mapping from the internals of the rpc_waitqueue xprt->pending. Instead xprt_lookup_rqst() is made to search a dedicated list (xprt->recv) on which the request slot is placed immediately after being allocated to a task. The new queue is protected using the spinlock xprt->sock_lock rather than the generic RPC task lock. Both udp_data_ready() and tcp_data_ready() (well tcp_read_request() actually) now need to protect against the request being removed from the xprt->recv list while they copy the RPC reply data from the skb. On the other hand, they no longer need to worry about the task disappearing from xprt->pending. This means that rpc_lock_task() hack can be replaced by the spinlock xprt->sock_lock.
Showing
Please register or sign in to comment