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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA95FC433F5 for ; Mon, 7 Mar 2022 09:15:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0E3B48D0002; Mon, 7 Mar 2022 04:15:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0948C8D0001; Mon, 7 Mar 2022 04:15:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EC52A8D0002; Mon, 7 Mar 2022 04:15:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id DD8318D0001 for ; Mon, 7 Mar 2022 04:15:46 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 9710A61BF7 for ; Mon, 7 Mar 2022 09:15:46 +0000 (UTC) X-FDA: 79217032692.03.40B54A1 Received: from outbound-smtp29.blacknight.com (outbound-smtp29.blacknight.com [81.17.249.32]) by imf05.hostedemail.com (Postfix) with ESMTP id E5D42100008 for ; Mon, 7 Mar 2022 09:15:45 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp29.blacknight.com (Postfix) with ESMTPS id 692D918E13B for ; Mon, 7 Mar 2022 09:15:44 +0000 (GMT) Received: (qmail 17169 invoked from network); 7 Mar 2022 09:15:44 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.223]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 7 Mar 2022 09:15:44 -0000 Date: Mon, 7 Mar 2022 09:15:41 +0000 From: Mel Gorman To: Eric Dumazet Cc: Andrew Morton , linux-kernel , linux-mm , Eric Dumazet , Vlastimil Babka , Michal Hocko , Shakeel Butt , Wei Xu , Greg Thelen , Hugh Dickins , David Rientjes Subject: Re: [PATCH v2] mm/page_alloc: call check_new_pages() while zone spinlock is not held Message-ID: <20220307091541.GD15701@techsingularity.net> References: <20220304170215.1868106-1-eric.dumazet@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20220304170215.1868106-1-eric.dumazet@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: E5D42100008 X-Rspam-User: Authentication-Results: imf05.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf05.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.32 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Stat-Signature: fdr75n1op891699yi8wn7649jxt6pc3w X-HE-Tag: 1646644545-623900 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 Fri, Mar 04, 2022 at 09:02:15AM -0800, Eric Dumazet wrote: > From: Eric Dumazet > > For high order pages not using pcp, rmqueue() is currently calling > the costly check_new_pages() while zone spinlock is held, > and hard irqs masked. > > This is not needed, we can release the spinlock sooner to reduce > zone spinlock contention. > > Note that after this patch, we call __mod_zone_freepage_state() > before deciding to leak the page because it is in bad state. > > v2: We need to keep interrupts disabled to call __mod_zone_freepage_state() > > Signed-off-by: Eric Dumazet > Cc: Mel Gorman > Cc: Vlastimil Babka > Cc: Michal Hocko > Cc: Shakeel Butt > Cc: Wei Xu > Cc: Greg Thelen > Cc: Hugh Dickins > Cc: David Rientjes Ok, this is only more expensive in the event pages on the free list have been corrupted whch is already very unlikely so thanks! Acked-by: Mel Gorman -- Mel Gorman SUSE Labs