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=-1.0 required=3.0 tests=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 C0531C4BA18 for ; Wed, 26 Feb 2020 17:57:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8E2A124656 for ; Wed, 26 Feb 2020 17:57:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E2A124656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3B2F06B0005; Wed, 26 Feb 2020 12:57:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 33E056B0006; Wed, 26 Feb 2020 12:57:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 206676B000D; Wed, 26 Feb 2020 12:57:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0040.hostedemail.com [216.40.44.40]) by kanga.kvack.org (Postfix) with ESMTP id 01B2B6B0005 for ; Wed, 26 Feb 2020 12:57:01 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id C5E652C8F for ; Wed, 26 Feb 2020 17:57:01 +0000 (UTC) X-FDA: 76533034242.28.sail59_77912a832bc44 X-HE-Tag: sail59_77912a832bc44 X-Filterd-Recvd-Size: 4964 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Feb 2020 17:57:01 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id e8so4240517wrm.5 for ; Wed, 26 Feb 2020 09:57:01 -0800 (PST) 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=XYuTT4oBJKWXgeE5+ImMK08MUo+U41eFHMUsFDzXC3g=; b=FFLvtOBwNAUAX7qsbaOEWF8R3E2TydV36FxWxrf4/odFsRQgTs0IGl5mg36Yzy6HYP r9hp/CrDiX/aQjdn2J95z+3HPY8cc2LR8PcuavoomLXBv2Xo7EzDfVWn2fZpnDRoTndd loiPRc9CUkenzv3qbq6k+tyIc3jC7mjrtLGevdf2XhDUgcq/MLsiW1mwgr8kODwaRw0G fRo/nI/YR3tdPW1BB1C6aIqI5zyIxPi1Tzl+wV8WpDrkqei6z590C3LJMdi1Ow8aRo2n /Qt9OC0GP1TJPG3R/SRNYJazi3cJAFwgWqe28U8NSPPwyPg9BjMaOeLWR35RV+ktGkVl Ccig== X-Gm-Message-State: APjAAAWhMYBghNYQhOJHdPxb+VWdSU6HVU3BR3u+6mncIgyLQ0tpEHg/ NKRgUy+TumeUfWcRAJcharI= X-Google-Smtp-Source: APXvYqxn+dTMcNHRegTc1CqQ9KKb5lg3/pc5LpPja6Ha7fAC/Me4YB7FHlZVtun3Ul4E652e35RqQw== X-Received: by 2002:adf:dd4d:: with SMTP id u13mr6714677wrm.70.1582739820112; Wed, 26 Feb 2020 09:57:00 -0800 (PST) Received: from localhost (ip-37-188-190-100.eurotel.cz. [37.188.190.100]) by smtp.gmail.com with ESMTPSA id w7sm3622305wmi.9.2020.02.26.09.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 09:56:59 -0800 (PST) Date: Wed, 26 Feb 2020 18:56:58 +0100 From: Michal Hocko To: Johannes Weiner Cc: Tejun Heo , Andrew Morton , Roman Gushchin , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH v2 3/3] mm: memcontrol: recursive memory.low protection Message-ID: <20200226175658.GP3771@dhcp22.suse.cz> References: <20200214071537.GL31689@dhcp22.suse.cz> <20200214135728.GK88887@mtj.thefacebook.com> <20200214151318.GC31689@dhcp22.suse.cz> <20200214165311.GA253674@cmpxchg.org> <20200217084100.GE31531@dhcp22.suse.cz> <20200218195253.GA13406@cmpxchg.org> <20200221101147.GO20509@dhcp22.suse.cz> <20200221154359.GA70967@cmpxchg.org> <20200225122028.GS22443@dhcp22.suse.cz> <20200225181755.GB10257@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200225181755.GB10257@cmpxchg.org> 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 25-02-20 13:17:55, Johannes Weiner wrote: > On Tue, Feb 25, 2020 at 01:20:28PM +0100, Michal Hocko wrote: > > > > On Fri 21-02-20 10:43:59, Johannes Weiner wrote: > > > On Fri, Feb 21, 2020 at 11:11:47AM +0100, Michal Hocko wrote: > > [...] > > > > I also have hard time to grasp what you actually mean by the above. > > > > Let's say you have hiearchy where you split out low limit unevenly > > > > root (5G of memory) > > > > / \ > > > > (low 3G) A D (low 1,5G) > > > > / \ > > > > (low 1G) B C (low 2G) > > > > > > > > B gets lower priority than C and D while C gets higher priority than > > > > D? Is there any problem with such a configuration from the semantic > > > > point of view? > > > > > > No, that's completely fine. > > > > How is B (low $EPS) C (low 3-$EPS) where $EPS->0 so much different > > from the above. You prioritize C over B, D over B in both cases under > > global memory pressure. > > You snipped the explanation for the caveat / the priority inversion > that followed; it would be good to reply to that instead. OK, I have misread your response then. Because you were saying that the above example is perfectly fine while it actually matches your example of low, mid, high prio example so I was confused. [...] I am skipping the large part of your response mostly because I believe it would make it easier to move this forward. > > It would be also really appreciated if we have some more specific examples > > of priority inversion problems you have encountered previously and place > > them somewhere into our documentation. There is essentially nothing like > > that in the tree. > > Of course, I wouldn't mind doing that in a separate patch. How about a > section in cgroup-v2.rst, at "Issues with v1 and Rationales for v2"? Yes, makes sense. A subsection about examples/best practices/Lessons learned where we can add more sounds like a very good thing in general. Because regardless of what tends to work for some deployments it is always good to give examples of what hasn't worked for others and was non trivial to find out. This can save countless of hourse for other people. -- Michal Hocko SUSE Labs