[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFnufp3pCrywDFXZqDSw+-2K7p9yHfYY9C5WveaXMWDJ_oViAA@mail.gmail.com>
Date: Fri, 14 May 2021 03:34:02 +0200
From: Matteo Croce <mcroce@...ux.microsoft.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: netdev@...r.kernel.org, linux-mm@...ck.org,
Ayush Sawal <ayush.sawal@...lsio.com>,
Vinay Kumar Yadav <vinay.yadav@...lsio.com>,
Rohit Maheshwari <rohitm@...lsio.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Marcin Wojtas <mw@...ihalf.com>,
Russell King <linux@...linux.org.uk>,
Mirko Lindner <mlindner@...vell.com>,
Stephen Hemminger <stephen@...workplumber.org>,
Tariq Toukan <tariqt@...dia.com>,
Jesper Dangaard Brouer <hawk@...nel.org>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
John Fastabend <john.fastabend@...il.com>,
Boris Pismenny <borisp@...dia.com>,
Arnd Bergmann <arnd@...db.de>,
Andrew Morton <akpm@...ux-foundation.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Vlastimil Babka <vbabka@...e.cz>, Yu Zhao <yuzhao@...gle.com>,
Will Deacon <will@...nel.org>,
Fenghua Yu <fenghua.yu@...el.com>,
Roman Gushchin <guro@...com>, Hugh Dickins <hughd@...gle.com>,
Peter Xu <peterx@...hat.com>, Jason Gunthorpe <jgg@...pe.ca>,
Jonathan Lemon <jonathan.lemon@...il.com>,
Alexander Lobakin <alobakin@...me>,
Cong Wang <cong.wang@...edance.com>, wenxu <wenxu@...oud.cn>,
Kevin Hao <haokexin@...il.com>,
Jakub Sitnicki <jakub@...udflare.com>,
Marco Elver <elver@...gle.com>,
Willem de Bruijn <willemb@...gle.com>,
Miaohe Lin <linmiaohe@...wei.com>,
Yunsheng Lin <linyunsheng@...wei.com>,
Guillaume Nault <gnault@...hat.com>,
linux-kernel@...r.kernel.org, linux-rdma@...r.kernel.org,
bpf@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
David Ahern <dsahern@...il.com>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Saeed Mahameed <saeedm@...dia.com>,
Andrew Lunn <andrew@...n.ch>, Paolo Abeni <pabeni@...hat.com>,
Sven Auhagen <sven.auhagen@...eatech.de>
Subject: Re: [PATCH net-next v5 1/5] mm: add a signature in struct page
On Fri, May 14, 2021 at 3:01 AM Matthew Wilcox <willy@...radead.org> wrote:
>
> On Thu, May 13, 2021 at 06:58:42PM +0200, Matteo Croce wrote:
> > struct { /* page_pool used by netstack */
> > + /**
> > + * @pp_magic: magic value to avoid recycling non
> > + * page_pool allocated pages.
> > + * It aliases with page->lru.next
>
> I'm not really keen on documenting what aliases with what.
> pp_magic also aliases with compound_head, 'next' (for slab),
> and dev_pagemap. This is an O(n^2) documentation problem ...
>
Eric asked to document what page->signature aliases, so I did it in
the commit message and in a comment.
I can drop the code comment and leave it just the commit message.
> I feel like I want to document the pfmemalloc bit in mm_types.h,
> but I don't have a concrete suggestion yet.
>
> > +++ b/include/net/page_pool.h
> > @@ -63,6 +63,8 @@
> > */
> > #define PP_ALLOC_CACHE_SIZE 128
> > #define PP_ALLOC_CACHE_REFILL 64
> > +#define PP_SIGNATURE (POISON_POINTER_DELTA + 0x40)
>
> I wonder if this wouldn't be better in linux/poison.h?
>
I was thinking the same, I'll do it in the v6.
Regards,
--
per aspera ad upstream
Powered by blists - more mailing lists