From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAF0FC43461 for ; Fri, 14 May 2021 01:34:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4D8196142E for ; Fri, 14 May 2021 01:34:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D8196142E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A927E6B0036; Thu, 13 May 2021 21:34:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A42A46B006E; Thu, 13 May 2021 21:34:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8BCE26B0070; Thu, 13 May 2021 21:34:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id 5B9536B0036 for ; Thu, 13 May 2021 21:34:41 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E2CCBBBEC for ; Fri, 14 May 2021 01:34:40 +0000 (UTC) X-FDA: 78138117120.10.1F1E85F Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf14.hostedemail.com (Postfix) with ESMTP id 3028FC0007E3 for ; Fri, 14 May 2021 01:34:40 +0000 (UTC) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by linux.microsoft.com (Postfix) with ESMTPSA id 51FC820B8016 for ; Thu, 13 May 2021 18:34:39 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 51FC820B8016 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1620956079; bh=F6CQz2+nsZGJ/pzdpTT9AQzTkNqlEEh7RPiPcleWx28=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=faO6iLDAO28ixLe7L/yD0bTgdHVbHQHH50nT/E3+H29jlY0+SVN74BpEWL4SVttz+ wuvfaSxvKIiZcbfU+jVF8zBSuexAOEpHzli9Ff3FWUP6k0OiPAYdxjursVIaAYLIAs Ni9UufA/1lWZPwE49CKBP3hzHElj5Pw7+EuFbpLg= Received: by mail-pj1-f53.google.com with SMTP id lj11-20020a17090b344bb029015bc3073608so554452pjb.3 for ; Thu, 13 May 2021 18:34:39 -0700 (PDT) X-Gm-Message-State: AOAM533i1B7E/eUyE7Z6e+FfP9rAvGiEHm1BaILBdErzvFbW8B7yybxt 8hnDzJw+4I+21KmVowAXYn9RM6oZOAw7aUi+lnI= X-Google-Smtp-Source: ABdhPJwv/YtlK8W/E0i23QQxf4xSLtEBhJx0WbxP9KKGOfWRVCcDM1mjk/0uCIMlC94A0zbVcQof5us1WWyA5xLHK40= X-Received: by 2002:a17:90a:174e:: with SMTP id 14mr11885116pjm.187.1620956078745; Thu, 13 May 2021 18:34:38 -0700 (PDT) MIME-Version: 1.0 References: <20210513165846.23722-1-mcroce@linux.microsoft.com> <20210513165846.23722-2-mcroce@linux.microsoft.com> In-Reply-To: From: Matteo Croce Date: Fri, 14 May 2021 03:34:02 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v5 1/5] mm: add a signature in struct page To: Matthew Wilcox Cc: netdev@vger.kernel.org, linux-mm@kvack.org, Ayush Sawal , Vinay Kumar Yadav , Rohit Maheshwari , "David S. Miller" , Jakub Kicinski , Thomas Petazzoni , Marcin Wojtas , Russell King , Mirko Lindner , Stephen Hemminger , Tariq Toukan , Jesper Dangaard Brouer , Ilias Apalodimas , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Boris Pismenny , Arnd Bergmann , Andrew Morton , "Peter Zijlstra (Intel)" , Vlastimil Babka , Yu Zhao , Will Deacon , Fenghua Yu , Roman Gushchin , Hugh Dickins , Peter Xu , Jason Gunthorpe , Jonathan Lemon , Alexander Lobakin , Cong Wang , wenxu , Kevin Hao , Jakub Sitnicki , Marco Elver , Willem de Bruijn , Miaohe Lin , Yunsheng Lin , Guillaume Nault , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, bpf@vger.kernel.org, Eric Dumazet , David Ahern , Lorenzo Bianconi , Saeed Mahameed , Andrew Lunn , Paolo Abeni , Sven Auhagen Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 3028FC0007E3 Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=faO6iLDA; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf14.hostedemail.com: domain of mcroce@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=mcroce@linux.microsoft.com X-Rspamd-Server: rspam03 X-Stat-Signature: 1jf6tpgdcp8oyipmatwjk3rpsjwgy7ex X-HE-Tag: 1620956080-305288 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, May 14, 2021 at 3:01 AM Matthew Wilcox 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