Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3635347rwb; Tue, 20 Sep 2022 02:26:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7225uZPYIJ0hKVqXc7LihrHNZ+rXtlNzLcugs8bl14/aVv9mHwXrg2N9vccCEFu4jrvqhY X-Received: by 2002:a17:906:5d0a:b0:780:3c42:990f with SMTP id g10-20020a1709065d0a00b007803c42990fmr16265276ejt.9.1663665979782; Tue, 20 Sep 2022 02:26:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663665979; cv=none; d=google.com; s=arc-20160816; b=E2V69Lm4Bx4Q4GFAx0GC9T+F9Xrn+kAiZ2QE0wmpQ9TrzaY2T/PCBZ0nMv7bvjj1xY yiLsTHpmimunoIU0CYdu6M/gQxweSb4+NK6NFvD+hcwcHlqbwIYgmDnrMDKlWcbKB5lP FZS8OGzk0/im16/wl4u7DwzNhrIdQ9ly9ztATusYSX96U0p0TMqEjF2Jrd+yeM6hKu3L pf92m6OlYN4UhTQpFS6DdPCKeUKrjmpvD10xAW3N985wgprekk0m5pkAl63hyrODPcqv Jdnl3bVQDnD07kgaEgJhcjTp/MwTBpvam4/glU1k7X+g3SYeuaWfiEUph4jhVPBBXYva KdLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=jxEHYVq+Mm4kmxlhJWpmVf7ZGtj3r/81udK9urGeGTw=; b=cjDn95kMVR8wpZa4To/TfdeohzqByy4+roJdaBW60mWDc2O85wrKwBZ6NRyOsa8Q44 BXXWiksFTmoRSDtHcucCM0poOVpmThel0e0buzVBWaUgD2vRppEAhMD3s1xAki0qry0l uvdWBELfW4/M6jJ+dU5c+fc0/ejBn7+m83MkLi4lxwHlL0FwRP4x+xsfxe6V/RE2/aZg ulJCPePCeK+Redpf89XTy785E+E8D+7d/QqnS34awEMDG6MspmkslPCWHuyocKIEELer UARol/0qIf+g7RBD2jCr1U07LnhMju52Rmi/SI1gADKNbGYM37fGszs7xRy1SXy8TTrc a7cQ== 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 r16-20020a05640251d000b0043e5ca9a0e2si1301823edd.628.2022.09.20.02.25.54; Tue, 20 Sep 2022 02:26:19 -0700 (PDT) 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 S231431AbiITIqU (ORCPT + 99 others); Tue, 20 Sep 2022 04:46:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbiITIqH (ORCPT ); Tue, 20 Sep 2022 04:46:07 -0400 Received: from outbound-smtp27.blacknight.com (outbound-smtp27.blacknight.com [81.17.249.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42EDD1F1 for ; Tue, 20 Sep 2022 01:46:05 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp27.blacknight.com (Postfix) with ESMTPS id DC056CAC48 for ; Tue, 20 Sep 2022 09:46:03 +0100 (IST) Received: (qmail 21985 invoked from network); 20 Sep 2022 08:46:03 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.198.246]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 20 Sep 2022 08:46:03 -0000 Date: Tue, 20 Sep 2022 09:45:55 +0100 From: Mel Gorman To: Zhaoyang Huang Cc: "zhaoyang.huang" , Andrew Morton , "open list:MEMORY MANAGEMENT" , LKML , Ke Wang Subject: Re: [RFC PATCH] mm: check global free_list if there is ongoing reclaiming when pcp fail Message-ID: <20220920084555.rzphzayirdbtht2w@techsingularity.net> References: <1663325892-9825-1-git-send-email-zhaoyang.huang@unisoc.com> <20220919101629.xlafi2y2dk357wk3@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 Tue, Sep 20, 2022 at 09:45:35AM +0800, Zhaoyang Huang wrote: > On Mon, Sep 19, 2022 at 6:22 PM Mel Gorman wrote: > > > > On Fri, Sep 16, 2022 at 06:58:12PM +0800, zhaoyang.huang wrote: > > > From: Zhaoyang Huang > > > > > > Check the global free list again even if rmqueue_bulk failed for pcp pages when > > > there is ongoing reclaiming, which could eliminate potential direct reclaim by > > > chance. > > > > > > Signed-off-by: Zhaoyang Huang > > > > Patch does not apply and may be based on a custom kernel that introduced > > a problem. There is no description of what problem this is trying to > > fix. Checking the status of reclaim for a specific zone in this path would > > be a little unexpected. If allocation pressure is exceeding the ability > > of reclaim to make progress then the caller likely needs to take action > > like direct reclaim. If the allocation failure is due to a high-order > > failure then it may need to enter direct compaction etc. > > Agree with the above comment. This is a proposal aiming at avoiding > direct reclaiming things with minimum cost, that is to say, about 5 > CPU instructions in return with the overhead of function calls which > has both of several loops inside and potential throttle sleep by IO > congestion etc. If the refill fails and kswapd is failing to keep up then actions like direct reclaim or compaction are inevitable. At best, this patch would race to allocate pages in one context that are being freed in parallel by another context. Nak. -- Mel Gorman SUSE Labs