public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Matteo Croce <mcroce@redhat.com>, netdev@vger.kernel.org
Subject: Re: [RFC] net: make net.core.{r,w}mem_{default,max} namespaced
Date: Tue, 01 Aug 2017 11:33:00 +0200	[thread overview]
Message-ID: <1501579980.1163602.1059346360.66293F3A@webmail.messagingengine.com> (raw)
In-Reply-To: <1501571907.1876.27.camel@edumazet-glaptop3.roam.corp.google.com>

On Tue, Aug 1, 2017, at 09:18, Eric Dumazet wrote:
> On Tue, 2017-08-01 at 02:17 -0400, Hannes Frederic Sowa wrote:
> 
> > We do account rmem as well as wmem allocated memory to the apropriate
> > mem_cgs. In theory this should be okay.
> 
> Last time I checked, rmem was not memcg ready yet.
> 
> Can you describe the details ?

As long as our packets pass __sock_queue_rcv_skb (what we do with udp,
raw, packet) we call down to sk_rmem_schedule, which in
__sk_mem_schedule -> sk_mem_raise_allocated will charge the mem_cg or
suppress the allocation.

For tcp, as I remember from the last discussion, we simply drop packets
and don't handle that very sensible, albeit we should not get out of the
mem_cg limits.

tcp_try_rmem_schedule in front of the ofo as well as the data queue
should make sure of that. Did I overlook anything?

OTOH, I am not too fond of the change. I just think that it shouldn't
deplete memory but rather stall connections.

Thanks,
Hannes

      reply	other threads:[~2017-08-01  9:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-26 17:03 [RFC] net: make net.core.{r,w}mem_{default,max} namespaced Matteo Croce
2017-07-28 20:51 ` Hannes Frederic Sowa
2017-07-31 10:07 ` Eric Dumazet
2017-08-01  6:17   ` Hannes Frederic Sowa
2017-08-01  7:18     ` Eric Dumazet
2017-08-01  9:33       ` Hannes Frederic Sowa [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=1501579980.1163602.1059346360.66293F3A@webmail.messagingengine.com \
    --to=hannes@stressinduktion.org \
    --cc=eric.dumazet@gmail.com \
    --cc=mcroce@redhat.com \
    --cc=netdev@vger.kernel.org \
    /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