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 C20D9C7619B for ; Mon, 17 Feb 2020 08:41:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 732322064C for ; Mon, 17 Feb 2020 08:41:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 732322064C 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 CC72A6B0005; Mon, 17 Feb 2020 03:41:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C77896B0006; Mon, 17 Feb 2020 03:41:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B67616B0007; Mon, 17 Feb 2020 03:41:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0061.hostedemail.com [216.40.44.61]) by kanga.kvack.org (Postfix) with ESMTP id 9B3A36B0005 for ; Mon, 17 Feb 2020 03:41:03 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 39BD51EFD for ; Mon, 17 Feb 2020 08:41:03 +0000 (UTC) X-FDA: 76498974006.28.song95_7d90536197250 X-HE-Tag: song95_7d90536197250 X-Filterd-Recvd-Size: 4276 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Mon, 17 Feb 2020 08:41:02 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id n10so16603485wrm.1 for ; Mon, 17 Feb 2020 00:41:02 -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=zIh2zhz3CHyVtr/v+YhufdsnrhLZdkCerv8N1UqU7iM=; b=oGZnlIS4jCSz8clpPiZ8rR+Q2+PEKN2SpNArxAB0Ucx9Ml2C6D/T2guU0ajh2QP4cS noJokdgJgIStAnWp2DR+FlholPHDJesJ7RyWLnE+BFmguOtz0S0B/kf4EMjEYXF6Lp39 ER/yI+yiZ5Mm8AmCLUNjfrgHcT6cqm808gUxSXLImnvJ1lTTnRz/dISsIfEMtc7bcGSZ E1il1X8OGQNmrEmZfeUB0d9G1q3OzuY9lLSs9gTiIfrIIRNG4kYOjfQ5vqqspw0u4NXC TZI5j6NZNxNOICmt+gjFpGQxXwXdkKfaJXI0MObSUnzxlupBIvUbgb3HaYuQqOr/gtvA C8DQ== X-Gm-Message-State: APjAAAUJAIFtZjYiPMVqSQFGPx+sMKQyVw4jYEtrqjKCg0HvmZuK16kG ol8Zw8Sz+97OKPLLLDieudA= X-Google-Smtp-Source: APXvYqx4ghozQg++2LcYQHN1snAHGQw9ZFb1v26OtMo76BDIcJJ0q9/Fws6c9SkGN+jyTTJGoG3/2g== X-Received: by 2002:a5d:5188:: with SMTP id k8mr20715997wrv.151.1581928861612; Mon, 17 Feb 2020 00:41:01 -0800 (PST) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id n3sm19377966wrs.8.2020.02.17.00.41.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 00:41:00 -0800 (PST) Date: Mon, 17 Feb 2020 09:41:00 +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: <20200217084100.GE31531@dhcp22.suse.cz> References: <20200213074049.GA31689@dhcp22.suse.cz> <20200213135348.GF88887@mtj.thefacebook.com> <20200213154731.GE31689@dhcp22.suse.cz> <20200213155249.GI88887@mtj.thefacebook.com> <20200213163636.GH31689@dhcp22.suse.cz> <20200213165711.GJ88887@mtj.thefacebook.com> <20200214071537.GL31689@dhcp22.suse.cz> <20200214135728.GK88887@mtj.thefacebook.com> <20200214151318.GC31689@dhcp22.suse.cz> <20200214165311.GA253674@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200214165311.GA253674@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 Fri 14-02-20 11:53:11, Johannes Weiner wrote: [...] > The proper solution to implement the kind of resource hierarchy you > want to express in cgroup2 is to reflect it in the cgroup tree. Yes, > the_workload might have been started by user 100 in session c2, but in > terms of resources, it's prioritized over system.slice and user.slice, > and so that's the level where it needs to sit: > > root > / | \ > system.slice user.slice the_workload > / | | > cron journal user-100.slice > | > session-c2.scope > | > misc > > Then you can configure not just memory.low, but also a proper io > weight and a cpu weight. And the tree correctly reflects where the > workload is in the pecking order of who gets access to resources. I have already mentioned that this would be the only solution when the protection would work, right. But I am also saying that this a trivial example where you simply _can_ move your workload to the 1st level. What about those that need to reflect organization into the hierarchy. Please have a look at http://lkml.kernel.org/r/20200214075916.GM31689@dhcp22.suse.cz Are you saying they are just not supported? Are they supposed to use cgroup v1 for the organization and v2 for the resource control? -- Michal Hocko SUSE Labs