]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: try harder to borrow memory from subflow under pressure
authorPaolo Abeni <pabeni@redhat.com>
Thu, 10 Jun 2021 22:59:40 +0000 (15:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Jun 2021 23:47:44 +0000 (16:47 -0700)
commit2f6eb559c5ef342db4f0aad8ec9cea72cb2e0c34
treeecb8946df4c325764123ee723ef56b83ceed3dc6
parent118ebd13b5d87793794b0c51581386307826921a
mptcp: try harder to borrow memory from subflow under pressure

If the host is under sever memory pressure, and RX forward
memory allocation for the msk fails, we try to borrow the
required memory from the ingress subflow.

The current attempt is a bit flaky: if skb->truesize is less
than SK_MEM_QUANTUM, the ssk will not release any memory, and
the next schedule will fail again.

Instead, directly move the required amount of pages from the
ssk to the msk, if available

Fixes: 4f406a2e0d41 ("mptcp: add missing memory scheduling in the rx path")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/protocol.c