Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp183578pxj; Thu, 3 Jun 2021 04:13:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWf4Z+G4pO8Df1j1s5ABXq3Yfxd3OnQzGrG4nxZ5fLpl9dkboQ4Bg/2cZepFBN52cVenif X-Received: by 2002:a17:906:b352:: with SMTP id cd18mr786552ejb.222.1622718835814; Thu, 03 Jun 2021 04:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622718835; cv=none; d=google.com; s=arc-20160816; b=vyGSpmxCIjfdXPjg4n6Nn7nVkIK8v7IdVUDFH6IDmjQHuQlf+MhFHyNCMgzE9Pm3FQ 7n/cgnH0Qm9Advtnknv+GaZDvYPwlvhnVhtSBR1z68+heCkwc3K96C3hb57TStGmBvqu PVt9etDnyELXNOI/5/5+aNawVAhVT54aeCWgycmA1h4KbIeYta0ApFI/p49kfVMAD/oE ev6QLYyGcf0ncoaGsKbE6h7h7gZsZZjWt2n9Sq3CPp41j8ipRd4HuMZnjlpbI5/2X5Zv KpWLvKCnOtMmHvbMl/G+T7HNGBlJ0DvhCA2IZ2zPLX8zNP7UN3ZjFAkDZYQtDtjN4d3m Uvsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=+Tg4eGxOYRMP7AnDXTIBqH4B03Wi9EvZGTT7BGEojbM=; b=DlWH9i6kXeuiNn4iDhiTF7qY2A6U3u4o/9aNEVpwC+0VdY39TchZUPkrCwsVE2b1Od 1/3UJZqn1nB2J32SF9TCWSKV1KeeD45EReAJ4cEfQmYs1V7UnLBebTcosdJoH3gRREwk 6B3WcidkvyaYb/KupFofhMYbBYuplbd0TNq1M2/UjGxlWmCrGmHSYElQm4t9U37Xt5kr 1ha+Bkq79SyJhqUgR+kuHB8O66biIhK7paX9QkC/rmnKog8IW+zhXJQ/e4IJxUv1oh6C a0P6BqZYHjGojhZf9rUvHzaiN3+9YIqdqzYUQde0Y+/4TMNH8dm+O5pxdutg6wX01B7R c/8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=JSHEoOkM; dkim=neutral (no key) header.i=@suse.cz header.b=Qo2a+bEh; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=JSHEoOkM; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=Qo2a+bEh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mp6si1522422ejc.146.2021.06.03.04.13.32; Thu, 03 Jun 2021 04:13:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=JSHEoOkM; dkim=neutral (no key) header.i=@suse.cz header.b=Qo2a+bEh; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=JSHEoOkM; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=Qo2a+bEh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229892AbhFCLOM (ORCPT + 99 others); Thu, 3 Jun 2021 07:14:12 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:45354 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229885AbhFCLOL (ORCPT ); Thu, 3 Jun 2021 07:14:11 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8B9441FD4D; Thu, 3 Jun 2021 11:12:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1622718746; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Tg4eGxOYRMP7AnDXTIBqH4B03Wi9EvZGTT7BGEojbM=; b=JSHEoOkMX5hlsMiXdOMTr2MYMDFJVtoJBg+yrKiJrLxn7lNT2yXi0buxweriMDuYJG3Icq kQ3AsTXJRoGiwhtB6H1vRluTALn1/vtMxqhApGW3wwFPuSf26eGfIPOyCmHmDzU0hqVuhN jS4aTod+9jlFYIFFh1QWnyGdMCDgz8E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1622718746; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Tg4eGxOYRMP7AnDXTIBqH4B03Wi9EvZGTT7BGEojbM=; b=Qo2a+bEhRUMhMnZKIVV4eFd4zGVPhc/N/gVn178l5vRWIvU1+JCYhZdi8SwwDJalS808hv guofDRMZeGY0vZCg== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 64CEF118DD; Thu, 3 Jun 2021 11:12:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1622718746; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Tg4eGxOYRMP7AnDXTIBqH4B03Wi9EvZGTT7BGEojbM=; b=JSHEoOkMX5hlsMiXdOMTr2MYMDFJVtoJBg+yrKiJrLxn7lNT2yXi0buxweriMDuYJG3Icq kQ3AsTXJRoGiwhtB6H1vRluTALn1/vtMxqhApGW3wwFPuSf26eGfIPOyCmHmDzU0hqVuhN jS4aTod+9jlFYIFFh1QWnyGdMCDgz8E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1622718746; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Tg4eGxOYRMP7AnDXTIBqH4B03Wi9EvZGTT7BGEojbM=; b=Qo2a+bEhRUMhMnZKIVV4eFd4zGVPhc/N/gVn178l5vRWIvU1+JCYhZdi8SwwDJalS808hv guofDRMZeGY0vZCg== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id 4oIbGBq5uGCecwAALh3uQQ (envelope-from ); Thu, 03 Jun 2021 11:12:26 +0000 Subject: Re: [PATCH 1/2] mm/page_alloc: Move free_the_page To: Mel Gorman , Andrew Morton Cc: Dave Hansen , Michal Hocko , Jesper Dangaard Brouer , LKML , Linux-MM References: <20210603084621.24109-1-mgorman@techsingularity.net> <20210603084621.24109-2-mgorman@techsingularity.net> From: Vlastimil Babka Message-ID: <2ba608e9-f5b1-9f78-4734-17b5adb1256a@suse.cz> Date: Thu, 3 Jun 2021 13:12:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210603084621.24109-2-mgorman@techsingularity.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/3/21 10:46 AM, Mel Gorman wrote: > In the next page, free_compount_page is going to use the common helper > free_the_page. This patch moves the definition to ease review. No > functional change. > > Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka > --- > mm/page_alloc.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 4c468aa596aa..99ddac0ffece 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -687,6 +687,14 @@ static void bad_page(struct page *page, const char *reason) > add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE); > } > > +static inline void free_the_page(struct page *page, unsigned int order) > +{ > + if (order == 0) /* Via pcp? */ > + free_unref_page(page); > + else > + __free_pages_ok(page, order, FPI_NONE); > +} > + > /* > * Higher-order pages are called "compound pages". They are structured thusly: > * > @@ -5345,14 +5353,6 @@ unsigned long get_zeroed_page(gfp_t gfp_mask) > } > EXPORT_SYMBOL(get_zeroed_page); > > -static inline void free_the_page(struct page *page, unsigned int order) > -{ > - if (order == 0) /* Via pcp? */ > - free_unref_page(page); > - else > - __free_pages_ok(page, order, FPI_NONE); > -} > - > /** > * __free_pages - Free pages allocated with alloc_pages(). > * @page: The page pointer returned from alloc_pages(). >