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 966FDC35658 for ; Fri, 21 Feb 2020 17:13:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6D800222C4 for ; Fri, 21 Feb 2020 17:13:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728385AbgBURM7 (ORCPT ); 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal =?iso-8859-1?Q?Koutn=FD?= Subject: Re: [PATCH v2 3/3] mm: memcontrol: recursive memory.low protection Date: Fri, 21 Feb 2020 18:12:56 +0100 Message-ID: <20200221171256.GB23476@blackbody.suse.cz> References: <20191219200718.15696-1-hannes@cmpxchg.org> <20191219200718.15696-4-hannes@cmpxchg.org> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <20191219200718.15696-4-hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Johannes Weiner Cc: Andrew Morton , Roman Gushchin , Michal Hocko , Tejun Heo , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kernel-team-b10kYP2dOMg@public.gmane.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