Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp393389ybm; Fri, 29 May 2020 02:51:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrnH3sxC0ygxNTJD4NomaKoCXugLg4EP1lxbcgE2s4j6JWZ5ZdpfIXhALndaWL0C0aPQtx X-Received: by 2002:a17:906:4d82:: with SMTP id s2mr6651063eju.542.1590745881138; Fri, 29 May 2020 02:51:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590745881; cv=none; d=google.com; s=arc-20160816; b=1JqkeMVm3PXXY8uydx08q2Daq8vPGnliISmxfEPs5JqJG8deTHWetdu8a6QI9zfQgF YJpd4HAOEvmUSlYogjhd0vS/4NoRrRZgmOHtUo0whRkqyFp4l3e/pN4WlDr02rzdKvPy +CV0GFw14sEXyIOY5dIKJYDuWFbSnP/x+uE5j3dnC1aEYYszq2oA2pPd0F0un6WN62/L JHoxdWm6rgr7zQvBK01BbmzyN6Tc7U5hbVhNXG+rQ+NaX7X2ImOX7LsPZwn40l8hDbGJ 9p6l4WNrb5IiC7au6cpbL6SXLcpzxeLxpkWqI7r4M/NehigfHEqTdXgZ/01p/E6K8d4f uvaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=4SLMrx0MWc8j4vJRn7Kgzb3DUyQWlx2ZLRbxHmKbcbE=; b=DU8k/UWfmAczepbj8QuoJAQPqQj03glqD+wOXhUJVlXo8G6kn7HUCPntxgvYzwOqK/ 5Rq2YL1kZZGXHTaLNahNci2Ls3GASJwS3NjUNloSj6PWD/iQ6eP2gzS+1OLyAfaiwZ4k CMl0JML63x5PTmKHrF5rronOdSgW/nFmQUXd+VJGry5uJK4Goc4rl8Q08BSOZeCCMB3G VcGyEPiC1TQTELnOh2fkJjBjDFq8RACLSxp7RkFW1eB+DYjznzlRBlw71xVFIl03gyWF kErlXtGpb6hfS5Lvd1l0k5Tqgb3HLbCJPUGaqCH78yaIHKJJ3cEA9NfLnShu/BBPfabm ulmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d16si190197eja.32.2020.05.29.02.50.48; Fri, 29 May 2020 02:51:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725821AbgE2JtX (ORCPT + 99 others); Fri, 29 May 2020 05:49:23 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:38563 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725681AbgE2JtW (ORCPT ); Fri, 29 May 2020 05:49:22 -0400 Received: by mail-wr1-f65.google.com with SMTP id e1so2804030wrt.5; Fri, 29 May 2020 02:49:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4SLMrx0MWc8j4vJRn7Kgzb3DUyQWlx2ZLRbxHmKbcbE=; b=Ffo8IQE++6k+frzciH7ED5GMNv607o7tgzOMgs1l+TpeHRJXG3eXOUNr7/LwzY4RkD PgADuitQPfprFo2OdNyXJKZpRT0a+5rWOowb5oFllzkM757hs7ia+jBnhaOgxMG/KBic 3IjxMv+NTvlerppX3wn2Tb8gHduqqxxgkxGmneN97HRbv36JwL4iHDni6NgAfMcM3E+0 dgEeUqtNbuEvWOyuPIZijNvyIAfUnbeGUXBDdq9ayEpy9QgTzb543MXJe27gGYAbb73B 3ULgH6nrR4qTuM56Sa4MCsBHMetJ5uGsloJgkk42ZrJhoWvL/mapbyzSOdJ/evRKTne2 WAWQ== X-Gm-Message-State: AOAM532Olg01nDQb4vFu/oik4+0BT/DJXCM6MLCo6rsp16qubFQ0VlAh OX3qc5dyHJtdbLvO8dUDZ68= X-Received: by 2002:adf:f58b:: with SMTP id f11mr7947420wro.155.1590745760055; Fri, 29 May 2020 02:49:20 -0700 (PDT) Received: from localhost (ip-37-188-150-59.eurotel.cz. [37.188.150.59]) by smtp.gmail.com with ESMTPSA id 5sm9907553wmd.19.2020.05.29.02.49.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2020 02:49:18 -0700 (PDT) Date: Fri, 29 May 2020 11:49:10 +0200 From: Michal Hocko To: Chris Down Cc: Yafang Shao , Naresh Kamboju , Anders Roxell , "Linux F2FS DEV, Mailing List" , linux-ext4 , linux-block , Andrew Morton , open list , Linux-Next Mailing List , linux-mm , Arnd Bergmann , Andreas Dilger , Jaegeuk Kim , Theodore Ts'o , Chao Yu , Hugh Dickins , Andrea Arcangeli , Matthew Wilcox , Chao Yu , lkft-triage@lists.linaro.org, Johannes Weiner , Roman Gushchin , Cgroups Subject: Re: mm: mkfs.ext4 invoked oom-killer on i386 - pagecache_get_page Message-ID: <20200529094910.GH4406@dhcp22.suse.cz> References: <20200520190906.GA558281@chrisdown.name> <20200521095515.GK6462@dhcp22.suse.cz> <20200521163450.GV6462@dhcp22.suse.cz> <20200528150310.GG27484@dhcp22.suse.cz> <20200528164121.GA839178@chrisdown.name> <20200529015644.GA84588@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200529015644.GA84588@chrisdown.name> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri 29-05-20 02:56:44, Chris Down wrote: > Yafang Shao writes: > > Look at this patch[1] carefully you will find that it introduces the > > same issue that I tried to fix in another patch [2]. Even more sad is > > these two patches are in the same patchset. Although this issue isn't > > related with the issue found by Naresh, we have to ask ourselves why > > we always make the same mistake ? > > One possible answer is that we always forget the lifecyle of > > memory.emin before we read it. memory.emin doesn't have the same > > lifecycle with the memcg, while it really has the same lifecyle with > > the reclaimer. IOW, once a reclaimer begins the protetion value should > > be set to 0, and after we traversal the memcg tree we calculate a > > protection value for this reclaimer, finnaly it disapears after the > > reclaimer stops. That is why I highly suggest to add an new protection > > member in scan_control before. > > I agree with you that the e{min,low} lifecycle is confusing for everyone -- > the only thing I've not seen confirmation of is any confirmed correlation > with the i386 oom killer issue. If you've validated that, I'd like to see > the data :-) Agreed. Even if e{low,min} might still have some rough edges I am completely puzzled how we could end up oom if none of the protection path triggers which the additional debugging should confirm. Maybe my debugging patch is incomplete or used incorrectly (maybe it would be esier to use printk rather than trace_printk?). -- Michal Hocko SUSE Labs