netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Subject: [PATCH net 0/3] udp: behave under memory pressure
Date: Fri, 17 Jan 2020 18:27:53 +0100	[thread overview]
Message-ID: <cover.1579281705.git.pabeni@redhat.com> (raw)

Williem reported that in some scenarios the UDP protocol can keep a lot of
memory in use on an idle system. He also diagnosed the root cause in the
forward allocated memory bulk free.

This series addresses the issue adding memory pressure tracking for the UDP
protocol, and flushing the fwd allocated memory if the protocol is under
memory pressure.

The first two patches clean-up the current memory pressure helpers for UDP
usage, and the 3rd one is the actual fix.

Targeting the net tree, as this addresses a reported issue. I guess even
net-next can be considered a valid target, as this also changes slightly the
protocol behavior under memory pressure. Please advise on the preferred option.

Paolo Abeni (3):
  net: generic enter_memory_pressure implementation.
  net: add annotation to memory_pressure lockless access
  udp: avoid bulk memory scheduling on memory pressure.

 include/net/sock.h |  4 ++--
 include/net/udp.h  |  2 ++
 net/core/sock.c    | 10 +++++++---
 net/ipv4/udp.c     | 13 ++++++++++++-
 net/ipv6/udp.c     |  2 ++
 5 files changed, 25 insertions(+), 6 deletions(-)

-- 
2.21.0


             reply	other threads:[~2020-01-17 17:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17 17:27 Paolo Abeni [this message]
2020-01-17 17:27 ` [PATCH net 1/3] net: generic enter_memory_pressure implementation Paolo Abeni
2020-01-17 17:27 ` [PATCH net 2/3] net: add annotations to memory_pressure lockless access Paolo Abeni
2020-01-17 17:27 ` [PATCH net 3/3] udp: avoid bulk memory scheduling on memory pressure Paolo Abeni
2020-01-17 17:51   ` Eric Dumazet
2020-01-17 18:37     ` Paolo Abeni
2020-01-17 18:38     ` Willem de Bruijn

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=cover.1579281705.git.pabeni@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=willemdebruijn.kernel@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;
as well as URLs for NNTP newsgroup(s).