]> 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)
commit1afcdc8ce894224b24f00bedd3e5b4066b03885c
treeecb8946df4c325764123ee723ef56b83ceed3dc6
parente4f0976b332ec595bb2efe5b4f30f385baff3b49
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: fbe1bf9e4d27 ("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