Commit 4ba22d6d authored by Eric Dumazet's avatar Eric Dumazet Committed by Liu Jian
Browse files

tcp: small optimization in tcp recvmsg()

mainline inclusion
from mainline-v5.17-rc1
commit 93afcfd1
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I65HYE

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=93afcfd1db35882921b2521a637c78755c27b02c



---------------------------

When reading large chunks of data, incoming packets might
be added to the backlog from BH.

tcp recvmsg() detects the backlog queue is not empty, and uses
a release_sock()/lock_sock() pair to process this backlog.

We now have __sk_flush_backlog() to perform this
a bit faster.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
(cherry picked from commit 93afcfd1)
Signed-off-by: default avatarLiu Jian <liujian56@huawei.com>
parent d5a5cb7d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment