Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1559882pxp; Sun, 6 Mar 2022 19:11:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5rTmI1Z8UxhUwGv9D5EAzCkQxOKa0D3qcyKLAfJMQt52otKHCI0CJ8RlmmBzhAF/URoWV X-Received: by 2002:aa7:d14f:0:b0:415:cf37:324b with SMTP id r15-20020aa7d14f000000b00415cf37324bmr9241701edo.263.1646622684516; Sun, 06 Mar 2022 19:11:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646622684; cv=none; d=google.com; s=arc-20160816; b=KtXqLSRVRaUCqws98tTKTBdqKpaeOedXxfiqA9eX2kSCyNSOHqmHoDpdE4OZ2RgXEG p5Z8MpbI4Ld68RUiHlRHwtYBmX7QcrG8eCJUfydNmXbCsrauuPQPo7PeEQFlHumGc0bp orIsp/W8dkzwyiM7tYBYuPIf+4oIFB/L1g7cAkhcbb/DkA2e2bclbwxc1tJvdc/su7vC brESocXsVRd4K9EheOaIKHIHmGNaSt83MD11nmRRxMxy4jD9jaiJfOSDXSzsvvHZbqkk D7ThepIQV/JQihLQM+CH3iQGhtoPEKSoQzE7bFc21zhdT+Tz7MWphn4LjKyrzEVT6Egv 9IcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=391huVYq5DAxhEYcIPd+Z6lK4Gud3fqq7TgEeUR+WWI=; b=cam5hOYoE+JQj+oDjYNWznR5iuzGt4B+6JMp20yHzjR9G7dryaXpZFcQCaN7r1GrsZ a6ALEhcW23032EXggbiEbmeItIvCDb3tOFh3sdgQcC+8WCVaGG7Aoq+NjnPyIG0lEs1G aukwpWBAajsPJai7pVe32MMx1Aye/d0wws2aY24xm5XOHeEc4Ki4qLLm1aMba6lnT3Ad bjtz7LlL4e7UaH7P55OYDKEW3d4asxSNs+eLbZvHkxwB2IfW5v22PNNFOXVlCX8v4J0a Sn2LbPFH9pVi6FXQNMR5McUhSkxAW0HxJlSSGcIhFNvKIXl7tuTAKKXy9ChKxwZRnDpQ 5d8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="tXH49C8/"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 9-20020a170906004900b006d6df20a0dasi7962908ejg.622.2022.03.06.19.11.02; Sun, 06 Mar 2022 19:11:24 -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; dkim=pass header.i=@google.com header.s=20210112 header.b="tXH49C8/"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234342AbiCFWQa (ORCPT + 99 others); Sun, 6 Mar 2022 17:16:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbiCFWQ3 (ORCPT ); Sun, 6 Mar 2022 17:16:29 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 967623B570 for ; Sun, 6 Mar 2022 14:15:36 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id z4so12022383pgh.12 for ; Sun, 06 Mar 2022 14:15:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=391huVYq5DAxhEYcIPd+Z6lK4Gud3fqq7TgEeUR+WWI=; b=tXH49C8/vqs+ygCTzo5gP4nqHiqf0//z9rAWQ3TD+9PZuNPidOX/ZS1vxWIoFuREqs WcrIp1iJL5qTXQG1TGsDXXXhnXWK6J/WuMKVQ/YN4EEaKW4mYCFjnTZDBoZB8kiSYn4q gp+XMKpzFJOdiiejLnn+lG11vEwFwoGRup5SHgJXjxBs0B24C7pCZ/Gy2dusyG9LYgPm L5sOz8iXExBhKRmF0YnPLcOOF3FfMm1ypr35T/55arFRS1zVuVToSeFOdctvH0LZp5st io3B4Sg3DLipbdzZ+ROgmvU0GrfkNkFjYoWDnxd5LsUCK7m78sqCb91LOa6Fu++FMXeb q8Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=391huVYq5DAxhEYcIPd+Z6lK4Gud3fqq7TgEeUR+WWI=; b=RcOhtkXSx27EBrgOUY70hc6bBKKfDUnv2HV3lL8lD/7dlG2Li5yFj+vNszt5moCq2b ehH/0xW21+KoSVDWw1r1Q/VxItJ/H890E/3fp1lJn42MlOH9VlJWhaXfcNi/Mx6C+jSX sAKxl1yReaYvg3fUSNv4iTCDeab5OePsESJX4GxoMBCcMMHcgRI2ov+7TDiSy8xFjhGb rrdWShS1N+Voihvt7mI4LlkCCiF9HiKKn/aH8nKp/selpJPXRU6jUyCiwSpjiFteEEZB GY6uOw9tSKOBrkiy+vv7ut7m2FiYju0XcxI14piVPPgfUTGqQZDovz9XdpKNzmDd92q4 FhHg== X-Gm-Message-State: AOAM5337SiQ7fzXpssA0l0CkfLYDVUbC61BrObNlSfrlEwf05z1+e53A WzyKsAm0qN7VXgRByoQcuh3iIOZnP63uHg== X-Received: by 2002:a63:7b49:0:b0:37f:ed43:4fc4 with SMTP id k9-20020a637b49000000b0037fed434fc4mr7481916pgn.387.1646604935931; Sun, 06 Mar 2022 14:15:35 -0800 (PST) Received: from [2620:15c:29:204:5f87:a605:2b59:e392] ([2620:15c:29:204:5f87:a605:2b59:e392]) by smtp.gmail.com with ESMTPSA id l5-20020a056a0016c500b004f140564a00sm13682590pfc.203.2022.03.06.14.15.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Mar 2022 14:15:35 -0800 (PST) Date: Sun, 6 Mar 2022 14:15:35 -0800 (PST) From: David Rientjes To: Eric Dumazet cc: Andrew Morton , linux-kernel , linux-mm , Eric Dumazet , Mel Gorman , Vlastimil Babka , Michal Hocko , Shakeel Butt , Wei Xu , Greg Thelen , Hugh Dickins Subject: Re: [PATCH v2] mm/page_alloc: call check_new_pages() while zone spinlock is not held In-Reply-To: <20220304170215.1868106-1-eric.dumazet@gmail.com> Message-ID: <5867e22f-43cc-ca21-bc60-ec67554e66@google.com> References: <20220304170215.1868106-1-eric.dumazet@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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, 4 Mar 2022, 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 Acked-by: David Rientjes