Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: marcelo.leitner@gmail.com
Cc: netdev@vger.kernel.org, vyasevich@gmail.com,
	nhorman@tuxdriver.com, linux-sctp@vger.kernel.org
Subject: Re: [PATCH] sctp: allow sctp_transmit_packet and others to use gfp
Date: Sun, 13 Mar 2016 22:29:21 -0400 (EDT)	[thread overview]
Message-ID: <20160313.222921.1815217477750936019.davem@davemloft.net> (raw)
In-Reply-To: <90a118e4ca996adb067290a6c45fca6564a77423.1457644344.git.marcelo.leitner@gmail.com>

From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: Thu, 10 Mar 2016 18:33:07 -0300

> Currently sctp_sendmsg() triggers some calls that will allocate memory
> with GFP_ATOMIC even when not necessary. In the case of
> sctp_packet_transmit it will allocate a linear skb that will be used to
> construct the packet and this may cause sends to fail due to ENOMEM more
> often than anticipated specially with big MTUs.
> 
> This patch thus allows it to inherit gfp flags from upper calls so that
> it can use GFP_KERNEL if it was triggered by a sctp_sendmsg call or
> similar. All others, like retransmits or flushes started from BH, are
> still allocated using GFP_ATOMIC.
> 
> In netperf tests this didn't result in any performance drawbacks when
> memory is not too fragmented and made it trigger ENOMEM way less often.
> 
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

Applied, thanks.

      reply	other threads:[~2016-03-14  2:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 21:33 [PATCH] sctp: allow sctp_transmit_packet and others to use gfp Marcelo Ricardo Leitner
2016-03-14  2:29 ` David Miller [this message]

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=20160313.222921.1815217477750936019.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.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