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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C259EC54EE9 for ; Tue, 20 Sep 2022 08:49:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4DA1B940008; Tue, 20 Sep 2022 04:49:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 489EA940007; Tue, 20 Sep 2022 04:49:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3519D940008; Tue, 20 Sep 2022 04:49:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 1746C940007 for ; Tue, 20 Sep 2022 04:49:25 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id E1CE9A0AF0 for ; Tue, 20 Sep 2022 08:49:24 +0000 (UTC) X-FDA: 79931839848.22.B47303C Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by imf01.hostedemail.com (Postfix) with ESMTP id 8C9544000B for ; Tue, 20 Sep 2022 08:49:24 +0000 (UTC) Received: by mail-lj1-f175.google.com with SMTP id j24so1636392lja.4 for ; Tue, 20 Sep 2022 01:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=avM2JaVz9NzVtQII/XtgHHxaQA02fvGFDYoIGdJRzAY=; b=h3MEJo8KfgdtxNKfxd7Bn1dOV8WYJXSTSzVFDgnJS9ErCWyOA+MrJrX/HldOGC6Qy0 ACCgLZEQIiUeE1cR2S9KI2RlDVje5wCZgwkJnkLBV9OGfOmduTRbYTko1A43M+lzLk5p f3Sz1guQXSnM7ms1ObceO6f05ilrLGT7GBwJ5ISAXfCN2XkQePLbkx7syTQek18Ie93A VgbvcZuC1Jyp39bOuKx26q3DRAf6jCwL/QZI8H9HFbG3CWt9dQC1OpV/6sw1sIiFzXYT zmqCuXMN+UKGy4kSFbUnE6+BeMt1BdXxvGC3Y0Ur4VVOrW+x/6puf0TnNXFtXYeN2nG3 UwzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=avM2JaVz9NzVtQII/XtgHHxaQA02fvGFDYoIGdJRzAY=; b=G70DnThZKdNuNbUbT4doan5n4FhaFrsw0eWx9TpUMk5Hk93o3w4s+ut/fNI7EUJXRF sKtjcMlqmN0jx6FJGPSJtq9bDtWZan5S4/7iVR8BkQfHqNEb6pCiz/vdqqIPv2cRCpUu 5mvWMJSx7DRWfdHwR7lxP1mTHk42cRWIM/SeHarPKc6k9NfORpao/lSmuZtQWry2L38g 7rZToayjk0QPzL1g8xct+zJRSxYT8LH6A0EZXd7YFxVsPskiIxfjldBv4p47zmjTIt8y yFYStX8DOPx/tFFTgH9VrmGvrCRuG8/12hDmjWlgpKH9KCMI2v/lOPMlXiejlFxAeHXC F/wA== X-Gm-Message-State: ACrzQf1UcM1OXVp6W0ivlkrDX2Y9Njrv2fnOOyLd9wnlsugxRipmG4t1 xbMo8/8k/w6GsJc4Q9XuMsZDEgL3rk62mlDa1yQ= X-Google-Smtp-Source: AMsMyM6jDHLoSohMNs5WAtMtfasbnBmxT4I+611rAp0kp9gyW2OmBeNYK7Quk+AY4vYeBrglnXPtotv4l0lSkFKkiv4= X-Received: by 2002:a05:651c:222c:b0:26b:dec5:a4f0 with SMTP id y44-20020a05651c222c00b0026bdec5a4f0mr7132005ljq.359.1663663761407; Tue, 20 Sep 2022 01:49:21 -0700 (PDT) MIME-Version: 1.0 References: <1663325892-9825-1-git-send-email-zhaoyang.huang@unisoc.com> <20220919101629.xlafi2y2dk357wk3@techsingularity.net> <20220920084555.rzphzayirdbtht2w@techsingularity.net> In-Reply-To: <20220920084555.rzphzayirdbtht2w@techsingularity.net> From: Zhaoyang Huang Date: Tue, 20 Sep 2022 16:48:53 +0800 Message-ID: Subject: Re: [RFC PATCH] mm: check global free_list if there is ongoing reclaiming when pcp fail To: Mel Gorman Cc: "zhaoyang.huang" , Andrew Morton , "open list:MEMORY MANAGEMENT" , LKML , Ke Wang Content-Type: text/plain; charset="UTF-8" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663663764; a=rsa-sha256; cv=none; b=7wE1HRD+IgtDCzrPrvNN2s90WtD68R3QXPrjYx9YImrxfH/h6rxTgLcSl9AXxjQQYzI1/v /SbO4CYd5xi7tqfXDnyZI90YjDfK8T/5TLPrbyubTqVh4J2aHyIjd8OfWOrVzqMQjE6cOi bSTaQo7mlffr/GUmaobBceoAc7mQHlM= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=h3MEJo8K; spf=pass (imf01.hostedemail.com: domain of huangzhaoyang@gmail.com designates 209.85.208.175 as permitted sender) smtp.mailfrom=huangzhaoyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663663764; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=avM2JaVz9NzVtQII/XtgHHxaQA02fvGFDYoIGdJRzAY=; b=yGdb51A7iew48sYcUsLmY/EL3XOIqQgLLC4LAer+XYkYE9URtoNBWFkSw1S1szqfqljNs1 AUcaXTr55zwKvsPR6nVTKRiJU1WUh91fKSaq8PqXmTF77hUcbp2Yqqt8iIAkvEJF2vBSht z4dAGubhDfj5ZQhduKjnY+7TqESZYBg= X-Stat-Signature: 5ge7rcsodfn9ydgmebi5wo7hzhm5inoe X-Rspamd-Queue-Id: 8C9544000B Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=h3MEJo8K; spf=pass (imf01.hostedemail.com: domain of huangzhaoyang@gmail.com designates 209.85.208.175 as permitted sender) smtp.mailfrom=huangzhaoyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1663663764-1289 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Sep 20, 2022 at 4:46 PM Mel Gorman wrote: > > 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. ok, I have noticed that the latest modification has made some changes on this path. thanks for comment > > -- > Mel Gorman > SUSE Labs