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 9BD2CC433F5 for ; Mon, 7 Mar 2022 09:15:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236293AbiCGJQm (ORCPT ); Mon, 7 Mar 2022 04:16:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233442AbiCGJQl (ORCPT ); Mon, 7 Mar 2022 04:16:41 -0500 Received: from outbound-smtp40.blacknight.com (outbound-smtp40.blacknight.com [46.22.139.223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F13D765158 for ; Mon, 7 Mar 2022 01:15:45 -0800 (PST) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp40.blacknight.com (Postfix) with ESMTPS id 6A1291C4C58 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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