Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp502587pxb; Thu, 21 Apr 2022 04:34:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPon9khJJrLn32WHJJVF4KQPLohK1iIGWaYka6GUlT8OgaVf9rf/jvTY5GNEv1OEhqK2jb X-Received: by 2002:a17:907:72c7:b0:6ef:b713:15c7 with SMTP id du7-20020a17090772c700b006efb71315c7mr16686900ejc.320.1650540888777; Thu, 21 Apr 2022 04:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650540888; cv=none; d=google.com; s=arc-20160816; b=nj/vLHMauks3axynB7bQ0q0KS+fvrOLaeK0+kW6YSSGgl4V+g+Cah9JCjg0gCn52YS EEQ4XK0ULCunfGS/C6JtRf/S3wNDbvpMWCV8XRdLRXzPo+3YxgT42kpeYMGjOhegpoh1 zaWgonQCc4mqhidJc8Kvr59Lc+hcilnvsasZDK7cRIxvJRswlh4GSHhCuiLvU33m7+F4 4UO/r4jAQPyoXGojsWuDcSf5FaZSbDJHtUxL9nsHslPobFrCYqlnNuLjzgLyZwX/yhYs GPAcSXAOUebR8EvNhKk2eKFO4/8r2EM/ysm2hNveE+G+Nlu6OGBXrbWdUVGmQBFVUZ72 EmXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sc6vMSh29FXFMOxHdh8/k5TpOxZ+/Ckh32u1TBe7ffY=; b=0C2a+f9xj65KEbmxUPs99uOEAxuYU0neNI1KRajQNkX5twSdBoDfmELbCFBzMfgi7l W8R0OWO5x8/2WU21klpUwneNk8kq3Zj//42SI9pTKIpWvCOiFVr/x5SZjNGyUe7XPsei 7ISX00wmL5uRBrJd0STaHcbtAg49HG9buDAHVEXSQe5FZRkJw18d1a9MMmxs93Xmo3Ns V2py3pc00KYvGO1fcCNZO2VvrJfUHUOfMmfamrxzXA9zZHpp09WnUKdplxOk3QZvm5aS 17bl0qs1VUTMdIwxaz8VehSX8aCAKaQWTgqpaLucsc/Klhsyqhb6jZNPpXN21ivq5VoS YCTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uVaWmWox; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f2-20020a1709062c4200b006efee27f9dbsi3798041ejh.335.2022.04.21.04.34.22; Thu, 21 Apr 2022 04:34:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uVaWmWox; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376712AbiDTUqF (ORCPT + 99 others); Wed, 20 Apr 2022 16:46:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232987AbiDTUqE (ORCPT ); Wed, 20 Apr 2022 16:46:04 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9BD134B84 for ; Wed, 20 Apr 2022 13:43:14 -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=sc6vMSh29FXFMOxHdh8/k5TpOxZ+/Ckh32u1TBe7ffY=; b=uVaWmWoxPOVjgn/PAs+FuiZZ3Y jthciLPP8g1gBgzFSoW8ORucEXldJYp5fXeGkqj04+Cl6Y/oFsf8iXHVqK7U9zrsYOGjcpuHr/O1h XhYFQ+ZphcoObyohah3E6WimoJWzuvn4H6N2Kgb6Oax331yePFQUGFGFuladE+IC6S6xdmu4NnmZO Jzka/tzLRlykNOjTLc6VMY/XknG3VlVJOKQvRMSZeon6i3zEVa0IElUN5rRjCVKj17YMVm6gF9NdZ gmE2wjAJQr/LIGGnJ+GwSaQfqZBfjv/dT3HyPoofpjxgLFVUquVXDH6imv3mIFiz4sjpnrf3bwot6 xbyNPm3A==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhHAH-004R5x-Id; Wed, 20 Apr 2022 20:43:05 +0000 Date: Wed, 20 Apr 2022 21:43:05 +0100 From: Matthew Wilcox To: Mel Gorman Cc: Nicolas Saenz Julienne , Marcelo Tosatti , Vlastimil Babka , Michal Hocko , LKML , Linux-MM Subject: Re: [PATCH 1/6] mm/page_alloc: Add page->buddy_list and page->pcp_list Message-ID: References: <20220420095906.27349-1-mgorman@techsingularity.net> <20220420095906.27349-2-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220420095906.27349-2-mgorman@techsingularity.net> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 20, 2022 at 10:59:01AM +0100, Mel Gorman wrote: > The page allocator uses page->lru for storing pages on either buddy or > PCP lists. Create page->buddy_list and page->pcp_list as a union with > page->lru. This is simply to clarify what type of list a page is on > in the page allocator. Hi Mel, No objection to this change, and I certainly don't want to hold up fixing this (or any other) problem in the page allocator. I would like to talk about splitting out free page management from struct page. Maybe you'd like to discuss that in person at LSFMM, but a quick sketch of a data structure might look like ... struct free_mem { unsigned long __page_flags; union { struct list_head buddy_list; struct list_head pcp_list; }; unsigned long __rsvd4; unsigned long pcp_migratetype_and_order; unsigned long buddy_order; unsigned int __page_type; atomic_t _refcount; }; Am I missing anything there? (Would you like to use separate types for pcp and buddy? That might be overkill, or it might help keep the different stages of "free" memory separate from each other)