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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 4582AC47082 for ; Sat, 5 Jun 2021 14:32:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B2E8D6136D for ; Sat, 5 Jun 2021 14:32:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2E8D6136D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D639D6B006C; Sat, 5 Jun 2021 10:32:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D14096B006E; Sat, 5 Jun 2021 10:32:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B8DDD6B0070; Sat, 5 Jun 2021 10:32:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0072.hostedemail.com [216.40.44.72]) by kanga.kvack.org (Postfix) with ESMTP id 894BA6B006C for ; Sat, 5 Jun 2021 10:32:44 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 1979C8249980 for ; Sat, 5 Jun 2021 14:32:44 +0000 (UTC) X-FDA: 78219911448.20.82C7D34 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf04.hostedemail.com (Postfix) with ESMTP id 478F5369 for ; Sat, 5 Jun 2021 14:32:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=6ysSoi5gpx3YeFtFoqCR9odJnpVrSzapVJNhGgAq3Zo=; b=Zh95QZ+oAmIGkHWHQAEFl6vDTO GmvBEgb4eLNge3M/1YZWLQSUlr3gr6cZIATaXD6kJjhc0l9JRxx+XGMlKyGnYHX7XdUbOmZ+0bQxM xnfQFPtWmEkTjgNAOXyn43QONLJt6HaOnASbfUu/UIQTsHNpDR4jaQTOHi+RR3kr8vbfVUmf2ptSh bVmZJOnROEtX7cZlHgNDUk07U9pA40FzDKCXEOXn3pDIHzqz9+9xSTGc0NoHcRLgIrRKh0JHVCOiD idtvZvVVbSllHCR8Mx+3Pdtug5xMAXlRJIJiDHozuLGZZlf4gFMz5ziEFQKnxHZsE8twc0ZRTl1S5 1Itzs3yQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lpXLY-00E9xR-Ev; Sat, 05 Jun 2021 14:32:21 +0000 Date: Sat, 5 Jun 2021 15:32:20 +0100 From: Matthew Wilcox To: Matteo Croce 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 Subject: Re: [PATCH net-next v7 1/5] mm: add a signature in struct page Message-ID: References: <20210604183349.30040-1-mcroce@linux.microsoft.com> <20210604183349.30040-2-mcroce@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Zh95QZ+o; spf=none (imf04.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Stat-Signature: r5nok37385g8hjiijbrrheao9uyxetwg X-Rspamd-Queue-Id: 478F5369 X-Rspamd-Server: rspam06 X-HE-Tag: 1622903562-690500 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 Sat, Jun 05, 2021 at 12:59:50AM +0200, Matteo Croce wrote: > On Fri, Jun 4, 2021 at 9:08 PM Matthew Wilcox wrote: > > > > On Fri, Jun 04, 2021 at 08:33:45PM +0200, Matteo Croce wrote: > > > @@ -130,7 +137,10 @@ struct page { > > > }; > > > }; > > > struct { /* Tail pages of compound page */ > > > - unsigned long compound_head; /* Bit zero is set */ > > > + /* Bit zero is set > > > + * Bit one if pfmemalloc page > > > + */ > > > + unsigned long compound_head; > > > > I would drop this hunk. Bit 1 is not used for this purpose in tail > > pages; it's used for that purpose in head and base pages. > > > > I suppose we could do something like ... > > > > static inline void set_page_pfmemalloc(struct page *page) > > { > > - page->index = -1UL; > > + page->lru.next = (void *)2; > > } > > > > if it's causing confusion. > > > > If you prefer, ok for me. > Why not "(void *)BIT(1)"? Just to remark that it's a single bit and > not a magic like value? I don't have a strong preference. I'd use '2', but I wouldn't ask BIT(1) to be changed.