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 90F79C677F1 for ; Thu, 19 Jan 2023 01:20:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230029AbjASBUY (ORCPT ); Wed, 18 Jan 2023 20:20:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbjASBS6 (ORCPT ); Wed, 18 Jan 2023 20:18:58 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5CCB6C573 for ; Wed, 18 Jan 2023 17:16:07 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 617E4618FE for ; Thu, 19 Jan 2023 01:16:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6126C433D2; Thu, 19 Jan 2023 01:16:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1674090966; bh=a9felRwJe6rRGZmmXxEeeyVlbLplXJf5Wh8+Dnj8+2o=; h=Date:To:From:Subject:From; b=WLxug9Dvj1aflzxAwrKolqH5v2G9g2cu8llU9aOWP6lMoKkbip0qBqr0I9eZl5liR U2HYIHHP0ukiRJRNpcJ1ucD5mrw2JxYuA/6OApsfbqrVaEcoMrOXeS5hyiunrv0Njz Ki7A/ZSLs4VVsy+n/krsVrZYv+8zmkxZU8zVIdIo= Date: Wed, 18 Jan 2023 17:16:06 -0800 To: mm-commits@vger.kernel.org, mgorman@suse.de, david@redhat.com, anshuman.khandual@arm.com, rppt@kernel.org, akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-stable] mm-page_alloc-invert-logic-for-early-page-initialisation-checks.patch removed from -mm tree Message-Id: <20230119011606.B6126C433D2@smtp.kernel.org> Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The quilt patch titled Subject: mm/page_alloc: invert logic for early page initialisation checks has been removed from the -mm tree. Its filename was mm-page_alloc-invert-logic-for-early-page-initialisation-checks.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: "Mike Rapoport (IBM)" Subject: mm/page_alloc: invert logic for early page initialisation checks Date: Wed, 4 Jan 2023 21:18:05 +0200 Rename early_page_uninitialised() to early_page_initialised() and invert its logic to make the code more readable. Link: https://lkml.kernel.org/r/20230104191805.2535864-1-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Reviewed-by: Anshuman Khandual Acked-by: Mel Gorman Signed-off-by: Andrew Morton --- mm/page_alloc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- a/mm/page_alloc.c~mm-page_alloc-invert-logic-for-early-page-initialisation-checks +++ a/mm/page_alloc.c @@ -443,15 +443,15 @@ static inline bool deferred_pages_enable return static_branch_unlikely(&deferred_pages); } -/* Returns true if the struct page for the pfn is uninitialised */ -static inline bool __meminit early_page_uninitialised(unsigned long pfn) +/* Returns true if the struct page for the pfn is initialised */ +static inline bool __meminit early_page_initialised(unsigned long pfn) { int nid = early_pfn_to_nid(pfn); if (node_online(nid) && pfn >= NODE_DATA(nid)->first_deferred_pfn) - return true; + return false; - return false; + return true; } /* @@ -498,9 +498,9 @@ static inline bool deferred_pages_enable return false; } -static inline bool early_page_uninitialised(unsigned long pfn) +static inline bool early_page_initialised(unsigned long pfn) { - return false; + return true; } static inline bool defer_init(int nid, unsigned long pfn, unsigned long end_pfn) @@ -1643,7 +1643,7 @@ static void __meminit init_reserved_page pg_data_t *pgdat; int nid, zid; - if (!early_page_uninitialised(pfn)) + if (early_page_initialised(pfn)) return; nid = early_pfn_to_nid(pfn); @@ -1806,7 +1806,7 @@ int __meminit early_pfn_to_nid(unsigned void __init memblock_free_pages(struct page *page, unsigned long pfn, unsigned int order) { - if (early_page_uninitialised(pfn)) + if (!early_page_initialised(pfn)) return; if (!kmsan_memblock_free_pages(page, order)) { /* KMSAN will take care of these pages. */ _ Patches currently in -mm which might be from rppt@kernel.org are