netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Zijian Zhang <zijianzhang@bytedance.com>
Cc: netdev@vger.kernel.org, willemdebruijn.kernel@gmail.com,
	cong.wang@bytedance.com, xiaochun.lu@bytedance.com
Subject: Re: [PATCH net 1/2] selftests: fix OOM in msg_zerocopy selftest
Date: Wed, 3 Jul 2024 19:42:08 -0700	[thread overview]
Message-ID: <20240703194208.7650d8bb@kernel.org> (raw)
In-Reply-To: <5eddb78a-ba1a-4568-aeac-0dc296efdd51@bytedance.com>

On Wed, 3 Jul 2024 19:32:33 -0700 Zijian Zhang wrote:
> > This test doesn't fail in netdev CI. Is the problem fix in net-next
> > somehow? Or the "always exits with OUT_OF_MEMORY" is an exaggerations?
> > (TBH I'm not even sure what it means to "exit with OUT_OF_MEMORY" in
> > this context.)
> >  
> The reason why this test doesn't fail in CI:
> 
> According to the test output,
> # ipv4 tcp -z -t 1
> # tx=111332 (6947 MB) txc=111332 zc=n
> zerocopy is false here.
> 
> This is because of some limitation of zerocopy in localhost.
> Specifically, the subsection "Notification Latency" in the sendmsg
> zerocopy the paper.
> 
> In order to make "zc=y", we may need to update skb_orphan_frags_rx to
> the same as skb_orphan_frags, recompile the kernel, and run the test.
> 
> By OUT_OF_MEMORY I mean:
> 
> Each calling of sendmsg with zerocopy will allocate an skb with
> sock_omalloc. If users never recv the notifications but keep calling
> sendmsg with zerocopy. The send system call will finally return with
> -ENOMEM.
> 
> I hope this clarifies your confusion :)

It does, thanks!


  reply	other threads:[~2024-07-04  2:42 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
2024-07-04  1:50   ` Jakub Kicinski
2024-07-04  2:32     ` Zijian Zhang
2024-07-04  2:42       ` Jakub Kicinski [this message]
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=20240703194208.7650d8bb@kernel.org \
    --to=kuba@kernel.org \
    --cc=cong.wang@bytedance.com \
    --cc=netdev@vger.kernel.org \
    --cc=willemdebruijn.kernel@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).