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 751FCECAAD8 for ; Tue, 20 Sep 2022 08:46:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EEB07940009; Tue, 20 Sep 2022 04:46:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E9A44940007; Tue, 20 Sep 2022 04:46:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D89D1940009; Tue, 20 Sep 2022 04:46:05 -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 CB34B940007 for ; Tue, 20 Sep 2022 04:46:05 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id AD98A1C7819 for ; Tue, 20 Sep 2022 08:46:05 +0000 (UTC) X-FDA: 79931831490.14.7576F58 Received: from outbound-smtp22.blacknight.com (outbound-smtp22.blacknight.com [81.17.249.190]) by imf17.hostedemail.com (Postfix) with ESMTP id 2C4EA40009 for ; Tue, 20 Sep 2022 08:46:05 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp22.blacknight.com (Postfix) with ESMTPS id DA1B2BAAE8 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: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663663565; 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; bh=jxEHYVq+Mm4kmxlhJWpmVf7ZGtj3r/81udK9urGeGTw=; b=BZwn1BHkDAUM83Vye83xdUf02bSfatJ+ZvbSu2f79ffiJnPFePhYSQpJgVmk+D+7m2byxB qZU/KER6JpzLh8sqjTiW7SIIbWO0hrGBP1jaNvhu3yfzuROtoFwRdLVXyoxPTcmDyT2199 MNGjI41n9mdFRWdDdBg/e9cwQlK05Ac= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf17.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.190 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663663565; a=rsa-sha256; cv=none; b=tGx4iamnsXuqmSMoGynTFZbtU2+NQ03hx4ig1TgZ+48m7tXNdIcP7DF2fjk3diybkecXj0 xBjaDrclum+HoTo7S75wGFaB8FV/8Labx7ZoFmqKi2BaXMAdDc4xF5V7UYik89tC72AvOV USwySi8BY+9xN01hAo6doz9i3G9ODCs= X-Stat-Signature: 8y1srhm5hyjgnkq5o9py5mqgacuqpfby X-Rspamd-Queue-Id: 2C4EA40009 Authentication-Results: imf17.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf17.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.190 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1663663565-857821 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 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