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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51FAAC433FE for ; Wed, 27 Oct 2021 08:26:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DD628610A0 for ; Wed, 27 Oct 2021 08:26:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DD628610A0 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 4E73C940008; Wed, 27 Oct 2021 04:26:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 495AD940007; Wed, 27 Oct 2021 04:26:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 38422940008; Wed, 27 Oct 2021 04:26:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0214.hostedemail.com [216.40.44.214]) by kanga.kvack.org (Postfix) with ESMTP id 29A42940007 for ; Wed, 27 Oct 2021 04:26:17 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id CE7152DEB2 for ; Wed, 27 Oct 2021 08:26:16 +0000 (UTC) X-FDA: 78741535152.38.BB30306 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf23.hostedemail.com (Postfix) with ESMTP id 581209000381 for ; Wed, 27 Oct 2021 08:26:08 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id EB7672195E; Wed, 27 Oct 2021 08:26:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1635323174; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Lqxo+EjDn5bKx1T8Ew7F30FEa32NiHZv+Phf/jFObIc=; b=Q6aRDwKFHTylT0/YntdBzdOTHpyeoLztAmEzSH4i4oKDs0A7FRl5igo/Jgs7FhRbP+fxjF XItgh9R0S4eDs6DHldPCn8BkX5a85UWRvxmyaw5K9mfFmV8nqktfUezHMczc1Zl7YcaYS1 mB/fMQpAb43nPEYdmZBacWK6ifSCZlo= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 6F92AA3B81; Wed, 27 Oct 2021 08:26:14 +0000 (UTC) Date: Wed, 27 Oct 2021 10:26:14 +0200 From: Michal Hocko To: Zhaoyang Huang Cc: Andrew Morton , Johannes Weiner , Vladimir Davydov , Zhaoyang Huang , "open list:MEMORY MANAGEMENT" , LKML Subject: Re: [RFC PATCH] mm: have kswapd only reclaiming use min protection on memcg Message-ID: References: <1635318110-1905-1-git-send-email-huangzhaoyang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: esyfu5c1eh3b6cycp165sczmd9ai8dur X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 581209000381 Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=Q6aRDwKF; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf23.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com X-HE-Tag: 1635323168-459322 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 Wed 27-10-21 15:46:19, Zhaoyang Huang wrote: > On Wed, Oct 27, 2021 at 3:20 PM Michal Hocko wrote: > > > > On Wed 27-10-21 15:01:50, Huangzhaoyang wrote: > > > From: Zhaoyang Huang > > > > > > For the kswapd only reclaiming, there is no chance to try again on > > > this group while direct reclaim has. fix it by judging gfp flag. > > > > There is no problem description (same as in your last submissions. Have > > you looked at the patch submission documentation as recommended > > previously?). > > > > Also this patch doesn't make any sense. Both direct reclaim and kswapd > > use a gfp mask which contains __GFP_DIRECT_RECLAIM (see balance_pgdat > > for the kswapd part).. > ok, but how does the reclaiming try with memcg's min protection on the > alloc without __GFP_DIRECT_RECLAIM? I do not follow. There is no need to protect memcg if the allocation request doesn't have __GFP_DIRECT_RECLAIM because that would fail the charge if a hard limit is reached, see try_charge_memcg and gfpflags_allow_blocking check. Background reclaim, on the other hand never breaches reclaim protection. What is the actual problem you want to solve? -- Michal Hocko SUSE Labs