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.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 93107C35646 for ; Fri, 21 Feb 2020 17:13:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6636520722 for ; Fri, 21 Feb 2020 17:13:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6636520722 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id F00DC6B0006; Fri, 21 Feb 2020 12:12:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EB00F6B0007; Fri, 21 Feb 2020 12:12:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D9F336B0008; Fri, 21 Feb 2020 12:12:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0239.hostedemail.com [216.40.44.239]) by kanga.kvack.org (Postfix) with ESMTP id BB1476B0006 for ; Fri, 21 Feb 2020 12:12:59 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 731DC180AD807 for ; Fri, 21 Feb 2020 17:12:59 +0000 (UTC) X-FDA: 76514779278.29.oven40_1a08ca09a0b22 X-HE-Tag: oven40_1a08ca09a0b22 X-Filterd-Recvd-Size: 2354 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Fri, 21 Feb 2020 17:12:58 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 76F9BAC37; Fri, 21 Feb 2020 17:12:57 +0000 (UTC) Date: Fri, 21 Feb 2020 18:12:56 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Johannes Weiner Cc: Andrew Morton , Roman Gushchin , Michal Hocko , Tejun Heo , 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: <20200221171256.GB23476@blackbody.suse.cz> References: <20191219200718.15696-1-hannes@cmpxchg.org> <20191219200718.15696-4-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191219200718.15696-4-hannes@cmpxchg.org> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Thu, Dec 19, 2019 at 03:07:18PM -0500, Johannes Weiner wrote: > Unfortunately, this limitation makes it impossible to protect an > entire subtree from another without forcing the user to make explicit > protection allocations all the way to the leaf cgroups - something > that is highly undesirable in real life scenarios. I see that the jobs in descedant cgroups don't know (or care) what protection is above them and hence the implicit distribution is sensible here. However, the protection your case requires can already be reached thanks to the the hierachical capping and overcommit normalization -- you can set memory.low to "max" at all the non-caring descendants. IIUC, that is the same as setting zeroes (after your patch) and relying on the recursive distribution of unused protection -- or is there a mistake in my reasoning? So in my view, the recursive distribution doesn't bring anything new, however, its new semantics of memory.low doesn't allow turning the protection off in a protected subtree (delegating the decision to distribute protection within parent bounds is IMO a valid use case). Regards, Michal