• Jon Paul Maloy's avatar
    tipc: use existing sk_write_queue for outgoing packet chain · 94153e36
    Jon Paul Maloy authored
    The list for outgoing traffic buffers from a socket is currently
    allocated on the stack. This forces us to initialize the queue for
    each sent message, something costing extra CPU cycles in the most
    critical data path. Later in this series we will introduce a new
    safe input buffer queue, something that would force us to initialize
    even the spinlock of the outgoing queue. A closer analysis reveals
    that the queue always is filled and emptied within the same lock_sock()
    session. It is therefore safe to use a queue aggregated in the socket
    itself for this purpose. Since there already exists a queue for this
    in struct sock, sk_write_queue, we introduce use of that queue in
    this commit.
    Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    94153e36
socket.c 74.6 KB