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 X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22C81C43460 for ; Thu, 15 Apr 2021 14:11:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 613F0611F1 for ; Thu, 15 Apr 2021 14:11:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 613F0611F1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C3B8A6B0036; Thu, 15 Apr 2021 10:11:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BC1A06B006C; Thu, 15 Apr 2021 10:11:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3BA46B0070; Thu, 15 Apr 2021 10:11:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0153.hostedemail.com [216.40.44.153]) by kanga.kvack.org (Postfix) with ESMTP id 84C746B0036 for ; Thu, 15 Apr 2021 10:11:11 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3F7FA181B2E3D for ; Thu, 15 Apr 2021 14:11:11 +0000 (UTC) X-FDA: 78034788342.02.A67EA00 Received: from outbound-smtp33.blacknight.com (outbound-smtp33.blacknight.com [81.17.249.66]) by imf26.hostedemail.com (Postfix) with ESMTP id B480840002C8 for ; Thu, 15 Apr 2021 14:11:05 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp33.blacknight.com (Postfix) with ESMTPS id D2CF5BAD3E for ; Thu, 15 Apr 2021 15:11:08 +0100 (IST) Received: (qmail 27982 invoked from network); 15 Apr 2021 14:11:08 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 15 Apr 2021 14:11:08 -0000 Date: Thu, 15 Apr 2021 15:11:06 +0100 From: Mel Gorman To: Vlastimil Babka Cc: Linux-MM , Linux-RT-Users , LKML , Chuck Lever , Jesper Dangaard Brouer , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Michal Hocko Subject: Re: [PATCH 09/11] mm/page_alloc: Avoid conflating IRQs disabled with zone->lock Message-ID: <20210415141106.GK3697@techsingularity.net> References: <20210414133931.4555-1-mgorman@techsingularity.net> <20210414133931.4555-10-mgorman@techsingularity.net> <838c6734-1e5d-6a26-8c88-90e89d407482@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <838c6734-1e5d-6a26-8c88-90e89d407482@suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: B480840002C8 X-Stat-Signature: ed9zo6wzz65ibjgqfrrfn7z4f5i7dxxw X-Rspamd-Server: rspam02 Received-SPF: none (techsingularity.net>: No applicable sender policy available) receiver=imf26; identity=mailfrom; envelope-from=""; helo=outbound-smtp33.blacknight.com; client-ip=81.17.249.66 X-HE-DKIM-Result: none/none X-HE-Tag: 1618495865-798826 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 Thu, Apr 15, 2021 at 02:25:36PM +0200, Vlastimil Babka wrote: > > @@ -3294,6 +3295,7 @@ void free_unref_page_list(struct list_head *list) > > struct page *page, *next; > > unsigned long flags, pfn; > > int batch_count = 0; > > + int migratetype; > > > > /* Prepare pages for freeing */ > > list_for_each_entry_safe(page, next, list, lru) { > > @@ -3301,15 +3303,28 @@ void free_unref_page_list(struct list_head *list) > > if (!free_unref_page_prepare(page, pfn)) > > list_del(&page->lru); > > set_page_private(page, pfn); > > Should probably move this below so we don't set private for pages that then go > through free_one_page()? Doesn't seem to be a bug, just unneccessary. > Sure. diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 1d87ca364680..a9c1282d9c7b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3293,7 +3293,6 @@ void free_unref_page_list(struct list_head *list) pfn = page_to_pfn(page); if (!free_unref_page_prepare(page, pfn)) list_del(&page->lru); - set_page_private(page, pfn); /* * Free isolated pages directly to the allocator, see @@ -3307,6 +3306,8 @@ void free_unref_page_list(struct list_head *list) list_del(&page->lru); } } + + set_page_private(page, pfn); } local_lock_irqsave(&pagesets.lock, flags); -- Mel Gorman SUSE Labs