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=-10.8 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 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 32F45C47094 for ; Mon, 7 Jun 2021 13:53:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 137FF61153 for ; Mon, 7 Jun 2021 13:53:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230209AbhFGNyy (ORCPT ); Mon, 7 Jun 2021 09:54:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230193AbhFGNyx (ORCPT ); Mon, 7 Jun 2021 09:54:53 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 684E1C061766; Mon, 7 Jun 2021 06:53:02 -0700 (PDT) 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=UxlTIzPnHvNXvpvNY8WXGYTkZQTDM1BOIfqbe2VK5Js=; b=CetJfXmyZyFXZxc0ZDB2x+X1sn BndDqR/iA2xddJOq735dsFYR6NNIW4H0oZtDRH3Lvl65DkNtV48y2wYQJxi00epZy1226mMZqo9+8 uTuSnoaPfw/xJxIA+t6dKmij2+saw0Z85Fkr6z7cpchvBSenrOhKDTuuEdahF+h7C/Y0T7DM3KvU5 piiz78iI7X5BnRk74yOD51w4gIb6aBSfiDmsriaMGUYvwsp4cUQvZiw2Kiz9j5lQ0ENS2QGB+xq7q 2tNboIvbRKReTQHf5DeLpsFLpHKAvQx97M6YLSCEZbr8rCv8yE1nh9lkAQZPDGqlnTmweOrHE13Fy /L/uNugw==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lqFgE-00FrLN-9D; Mon, 07 Jun 2021 13:52:40 +0000 Date: Mon, 7 Jun 2021 14:52:38 +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: Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Sun, Jun 06, 2021 at 03:50:54AM +0200, Matteo Croce wrote: > And change all the *_pfmemalloc functions to use page->lru.next like this? > > @@ -1668,10 +1668,12 @@ struct address_space *page_mapping(struct page *page); > static inline bool page_is_pfmemalloc(const struct page *page) > { > /* > - * Page index cannot be this large so this must be > - * a pfmemalloc page. > + * This is not a tail page; compound_head of a head page is unused > + * at return from the page allocator, and will be overwritten > + * by callers who do not care whether the page came from the > + * reserves. > */ The comment doesn't make a lot of sense if we're switching to use lru.next. How about: /* * lru.next has bit 1 set if the page is allocated from the * pfmemalloc reserves. Callers may simply overwrite it if * they do not need to preserve that information. */