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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250701164508.0738f00f@kernel.org>
Date: Tue, 1 Jul 2025 16:45:08 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Harry Yoo <harry.yoo@...cle.com>
Cc: Byungchul Park <byungchul@...com>, willy@...radead.org,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
 kernel_team@...ynix.com, almasrymina@...gle.com,
 ilias.apalodimas@...aro.org, hawk@...nel.org, akpm@...ux-foundation.org,
 davem@...emloft.net, john.fastabend@...il.com, andrew+netdev@...n.ch,
 asml.silence@...il.com, toke@...hat.com, tariqt@...dia.com,
 edumazet@...gle.com, pabeni@...hat.com, saeedm@...dia.com, leon@...nel.org,
 ast@...nel.org, daniel@...earbox.net, david@...hat.com,
 lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, vbabka@...e.cz,
 rppt@...nel.org, surenb@...gle.com, mhocko@...e.com, horms@...nel.org,
 linux-rdma@...r.kernel.org, bpf@...r.kernel.org, vishal.moola@...il.com,
 hannes@...xchg.org, ziy@...dia.com, jackmanb@...gle.com
Subject: Re: [PATCH net-next v7 1/7] netmem: introduce struct netmem_desc
 mirroring struct page

On Mon, 30 Jun 2025 08:34:48 +0900 Harry Yoo wrote:
> > Ugh, you keep explaining the mechanics to me. Our goal here is not
> > just to move fields around and make it still compile :/
> > 
> > Let me ask you this way: you said "netmem_desc" will be allocated
> > thru slab "shortly". How will calling the equivalent of page_address()
> > on netmem_desc work at that stage? Feel free to refer me to the existing
> > docs if its covered..  
> 
> https://kernelnewbies.org/MatthewWilcox/Memdescs/Path
> https://kernelnewbies.org/MatthewWilcox/Memdescs
> 
> May not be the exact document you're looking for,
> but with this article I can imagine:
> 
> - The ultimate goal is to shrink struct page to eventually from 64 bytes
>   to 8 bytes, by allocating only the minimum required metadata per 4k page
>   statically and moving the rest of metadata to dynamically-allocated
>   descriptors (netmem_desc, anon, file, ptdesc, zpdesc, etc.) using slab
>   at page allocation time.
> 
> - We can't achieve that goal just yet, because several subsystems
>   still use struct page fields for their own purposes.
> 
>   To achieve that, each of these subsystems needs to define
>   its own descriptor, which, for now, overlays struct page, and should be
>   converted to use the new descriptor.
> 
>   Eventually, these descriptors will be allocated using slab.
> 
> - For CPU-readable buffers, page->memdesc will point to a netmem_desc,
>   with a lower bit set indicating that it's a netmem_desc rather than
>   other type. Networking code will need to cast it to (netmem_desc *)
>   and dereference it to access networking specific fields.
> 
> - The struct page array (vmemmap) will still be statically allocated
>   at boot time (or during memory hotplug time).
>   So no change in how page_address() works.
> 
> net_iovs will continue to be not associated with struct pages,
> as the buffers don't have corresponding struct pages.
> net_iovs are already allocated using slab.

Thanks a lot, this clarifies things for me.

Unfortunately, I still think that it's hard to judge patches 1 and 7 
in context limited to this series, so let's proceed to reposting just
the "middle 5" patches.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ