From: Greg KH <gregkh@linuxfoundation.org>
To: ashwin-h <ashwinh@vmware.com>
Cc: vyasevich@gmail.com, nhorman@tuxdriver.com, davem@davemloft.net,
linux-sctp@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, srivatsab@vmware.com,
srivatsa@csail.mit.edu, rostedt@goodmis.org, srostedt@vmware.com,
ashwin.hiranniah@gmail.com, Xin Long <lucien.xin@gmail.com>
Subject: Re: [PATCH 1/2] sctp: implement memory accounting on tx path
Date: Wed, 6 May 2020 08:47:25 +0200 [thread overview]
Message-ID: <20200506064725.GC2273049@kroah.com> (raw)
In-Reply-To: <4ce6c13946803700d235082b9c52460ed38dab1e.1588242081.git.ashwinh@vmware.com>
On Wed, May 06, 2020 at 07:50:53PM +0530, ashwin-h wrote:
> From: Xin Long <lucien.xin@gmail.com>
>
> commit 1033990ac5b2ab6cee93734cb6d301aa3a35bcaa upstream.
>
> Now when sending packets, sk_mem_charge() and sk_mem_uncharge() have been
> used to set sk_forward_alloc. We just need to call sk_wmem_schedule() to
> check if the allocated should be raised, and call sk_mem_reclaim() to
> check if the allocated should be reduced when it's under memory pressure.
>
> If sk_wmem_schedule() returns false, which means no memory is allowed to
> allocate, it will block and wait for memory to become available.
>
> Note different from tcp, sctp wait_for_buf happens before allocating any
> skb, so memory accounting check is done with the whole msg_len before it
> too.
>
> Reported-by: Matteo Croce <mcroce@redhat.com>
> Tested-by: Matteo Croce <mcroce@redhat.com>
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Ashwin H <ashwinh@vmware.com>
> ---
> net/sctp/socket.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
next prev parent reply other threads:[~2020-05-06 6:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 14:20 [PATCH 0/2] Backport to 4.19 - sctp: fully support memory accounting ashwin-h
2020-05-06 6:47 ` Greg KH
2020-05-06 14:20 ` [PATCH 1/2] sctp: implement memory accounting on tx path ashwin-h
2020-05-06 6:47 ` Greg KH [this message]
2020-05-06 14:20 ` [PATCH 2/2] sctp: implement memory accounting on rx path ashwin-h
2020-05-06 6:47 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200506064725.GC2273049@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=ashwin.hiranniah@gmail.com \
--cc=ashwinh@vmware.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=rostedt@goodmis.org \
--cc=srivatsa@csail.mit.edu \
--cc=srivatsab@vmware.com \
--cc=srostedt@vmware.com \
--cc=vyasevich@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox