lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <9acb1863f53542b6bd247ad641b8c0fa@AcuMS.aculab.com> Date: Fri, 26 May 2023 08:57:31 +0000 From: David Laight <David.Laight@...LAB.COM> To: 'Alexander Lobakin' <aleksander.lobakin@...el.com>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com> CC: 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: Alexander Lobakin > Sent: 25 May 2023 13:58 > > The current scheme with trying to pick the smallest buffer possible for > the current MTU in order to flip/split pages is not very optimal. > For example, on default MTU of 1500 it gives only 192 bytes of headroom, > while XDP may require up to 258. But this also involves unnecessary code > complication, which sometimes is even hard to follow. > As page split is no more, always allocate order-0 pages. This optimizes > performance a bit and drops some bytes off the object code. Next, always > pick the maximum buffer length available for this %PAGE_SIZE to set it > up in the hardware. This means it now becomes a constant value, which > also has its positive impact. > On x64 this means (without XDP): > > 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? 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. IIRC large pages are common on big PPC and maybe some arm cpus. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
Powered by blists - more mailing lists