Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2120111ybv; Fri, 21 Feb 2020 09:14:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyvdCZEKL8XOhxSQ4Nsa5aeLv9ZSq6bQRtydMrFMIFBwtcjtkOEdD9sWKeEPCtiUH4ubO/l X-Received: by 2002:a54:4003:: with SMTP id x3mr2742468oie.0.1582305263354; Fri, 21 Feb 2020 09:14:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582305263; cv=none; d=google.com; s=arc-20160816; b=CH74M3tNJDtEouwOAc4mXYMDj7Z51Olg+FLZRQwAeYyHobDyurT62EHxH9rRMfxxu1 /qTh8JegX4GI8ntwPujeIiXRSVc45/fHClLvxVr3L0qKKJ9pcMLpm+Orf3Pfe4Z7DeDb gX1TsUYcPtbQOH9PWfPzfF0JQyLB/o2wosJ+77E4phUWoYg6dSiYtF2LNCIR+mXmCYgo iIZMUbP1dYZUOEWRLbs3BRR5NrA2mc3IyISGFnEab/RAIbIKLb6iMug5bte2mKzcRlq7 /YTYuZZfJbSEnAjKc6Kx6tkhmf76iXjN6DlDCZbnNH4xajzOp/WiBsvc9yyUsWBXGH7o IhAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=gCVFaMHwNLwwhKGKis7Ie8JIEQEFCYsimGCdloS4lTY=; b=RvZFohw0iVA1JyHDqYmRk6UiW9ZIFTQjcg1SCS3hG0G1XkIKZsukLZ8XINLE5MsAzD CbnrrkmI3WUi06daLACYXrG/+qbVey7YU3PbjNOQ5mKTcvrDH3AOuBlBDrAeTYp4zsOz upqL6sukZU6dKEtC5G95NJbcf5P5LGgEApT4yppGSng9G++mxK4rHZoGu5YGU9amFDtW I8L+JxHoQIhtIcUTV1QFj57qnghzxgyHl9mU6y33kYQRstR1wUAT9s9K6/ssGtjTACty Vq6TZk8ja+lD3zQYDc97KrBIq4OU1aOpwR02BAw52VJFpkPZdd9pcZDUocbWwTjhhxZp 0aCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11si1085861oim.223.2020.02.21.09.14.10; Fri, 21 Feb 2020 09:14:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728176AbgBURM7 (ORCPT + 99 others); Fri, 21 Feb 2020 12:12:59 -0500 Received: from mx2.suse.de ([195.135.220.15]:39640 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725957AbgBURM6 (ORCPT ); Fri, 21 Feb 2020 12:12:58 -0500 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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