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=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 9FEC5C83000 for ; Tue, 28 Apr 2020 12:26:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 378B8206A1 for ; Tue, 28 Apr 2020 12:26:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OQMaHHiR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 378B8206A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A49048E0005; Tue, 28 Apr 2020 08:26:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9F9548E0001; Tue, 28 Apr 2020 08:26:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 90EC28E0005; Tue, 28 Apr 2020 08:26:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0225.hostedemail.com [216.40.44.225]) by kanga.kvack.org (Postfix) with ESMTP id 78F4D8E0001 for ; Tue, 28 Apr 2020 08:26:26 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 29DE78248D52 for ; Tue, 28 Apr 2020 12:26:26 +0000 (UTC) X-FDA: 76757186772.27.boy65_725ef2dc9e756 X-HE-Tag: boy65_725ef2dc9e756 X-Filterd-Recvd-Size: 5373 Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Apr 2020 12:26:25 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id f3so22598911ioj.1 for ; Tue, 28 Apr 2020 05:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EYvHQlo/4M1uVbfsLAsHmkPEQK2zk15T8AKu2Y+IIF8=; b=OQMaHHiRCspT123qqXQUJK2okhEC4KPr/ClEwBK06uBy8LhFDtpH7YZTQogdLyctjn D4OgIlxOa395llEgIlwlL8E3V38Ulg5lyh0fvj+jEK3ye+4ZGlyDoEknhznMAZLkFSzj UzhhojxPn9hHvZMpcaNyT1UYJTrSc0znqRPr4dTIlGz6ui/RJC+aTleAdo8KW5vkm3v+ JFZ+cyNNlZo1c4v1voY6zuFSBE2sG1fxU7HFnSKDzPVAddsLmtHzdU3J5CevczRZ3tX0 AzlhDPTXOjzv+Q9s3DrbI0IIi1Dvj6nbkkX+me4wN1oc3PLJeCjzqj2EJv4DzyYB5BOo bSGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EYvHQlo/4M1uVbfsLAsHmkPEQK2zk15T8AKu2Y+IIF8=; b=jwU+CX0F3askCInEIIHJqtubxsYHBGG9zZtROgYp7yGzfTZEznh6aHJAhzRfHHeg9a DBIX1WWXv59Zga3tju/q7IHhD+qR/qFkHHyVMveVe7dyCIr2+Zob6/VyPa7rJbIXAGZA ZTo3qBwf7r1rceWBTSg4GdICxleazKV7rBuTSYgp+JNyRVk8EE7tWtELo3SZ6JrKbtf5 BmEWOdQaBg32O9WHJu6SPr0KZPeuGM7G6QBsPTgLt5ayT5e+gjo6LLiEjN4suCKd5ZZA MMPcatU3y6otiLaFSzQMRWkkX+itbpvz9YXoz78OBFal4INvs56EiGmdKhnVcVl1ngv4 gvQg== X-Gm-Message-State: AGi0PuYu4yITDjDE8qkYSbl4rimLCh3IPIUgf+6mrLHz8nssAX45CKfT Ug2cHGdLo4OnYbVK/BGlSo+dHkBz73xAzyKNZmk= X-Google-Smtp-Source: APiQypIQ9BZwBUTvebq18ogCezbp01hI7Ug1oq9qIj/lICDRXCGhzOSTOX4gLe7ZZqEn8NAUFRzuVjN49Owhg3o5rDo= X-Received: by 2002:a6b:d219:: with SMTP id q25mr14150663iob.202.1588076785201; Tue, 28 Apr 2020 05:26:25 -0700 (PDT) MIME-Version: 1.0 References: <20200425152418.28388-1-laoar.shao@gmail.com> <20200427170540.GB29022@cmpxchg.org> <20200428080525.GL28637@dhcp22.suse.cz> <20200428104300.GN28637@dhcp22.suse.cz> In-Reply-To: <20200428104300.GN28637@dhcp22.suse.cz> From: Yafang Shao Date: Tue, 28 Apr 2020 20:25:49 +0800 Message-ID: Subject: Re: [PATCH 0/3] mm: improve proportional memcg protection To: Michal Hocko Cc: Johannes Weiner , Andrew Morton , Roman Gushchin , Chris Down , Linux MM Content-Type: text/plain; charset="UTF-8" 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 Tue, Apr 28, 2020 at 6:43 PM Michal Hocko wrote: > > On Tue 28-04-20 16:22:46, Yafang Shao wrote: > > On Tue, Apr 28, 2020 at 4:05 PM Michal Hocko wrote: > > > > > > On Tue 28-04-20 09:45:27, Yafang Shao wrote: > > > [...] > > > > Seems we can't get an agreement on how to improve current code. > > > > So I will submit a patch to revert the commit 9783aa9917f8 ("mm, > > > > memcg: proportional memory.{low,min} reclaim") first. > > > > > > My current understanding is that the issue we are discussing here is > > > mostly theoretical. Your changelog doesn't really talk about any real > > > life workloads that would be suffering. > > > > Is real life workload really important ? > > It is really important to make cost vs. benefit decisions. Like whether > to rever the said commit or not. > > > If so, why an issue[1] occured in the real workload report by me in > > 2019 that memcg proection can't protect inactive pages (inodes) is > > ignored again and again ? > > I do not think it is ignored. IIRC there was not an agreement on the way > to fix this. I could get involved very much because there were other > higher priority things to take care. People are simply busy. > In your theory - issues with real life workload has a higher priority, you should pay more attention to that one, rather than wasting your time on a comment war in this one. Alright, the comment war really wastes time, that is not expected by me. So let's turn back to the techichal discussion. > > So I'm questioning that what is the real life workload ? > > It is a workload which does something useful for their users. > [...] > > > So it would be really more helpful to not insist on unrelated > > > implementation details and focus on two things 1) split up the effective > > > values calculation from the predicate (cleanup without any functional > > > changes) 2) make the calculation more robust against racing reclaimers. > > > > > > > Another thing should be considered as well, 0) don't access > > memroy.emin and elow in get_scan_count(). > > If you can achieve the gradual transition over protections by other > means then I am really interested in more details. sc->protection I make my statement again - accessing the realy fragile emin & elow in very deep reclaiming code is a totally horrible HACK, that is the root of all evil. -- Thanks Yafang