Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Dust Li <dust.li@linux.alibaba.com>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net/sock: don't drop udp packets if udp_mem[2] not reached
Date: Mon, 07 Sep 2020 19:18:48 +0200	[thread overview]
Message-ID: <428dae2552915c42b9144d7489fd912493433c1e.camel@redhat.com> (raw)
In-Reply-To: <20200907144435.43165-1-dust.li@linux.alibaba.com>

Hi,

On Mon, 2020-09-07 at 22:44 +0800, Dust Li wrote:
> We encoutered udp packets drop under a pretty low pressure
> with net.ipv4.udp_mem[0] set to a small value (4096).
> 
> After some tracing and debugging, we found that for udp
> protocol, __sk_mem_raise_allocated() will possiblly drop
> packets if:
>   udp_mem[0] < udp_prot.memory_allocated < udp_mem[2]
> 
> That's because __sk_mem_raise_allocated() didn't handle
> the above condition for protocols like udp who doesn't
> have sk_has_memory_pressure()
> 
> We can reproduce this with the following condition
> 1. udp_mem[0] is relateive small,
> 2. net.core.rmem_default/max > udp_mem[0] * 4K

This looks like something that could/should be addressed at
configuration level ?!?

udp_mem[0] should accomodate confortably at least a socket.

Cheers,

Paolo


  reply	other threads:[~2020-09-07 17:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07 14:44 Dust Li
2020-09-07 17:18 ` Paolo Abeni [this message]
2020-09-08  3:15   ` dust.li
2020-09-08  8:46     ` Paolo Abeni
2020-09-09  3:24       ` dust.li

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=428dae2552915c42b9144d7489fd912493433c1e.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dust.li@linux.alibaba.com \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH] net/sock: don'\''t drop udp packets if udp_mem[2] not reached' \
    /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

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).