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 84C82CCA473 for ; Fri, 24 Jun 2022 19:08:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229725AbiFXTIS (ORCPT ); Fri, 24 Jun 2022 15:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229755AbiFXTIQ (ORCPT ); Fri, 24 Jun 2022 15:08:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ACE43615C for ; Fri, 24 Jun 2022 12:08:16 -0700 (PDT) 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 96FCA62163 for ; Fri, 24 Jun 2022 19:08:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB9D9C34114; Fri, 24 Jun 2022 19:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1656097695; bh=boFAzJuoJE7lytyrzSOZ5ETxj5f9U+hWNw0t2fEXVgI=; h=Date:To:From:Subject:From; b=iTrbU1cp9tGCWHv4OsQAhNIP7MiIzyTAc5T99kaCZpRhBRRJ5xWtHI9+1rCJIIzr7 2f/3PJ065wz58jgMojdaC8ndLbWpuT9R5LQxNPmjJlyNeBTdQlMQ4oiMx3M5c4acix ZElHpfJ8bHoBjCyN6UfxetneF5baWqrFs4Wg0jjc= Date: Fri, 24 Jun 2022 12:08:14 -0700 To: mm-commits@vger.kernel.org, yuzhao@google.com, vbabka@suse.cz, nsaenzju@redhat.com, mtosatti@redhat.com, m.szyprowski@samsung.com, minchan@kernel.org, mhocko@kernel.org, hughd@google.com, mgorman@techsingularity.net, akpm@linux-foundation.org From: Andrew Morton Subject: + mm-page_alloc-remove-mistaken-page-==-null-check-in-rmqueue.patch added to mm-unstable branch Message-Id: <20220624190814.EB9D9C34114@smtp.kernel.org> Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The patch titled Subject: mm/page_alloc: remove mistaken page == NULL check in rmqueue has been added to the -mm mm-unstable branch. Its filename is mm-page_alloc-remove-mistaken-page-==-null-check-in-rmqueue.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-page_alloc-remove-mistaken-page-==-null-check-in-rmqueue.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Mel Gorman Subject: mm/page_alloc: remove mistaken page == NULL check in rmqueue Date: Fri, 24 Jun 2022 13:54:20 +0100 If a page allocation fails, the ZONE_BOOSTER_WATERMARK should be tested, cleared and kswapd woken whether the allocation attempt was via the PCP or directly via the buddy list. Remove the page == NULL so the ZONE_BOOSTED_WATERMARK bit is checked unconditionally. As it is unlikely that ZONE_BOOSTED_WATERMARK is set, mark the branch accordingly. Link: https://lkml.kernel.org/r/20220624125423.6126-5-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Hugh Dickins Cc: Marcelo Tosatti Cc: Marek Szyprowski Cc: Michal Hocko Cc: Minchan Kim Cc: Nicolas Saenz Julienne Cc: Yu Zhao Signed-off-by: Andrew Morton --- mm/page_alloc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/mm/page_alloc.c~mm-page_alloc-remove-mistaken-page-==-null-check-in-rmqueue +++ a/mm/page_alloc.c @@ -3781,12 +3781,10 @@ struct page *rmqueue(struct zone *prefer page = rmqueue_buddy(preferred_zone, zone, order, alloc_flags, migratetype); - if (unlikely(!page)) - return NULL; out: /* Separate test+clear to avoid unnecessary atomics */ - if (test_bit(ZONE_BOOSTED_WATERMARK, &zone->flags)) { + if (unlikely(test_bit(ZONE_BOOSTED_WATERMARK, &zone->flags))) { clear_bit(ZONE_BOOSTED_WATERMARK, &zone->flags); wakeup_kswapd(zone, 0, 0, zone_idx(zone)); } _ Patches currently in -mm which might be from mgorman@techsingularity.net are mm-page_alloc-add-page-buddy_list-and-page-pcp_list.patch mm-page_alloc-use-only-one-pcp-list-for-thp-sized-allocations.patch mm-page_alloc-split-out-buddy-removal-code-from-rmqueue-into-separate-helper.patch mm-page_alloc-remove-mistaken-page-==-null-check-in-rmqueue.patch mm-page_alloc-protect-pcp-lists-with-a-spinlock.patch mm-page_alloc-replace-local_lock-with-normal-spinlock.patch