Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp903819pxb; Wed, 27 Oct 2021 14:51:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyN8fhDorKtJ0k7j4CKQ/Mct26sjMTJuRJ28c2bXqu6EaiX85uMqsPUXUAnysgQuSlCKbNw X-Received: by 2002:a63:7803:: with SMTP id t3mr245385pgc.167.1635371509936; Wed, 27 Oct 2021 14:51:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635371509; cv=none; d=google.com; s=arc-20160816; b=tyja43XRO1ny9jXtGnJekQf/BpKoPOiXotlclrUkacLOjs4NJf6H4Euu+suq9kuHGa QAlIm26IZEbdMB4L9LWnTmfprqZFV2eUgZMDeYxu2YjzPgezyhBuk/3YOdvpO3+4CpJK nvs72Y4JHcrFzyvaJdkNVmKnTJPSQ93ikRoMYttJSNP7vG62FbMkluRmnSNnVG1Y9J+g WAy4MSba7S2Fx1fXiBNFeJI2wOHQkoRHkOCOArMKJZWfb+PORl7encbzU1VEzxSuInP9 rMAVC7YgxOG6U6VmfCFSCkbRuagQ+Xam55GaeeGrgQi0WPwBGawweVtJDUbMSPJ//BMX DSPA== 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:dkim-signature; bh=Lqxo+EjDn5bKx1T8Ew7F30FEa32NiHZv+Phf/jFObIc=; b=J97Wtzxjjg49ghwTKskj+doYDg7KInCYISdhNzHYrUix22+PbbSLzEpFwoksI5bXGR Zw6ZHlJoU/Sj1ZMcEI0vwmIosHmB1uHP2BjKnl50uqivMHqWe96CvO7xrF9BBLjxN84c YSuV1hJfteAlckxBFt1I0itZYnKd28UPEFIP7xJg+GpDVCOtyHlUlTi5n+0UfpCxID2C MUNCWQHlHGnie1pO8w7U8YHbmN1b2sE1vRCjsew0f/VkoGeXuWV/XZXARy6yIkiWMPar M4SntMRcenQp/f9+Ql3CsnKMgF+KfOJr4BhpNWLAqtRYbAD+1typjszpoHq/71Gf6DG+ dFwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Q6aRDwKF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s35si1383933pgm.407.2021.10.27.14.51.37; Wed, 27 Oct 2021 14:51:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Q6aRDwKF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239059AbhJ0I2l (ORCPT + 99 others); Wed, 27 Oct 2021 04:28:41 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:40496 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237179AbhJ0I2k (ORCPT ); Wed, 27 Oct 2021 04:28:40 -0400 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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