Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2276501pxm; Fri, 4 Mar 2022 12:56:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/6a/5t6NNq87kbWf0Jrum+nbAPmE4PqIHIJDz4VpSSk1YjcUeYv5LpCG9fpDay3EQBXK0 X-Received: by 2002:a17:902:aa8d:b0:150:c60:29a4 with SMTP id d13-20020a170902aa8d00b001500c6029a4mr432143plr.40.1646427366898; Fri, 04 Mar 2022 12:56:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646427366; cv=none; d=google.com; s=arc-20160816; b=M2ejcyShCShjip++qJ6malUjkOOlvvsUMWWEhCXh3VQI0UvBxOeypLS/Si9KxLxz5Z t0m3RXEbA4zR/a+6jEEdHEEwbKo49Ljd0Pdoo/zp082Io5ziUh1PjlC4UZD9WN0D/TNU WSaSDgfJqwOL9Sj7rK2bQK9i7yiEAb/GmZK9+dPKiIVMzM6O3rTcol6xCtsHwNa8pDMT JzAE6J3+/0Njt0btGJY9SCAOcDYb8I0jze00XIHtzvEIu+eyLdVLsvXEt7oVrSh32xCl Q01XMJbkry9heQYYTzW2JhoTH8gmJ6bOJZxot62ntFB3Ssz/e3IEFY8T0RzK0UZQGf6+ FCgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=UDWcKffKui4XwCKVJHIK+JVgQsKzY1Vbou/8cX6kuGw=; b=R36oubx1vFcbXgaUvW91g/qWjcdrt9BgpGxpO+KstZFHOLPJfsK6xCgsVKEmDe+h80 oPlW3HbxOz+q1YS0I2Mx/T5Is/x3R2/Jkm2wuHZcXaYMoHUZ+PSwI2yQmwzenTuUd9Wq VR1WwsJHg+yIQI04kP9WgxcfXm67dMMlr2lZ6er7wy1Hj0ji/zM3p836QcQi1lbMgTMg e/iMeVPYLNh/+MouURkEkTMGDaqGO/JE0EuAJcfwnoVagpOX4jjbdebCUOOqhcUS3R7C FhNQTQQadJ4WMr9e3gWbgCjI4dLi1Al+J0DskWlADcx0afNpdTcIivieE18iVYb8ZjKf qI6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=CskeBnwY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f17-20020a170902ce9100b0014ce46a4bd1si5636195plg.485.2022.03.04.12.56.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 12:56:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=CskeBnwY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7051C265B68; Fri, 4 Mar 2022 11:50:21 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229640AbiCDTUf (ORCPT + 99 others); Fri, 4 Mar 2022 14:20:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbiCDTU3 (ORCPT ); Fri, 4 Mar 2022 14:20:29 -0500 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C48E182BDF for ; Fri, 4 Mar 2022 11:19:34 -0800 (PST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-2dbf4238d6bso79121767b3.2 for ; Fri, 04 Mar 2022 11:19:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=UDWcKffKui4XwCKVJHIK+JVgQsKzY1Vbou/8cX6kuGw=; b=CskeBnwYi8AGR1jJSShOOv9vPjSw3nXsL0l5QH7mRd/t83w9MJWkOfeGH4iQoL479x pfbd0WWZGZOZSIbK25Gku4N12pDwSd3DXSCGHW0PP8QpWJVpFwfevzo125a4NXBCy2Im 2YcgpvdiAsCDYE7UJJKc6Blc4scDwLzh7DWXz5L/b9aja3S44fW/cdVRODkAai3QV1Or 5GkTgUWg+DFo7OTIRBHrZByAz/iA2yzQpRtM7kPZV37u1LllMhDZpQtI/cuajuNfPqds n4ctvCA5ojacfhEsygQyyY1Uu56hqvg1sMSi2uxGp83PVmcd1ixA6N8iak3UM5Z4dT8C my+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=UDWcKffKui4XwCKVJHIK+JVgQsKzY1Vbou/8cX6kuGw=; b=fQjg2+l2r8Ns+xybYGafGuCA22TiHVNgZLFarwa3Jqt1fhLVckB5y9NolcJ81QHEqi rWs4SlKgMk4bYuTSYUjlLdxnL2A0J1r5BAmmRJzlTQtrKFLlXWL+QHZYEzXV07ouHWNA 2/w1KSR2+zYd9p9/jx0+uLT4JiNeqIj7scQUMGaljOC53ZpOlDl9YhSkqbDivZUWfpn1 vk1Cl2XSUHJdHru4aERnpsbOqKUIijfw6vu424lUj3U4f057vuP0odfJdvsChf7TSFwO 0RUVHAWV0d1xWH20O0GZHaR4NUF9ssW7fGHlyoongf37kOSPfu4xt3nY00ElUcqFqqUK Y98A== X-Gm-Message-State: AOAM531NRDGZ51rDK2S7kdmGj2sNMNXsVfzEUjNzQwTV3NHquxWTgTxx +AERnMezVXvjnvguM6yjBzqlo/sZfBGtMw== X-Received: from shakeelb.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:28b]) (user=shakeelb job=sendgmr) by 2002:a5b:f8d:0:b0:628:620c:a45f with SMTP id q13-20020a5b0f8d000000b00628620ca45fmr21458679ybh.17.1646421567384; Fri, 04 Mar 2022 11:19:27 -0800 (PST) Date: Fri, 4 Mar 2022 19:19:24 +0000 In-Reply-To: <20220304170215.1868106-1-eric.dumazet@gmail.com> Message-Id: <20220304191924.75zuylhmgvlb6zt4@google.com> Mime-Version: 1.0 References: <20220304170215.1868106-1-eric.dumazet@gmail.com> Subject: Re: [PATCH v2] mm/page_alloc: call check_new_pages() while zone spinlock is not held From: Shakeel Butt To: Eric Dumazet Cc: Andrew Morton , linux-kernel , linux-mm , Eric Dumazet , Mel Gorman , Vlastimil Babka , Michal Hocko , Wei Xu , Greg Thelen , Hugh Dickins , David Rientjes Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable 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 Reviewed-by: Shakeel Butt