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 98354C433EF for ; Fri, 4 Mar 2022 19:19:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229738AbiCDTUh (ORCPT ); Fri, 4 Mar 2022 14:20:37 -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-Google-Smtp-Source: ABdhPJzojehDkLC7mTTaV1b/BxVv+/dWays+AM4ORyKClLmTCxSgpe0Mqjt2vxpfifi3i2RbT/mKxzIIgJQc4Q== 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 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