Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1768547pxp; Mon, 7 Mar 2022 01:51:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwdaKOuRWfEQAFhcES9dkUoBLPaNrthS0CCiQo8719BABEy9XLdmLS7hNUYo7AGfzIPKG2a X-Received: by 2002:a05:6402:50d2:b0:413:1cd8:e08e with SMTP id h18-20020a05640250d200b004131cd8e08emr10298255edb.276.1646646709844; Mon, 07 Mar 2022 01:51:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646646709; cv=none; d=google.com; s=arc-20160816; b=fq+9GBis9VK3YV+rn8VFeH3iacinUBqgKBdQuwhfQQTQ7Bbjq0Jn3ikhA3Miwut3hN Y/xywCpuJAlREnrbNDS6jNto7M0OYy1uvuf57AFMHafbcTpN1B+uGVzlHAzVr7l9lwYp ofnN/JTD6UOY/rrh0YyRZCqzYciw/t4hgeqNinNpTkmFc8EMbIQ3FU9zvZGidEm6Mn3l 8baL8GMl4GmLNbVyx2YLmxomy74P0BtU6IfBgkosxikty/As48OeChkB3HGX2HEi29PI IhfvaHNoXfV30Qeil8AxczCcQ3ReAddOrllqak2ZvuPbEvDwBnxZj99FuZdyhGE4+YDr XZ8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=wwLLCcobo3xPxFHFvf4ODWAVzboiXpKvHPms5oKEeXU=; b=q6mgsXcGMcZqs1oz9acpRqo2QNbj2lfEKXhEvxLxvN+cxj8A1wey67QRquwFcgdyj5 tuAB1cqPasHg1j8CQtMYbt5LnfqK/5vuHg+lT5LDZoYqMAtKod2xoMIKdfDr29WfCla0 6K1t7rqqB+y6FGEwPzGe3U8qZ+PPcoVy1LFscNJWoiOlTi38hmUgNoPEZWHltXUXrmhH A9DYi3EpzsqZpX8yN91DYJT4ZkoocHksICojfzELm1qY+PPrCFhRiCR/Zvd/x0XfhKpe oqDscnSfqiBJshWk6FkzTC924cv5QZM9aQnZjpp7k+mnZsKyo1UYwa6KXcsDi7Zaf3oF IFKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o16-20020a170906975000b006db098cc327si3584485ejy.49.2022.03.07.01.51.27; Mon, 07 Mar 2022 01:51:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236290AbiCGJQm (ORCPT + 99 others); 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) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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