Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1287460pxb; Wed, 20 Oct 2021 01:57:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4EIuS2lG1Hb31Rp4Z38AWgMSFnAsMnJsSza3AqasiILSnQPvE7fH4oOwj7pl/sz7qwAwt X-Received: by 2002:a05:6402:11ca:: with SMTP id j10mr61021125edw.223.1634720266867; Wed, 20 Oct 2021 01:57:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634720266; cv=none; d=google.com; s=arc-20160816; b=YaJDuCnUMFFku2VHa8Lw3uO4FPspJFI+QMD+sbaJcAlV9J5otJNiqxwfaMaLfj8eH8 DUUnLyNdUmNo6V7eBb+1XCh5ytDjPHYsY/RO17Kav3j7rWjTFdnda/ZnWCjc7KeV9mFy s6hmcp84w6FMHQtIdlfLlJIMsHsxo/zEjiqhTo95WbyohLdnkkc3RMkokQtLRb8IQXfO gVVmA8Fcst9SCp3a+fFRuiC4EBucwjGwxoVSG6+CPsjAH/b5X3VQyEJHQPdZeZ+lU0cE fdQMInVyE31IWAsi2uCxcYINN3ooCf6h1tmr6offzy/8KUB5dgW5dIyjQGBiaXYvrzej pD3w== 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=drSdqOUgPDLzIHMDdiQEpBl1jbGldtxzCXUREGTCpAM=; b=fvB3QJzWkVKpGG2q3FUO76YxgbdfdN9uDqwtPo/qCyqOP7P6l04eYTeGUx8Jc8ocJB 2qWL44kEzlPl0xMsxyBpHDwyjmZ+ozsOMyBmcJ7wSd5D2+zkWoW/GxFRo20Lep3EFQur sBBQupv3++RGFBiKqzrmgZhndRfvyKPHWlJBJwll3TXqxp46w/eYCUSxLpuUrnNqkZij /P+A5zVGtME8/1ohOuokt5b2T1Tn+NlAXE/Le/mx6goJUKIQlxUMWOUPLeBOYLOoi8It idFwIEXgb6+9+vpvsJni/X7XO5A6p1teX1ea17yQedAz5tNaonrYnlx7DMWF/e1bc/Rj QWVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=u6aivwsI; 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 b8si1751556edz.9.2021.10.20.01.57.22; Wed, 20 Oct 2021 01:57:46 -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=u6aivwsI; 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 S229959AbhJTI5o (ORCPT + 99 others); Wed, 20 Oct 2021 04:57:44 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:49048 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229900AbhJTI5n (ORCPT ); Wed, 20 Oct 2021 04:57:43 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id EFF902195C; Wed, 20 Oct 2021 08:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1634720127; 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=drSdqOUgPDLzIHMDdiQEpBl1jbGldtxzCXUREGTCpAM=; b=u6aivwsI93BOLQ2BzXCgWIomMSDlUSdi3jJ0dPetefXsuaecwNvzbFyEFtsbnKv2NzpK9R 5dKlih6TC9wCQ3gvT2070HjuklrmgnYWcbLqBVGB8EnU9rrdnQ8c+gPbzITYF91aW8ig0Y AIyAKqCKtlWbBVflVmXRWGEBwTrxkuk= 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 8F892A3C33; Wed, 20 Oct 2021 08:55:27 +0000 (UTC) Date: Wed, 20 Oct 2021 10:55:27 +0200 From: Michal Hocko To: Zhaoyang Huang Cc: Andrew Morton , Johannes Weiner , Vladimir Davydov , Zhaoyang Huang , "open list:MEMORY MANAGEMENT" , LKML Subject: Re: [PATCH] mm: skip current when memcg reclaim Message-ID: References: <1634278529-16983-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 20-10-21 15:33:39, Zhaoyang Huang wrote: [...] > Do you mean that direct reclaim should succeed for the first round > reclaim within which memcg get protected by memory.low and would NOT > retry by setting memcg_low_reclaim to true? Yes, this is the semantic of low limit protection in the upstream kernel. Have a look at do_try_to_free_pages and how it sets memcg_low_reclaim only if there were no pages reclaimed. > It is not true in android > like system, where reclaim always failed and introduce lmk and even > OOM. I am not familiar with android specific changes to the upstream reclaim logic. You should be investigating why the reclaim couldn't make a forward progress (aka reclaim pages) from non-protected memcgs. There are tracepoints you can use (generally vmscan prefix). -- Michal Hocko SUSE Labs