[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <88c4f8c4-085c-1934-536b-0fc8a38205c7@intel.com>
Date: Fri, 26 May 2023 14:52:57 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: David Laight <David.Laight@...LAB.COM>
CC: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
<pabeni@...hat.com>, Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
Magnus Karlsson <magnus.karlsson@...el.com>, Michal Kubiak
<michal.kubiak@...el.com>, Larysa Zaremba <larysa.zaremba@...el.com>, "Jesper
Dangaard Brouer" <hawk@...nel.org>, Ilias Apalodimas
<ilias.apalodimas@...aro.org>, Christoph Hellwig <hch@....de>, Paul Menzel
<pmenzel@...gen.mpg.de>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v2 05/12] iavf: always use a full order-0 page
From: David Laight <David.Laight@...LAB.COM>
Date: Fri, 26 May 2023 08:57:31 +0000
> From: Alexander Lobakin
>> Sent: 25 May 2023 13:58
[...]
>> 4096 page
>> 64 head, 320 tail
>> 3712 HW buffer size
>> 3686 max MTU w/o frags
>
> I'd have thought it was important to pack multiple buffers for
> MTU 1500 into a single page.
> 512 bytes split between head and tail room really ought to
> be enough for most cases.
>
> Is much tailroom ever used for received packets?
You don't have any tailroom at all when you split 4k page into two
halves on x86_64. From those 512 bytes, 320+ are used for
skb_shared_info. And then you're left with 192 bytes or even less (with
increased MAX_SKB_FRAGS, which becomes a new trend thanks to Eric and
Big TCP). XDP requires 256 bytes of headroom -- and you already don't
have them even with the default number of frags.
> It is used to append data to packets being sent - but that isn't
> really relevant here.
>
> While the unused memory is moderate for 4k pages, it is horrid
> for anything with large pages - think 64k and above.
But hey, there's always unused space and it's arbitrary whether to treat
it "horrid". For example, imagine a machine mostly handling 64-byte
traffic. From that point of view, even splitting pages into 2 halves
still is "horrid" -- 2048 bytes of truesize only to receive 64 bytes :>
> IIRC large pages are common on big PPC and maybe some arm cpus.
Even in that case, the percentage of 4k-page machines running those NICs
are much higher than > 4k. I thought we usually optimize things for the
most common usecases. Adding a couple hundred lines, branches on
hotpaths, limitations etc. only to serve a particular architecture... Dunno.
I have 16k pages on my private development machines and I have no issues
with using 1 page per frame in their NIC drivers :s
>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>
Thanks,
Olek
Powered by blists - more mailing lists