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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05374C433F5 for ; Thu, 26 May 2022 10:14:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 62E0B8D0003; Thu, 26 May 2022 06:14:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5D9508D0001; Thu, 26 May 2022 06:14:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4ED8D8D0003; Thu, 26 May 2022 06:14:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 4000D8D0001 for ; Thu, 26 May 2022 06:14:54 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 10FEE60592 for ; Thu, 26 May 2022 10:14:54 +0000 (UTC) X-FDA: 79507485708.15.4989870 Received: from outbound-smtp24.blacknight.com (outbound-smtp24.blacknight.com [81.17.249.192]) by imf31.hostedemail.com (Postfix) with ESMTP id B459320013 for ; Thu, 26 May 2022 10:14:17 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp24.blacknight.com (Postfix) with ESMTPS id 1DB93C0D2D for ; Thu, 26 May 2022 11:14:52 +0100 (IST) Received: (qmail 9319 invoked from network); 26 May 2022 10:14:51 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.198.246]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 26 May 2022 10:14:51 -0000 Date: Thu, 26 May 2022 11:14:50 +0100 From: Mel Gorman To: Muchun Song 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: <20220526101450.GE3441@techsingularity.net> References: <20220509130805.20335-1-mgorman@techsingularity.net> <20220509130805.20335-2-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspam-User: X-Rspamd-Queue-Id: B459320013 X-Stat-Signature: g9hzs3f5tqar6a1pqfh3g7ooah39hecp Authentication-Results: imf31.hostedemail.com; dkim=none; spf=pass (imf31.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.192 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none X-Rspamd-Server: rspam03 X-HE-Tag: 1653560057-896191 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 13, 2022 at 04:41:20PM +0800, Muchun Song wrote: > > @@ -94,6 +95,10 @@ struct page { > > /* Count page's or folio's mlocks */ > > unsigned int mlock_count; > > }; > > + > > + /* Or, free page */ > > + struct list_head buddy_list; > > + struct list_head pcp_list; > > }; > > Since you have clarified "lru" member, should we go further? > Like union "index" to "pcp_migratetype" and "private" to "order" > since buddy allocator reuses "index" and "private" as well. > My initial idea is as follows, it is more clear for me, what > do you think? > I think it would be more appropriate to split it out as a separate type as suggested by Matthew Wilcox. While I would not be opposed to your approach as such, it's outside the context of the series which is modifying how PCP works. -- Mel Gorman SUSE Labs