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 35BDCC433FE for ; Sun, 6 Mar 2022 22:15:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234346AbiCFWQb (ORCPT ); Sun, 6 Mar 2022 17:16:31 -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-Google-Smtp-Source: ABdhPJwzKRwjJxCBJDMG8IhPCM3CI0pHUwMA/K8n/SXqp3bCN/ofaAeYsUKldmofLQ5O23BfCUuCiA== 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 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