From: Eric Dumazet <edumazet@google.com>
To: Tahsin Erdogan <trdgn@amazon.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tun: avoid high-order page allocation for packet header
Date: Tue, 1 Aug 2023 12:16:23 +0200 [thread overview]
Message-ID: <CANn89iLghUDUSbNv-QOgyJ4dv5DhXGL60caeuVMnHW4HZQVJmg@mail.gmail.com> (raw)
In-Reply-To: <CANn89iLV0iEeQy19wn+Vfmhpgr6srVpf3L+oBvuDyLRQXfoMug@mail.gmail.com>
On Tue, Aug 1, 2023 at 11:37 AM Eric Dumazet <edumazet@google.com> wrote:
>
> On Tue, Aug 1, 2023 at 1:07 AM Tahsin Erdogan <trdgn@amazon.com> wrote:
> >
> > When GSO is not enabled and a packet is transmitted via writev(), all
> > payload is treated as header which requires a contiguous memory allocation.
> > This allocation request is harder to satisfy, and may even fail if there is
> > enough fragmentation.
> >
> > Note that sendmsg() code path limits the linear copy length, so this change
> > makes writev() and sendmsg() more consistent.
> >
> > Signed-off-by: Tahsin Erdogan <trdgn@amazon.com>
> > ---
>
> I will have to tweak one existing packetdrill test, nothing major.
>
> Tested-by: Eric Dumazet <edumazet@google.com>
> Reviewed-by: Eric Dumazet <edumazet@google.com>
I have to take this back, sorry.
We need to change alloc_skb_with_frags() and tun.c to attempt
high-order allocations,
otherwise tun users sending very large buffers will regress.
(Even if this _could_ fail as you pointed out if memory is tight/fragmented)
I am working to make the change in alloc_skb_with_frags() and in tun,
we can apply your patch after this prereq.
next prev parent reply other threads:[~2023-08-01 10:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 23:07 [PATCH v2] tun: avoid high-order page allocation for packet header Tahsin Erdogan
2023-08-01 9:37 ` Eric Dumazet
2023-08-01 10:16 ` Eric Dumazet [this message]
2023-08-01 13:14 ` Willem de Bruijn
2023-08-01 13:30 ` Eric Dumazet
2023-08-08 1:22 ` Erdogan, Tahsin
2023-08-08 7:28 ` Eric Dumazet
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=CANn89iLghUDUSbNv-QOgyJ4dv5DhXGL60caeuVMnHW4HZQVJmg@mail.gmail.com \
--to=edumazet@google.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=trdgn@amazon.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).