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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9E38EE49A6 for ; Mon, 21 Aug 2023 12:21:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234839AbjHUMV3 (ORCPT ); Mon, 21 Aug 2023 08:21:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234251AbjHUMV2 (ORCPT ); Mon, 21 Aug 2023 08:21:28 -0400 Received: from outbound-smtp23.blacknight.com (outbound-smtp23.blacknight.com [81.17.249.191]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C926CF for ; Mon, 21 Aug 2023 05:21:26 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp23.blacknight.com (Postfix) with ESMTPS id 98A5EBEFD9 for ; Mon, 21 Aug 2023 13:21:24 +0100 (IST) Received: (qmail 31679 invoked from network); 21 Aug 2023 12:21:24 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.20.191]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 21 Aug 2023 12:21:24 -0000 Date: Mon, 21 Aug 2023 13:21:02 +0100 From: Mel Gorman To: Kemeng Shi Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, baolin.wang@linux.alibaba.com, david@redhat.com, willy@infradead.org Subject: Re: [PATCH 2/2] mm/page_alloc: use get_pfnblock_migratetype to avoid extra page_to_pfn Message-ID: <20230821122102.uybh63ifycgmqm3a@techsingularity.net> References: <20230811115945.3423894-1-shikemeng@huaweicloud.com> <20230811115945.3423894-3-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20230811115945.3423894-3-shikemeng@huaweicloud.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 11, 2023 at 07:59:45PM +0800, Kemeng Shi wrote: > We have get_pageblock_migratetype and get_pfnblock_migratetype to get > migratetype of page. get_pfnblock_migratetype accepts both page and pfn > from caller while get_pageblock_migratetype only accept page and get pfn > with page_to_pfn from page. > In case we already record pfn of page, we can simply call > get_pfnblock_migratetype to avoid a page_to_pfn. > > Signed-off-by: Kemeng Shi Acked-by: Mel Gorman -- Mel Gorman SUSE Labs