Searched hist:e93da92896bc0ddc26e88bbc09e7e39b84366a38 (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/net/mptcp/ |
H A D | protocol.h | diff e93da92896bc0ddc26e88bbc09e7e39b84366a38 Fri Nov 27 04:10:23 CST 2020 Paolo Abeni <pabeni@redhat.com> mptcp: implement wmem reservation
This leverages the previous commit to reserve the wmem required for the sendmsg() operation when the msk socket lock is first acquired. Some heuristics are used to get a reasonable [over] estimation of the whole memory required. If we can't forward alloc such amount fallback to a reasonable small chunk, otherwise enter the wait for memory path.
When sendmsg() needs more memory it looks at wmem_reserved first and if that is exhausted, move more space from sk_forward_alloc.
The reserved memory is not persistent and is released at the next socket unlock via the release_cb().
Overall this will simplify the next patch.
Acked-by: Florian Westphal <fw@strlen.de> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
H A D | protocol.c | diff e93da92896bc0ddc26e88bbc09e7e39b84366a38 Fri Nov 27 04:10:23 CST 2020 Paolo Abeni <pabeni@redhat.com> mptcp: implement wmem reservation
This leverages the previous commit to reserve the wmem required for the sendmsg() operation when the msk socket lock is first acquired. Some heuristics are used to get a reasonable [over] estimation of the whole memory required. If we can't forward alloc such amount fallback to a reasonable small chunk, otherwise enter the wait for memory path.
When sendmsg() needs more memory it looks at wmem_reserved first and if that is exhausted, move more space from sk_forward_alloc.
The reserved memory is not persistent and is released at the next socket unlock via the release_cb().
Overall this will simplify the next patch.
Acked-by: Florian Westphal <fw@strlen.de> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|