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 X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B977C433E0 for ; Fri, 29 May 2020 01:56:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 47B7D2075F for ; Fri, 29 May 2020 01:56:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="lkBaXTV2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404312AbgE2B4z (ORCPT ); Thu, 28 May 2020 21:56:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390961AbgE2B4v (ORCPT ); Thu, 28 May 2020 21:56:51 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45F9FC08C5C6 for ; Thu, 28 May 2020 18:56:47 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id n5so1449572wmd.0 for ; Thu, 28 May 2020 18:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GN9DgkPdwejhyEVH1kmP5gS0KBOAcxSeuTuQOx2XI9o=; b=lkBaXTV2ZUB6ZO5yX3Ng0K/CASCbc9oNlaDIc8KLZ8e4v2cb+z5+AxOSC0HUqdLw42 pPHQXKJiXMf7fSmverIul8xSND7c0ygaABLVaG0hqIXTL8OJ4e0fS8l8+kZ0LHaXgNsT f3Y+1qQWXh34SIawtNNfPuqOwbkRTPMzu6he4= 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:user-agent; bh=GN9DgkPdwejhyEVH1kmP5gS0KBOAcxSeuTuQOx2XI9o=; b=S65Zsm9pYX25xrEzMMBspbYa5H+ZY2p/YOohN6Qv0/450g9mlqZp0oOAbOpgT/iTPe mABe0SyaJ37thLkUbR86qYrkpes4whYz9la37eoocGmOcc9EFedN426Q2JGM1iVgusXl WuC73J5WXhJZmTu6gafq4Zjb2KKkqNENoeN6brKx6jngqzH5xNbqcs6XkqM5SxlDRHaZ rX5noqHZ/vuyO5KLior9KFSvyFNZz3Ek4Fa0LOC+q8fzW46g0YSF+nMQ/2Xff3S1kpgx bDk9O3H+SGbzbcec/XQMlJ0DLzdc0KkX99XKnn5E5WDYeW90Nck5DQ44GL4msvhpIkD5 asrw== X-Gm-Message-State: AOAM530SsXtOD70UkTgrTmGQqWU8/+YNT/rQsd5TMs13Fq6FferBFYtz F7RChaVXvguRaXwWq0uZHRBLpA== X-Google-Smtp-Source: ABdhPJx1kaceNrBzDvGLjsUvi/4uBliHtVGdHPjh2oD497Ebo468RL7eFjpFK3j2MrZfogR+PRA4Bg== X-Received: by 2002:a7b:c096:: with SMTP id r22mr6033969wmh.92.1590717405871; Thu, 28 May 2020 18:56:45 -0700 (PDT) Received: from localhost ([2a01:4b00:8432:8a00:56e1:adff:fe3f:49ed]) by smtp.gmail.com with ESMTPSA id q11sm1858042wrv.67.2020.05.28.18.56.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 18:56:45 -0700 (PDT) Date: Fri, 29 May 2020 02:56:44 +0100 From: Chris Down To: Yafang Shao Cc: Naresh Kamboju , Michal Hocko , 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: <20200529015644.GA84588@chrisdown.name> References: <20200520190906.GA558281@chrisdown.name> <20200521095515.GK6462@dhcp22.suse.cz> <20200521163450.GV6462@dhcp22.suse.cz> <20200528150310.GG27484@dhcp22.suse.cz> <20200528164121.GA839178@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.14.2 (2020-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :-)