Netdev List
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: zijianzhang@bytedance.com,  netdev@vger.kernel.org
Cc: willemdebruijn.kernel@gmail.com,  cong.wang@bytedance.com,
	 xiaochun.lu@bytedance.com,
	 Zijian Zhang <zijianzhang@bytedance.com>
Subject: Re: [PATCH net 1/2] selftests: fix OOM in msg_zerocopy selftest
Date: Tue, 02 Jul 2024 09:17:56 -0400	[thread overview]
Message-ID: <6683fe0480c3d_6506a29452@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <20240701225349.3395580-2-zijianzhang@bytedance.com>

zijianzhang@ wrote:
> From: Zijian Zhang <zijianzhang@bytedance.com>
> 
> In selftests/net/msg_zerocopy.c, it has a while loop keeps calling sendmsg
> on a socket with MSG_ZEROCOPY flag, and it will recv the notifications
> until the socket is not writable. Typically, it will start the receiving
> process after around 30+ sendmsgs. However, as the introduction of commit
> dfa2f0483360 ("tcp: get rid of sysctl_tcp_adv_win_scale"), the sender is
> always writable and does not get any chance to run recv notifications.
> The selftest always exits with OUT_OF_MEMORY because the memory used by
> opt_skb exceeds the net.core.optmem_max. Meanwhile, it could be set to a
> different value to trigger OOM on older kernels too.
> 
> Thus, we introduce "cfg_notification_limit" to force sender to receive
> notifications after some number of sendmsgs.
> 
> Fixes: 07b65c5b31ce ("test: add msg_zerocopy test")
> Signed-off-by: Zijian Zhang <zijianzhang@bytedance.com>
> Signed-off-by: Xiaochun Lu <xiaochun.lu@bytedance.com>

Reviewed-by: Willem de Bruijn <willemb@google.com>

  reply	other threads:[~2024-07-02 13:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01 22:53 [PATCH net 0/2] fix OOM and order check in msg_zerocopy selftest zijianzhang
2024-07-01 22:53 ` [PATCH net 1/2] selftests: fix OOM " zijianzhang
2024-07-02 13:17   ` Willem de Bruijn [this message]
2024-07-04  1:50   ` Jakub Kicinski
2024-07-04  2:32     ` Zijian Zhang
2024-07-04  2:42       ` Jakub Kicinski
2024-07-01 22:53 ` [PATCH net 2/2] selftests: make order checking verbose " zijianzhang
2024-07-02 13:18   ` Willem de Bruijn
2024-07-02 18:05     ` Zijian Zhang
2024-07-04  2:50 ` [PATCH net 0/2] fix OOM and order check " patchwork-bot+netdevbpf

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=6683fe0480c3d_6506a29452@willemb.c.googlers.com.notmuch \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=cong.wang@bytedance.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiaochun.lu@bytedance.com \
    --cc=zijianzhang@bytedance.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