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 1FEC7C2BA83 for ; Fri, 14 Feb 2020 15:13:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D9B9C24650 for ; Fri, 14 Feb 2020 15:13:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9B9C24650 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 7A5EA6B0632; Fri, 14 Feb 2020 10:13:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 731D26B0633; Fri, 14 Feb 2020 10:13:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5F71B6B0634; Fri, 14 Feb 2020 10:13:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0227.hostedemail.com [216.40.44.227]) by kanga.kvack.org (Postfix) with ESMTP id 43E456B0632 for ; Fri, 14 Feb 2020 10:13:23 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D90AD180ACC20 for ; Fri, 14 Feb 2020 15:13:22 +0000 (UTC) X-FDA: 76489076244.10.bike46_1d6b895997c2a X-HE-Tag: bike46_1d6b895997c2a X-Filterd-Recvd-Size: 4403 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Fri, 14 Feb 2020 15:13:21 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id c84so11000097wme.4 for ; Fri, 14 Feb 2020 07:13:21 -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=Do7bMdbDxyWMTf+bB896rP3/6/in5BnwlBFvOvluDwA=; b=bjqw40wXIDraDlsVIyFgpq2PDDeJLNpD6dZ5sGe+X096/yB7X37bCFSjt12b4N1uUv 20xe16wdlhZxFe5WSKYodv/kGGx5TWpOIaMWdSlIkpyTOoAar6FVh8wWUEwvoID6ZzLz +ruWh5vf6zJ8d2NXsd0CJgLD942Jr9yPt/4+LMx7F6j0GQgUUePskznEOBpicorXshVV vmxJ7WnXQkqkv850YTiG1AJqTsjGtdbeUAhXd9xaGjLrBGX3Y5IL7O5DvQfROT9thtbw WmNWaHNCzyzS8THFyilHjdrmLRjYssGQIDPqh45R07tR0Rrl91OYV6yLIEEPJ4GE6wez j7Ig== X-Gm-Message-State: APjAAAWAgnfFEO2lqzisgjP5aUpD1IDU4aBJfGZTvhNJAlD+Yy3PRFDK JdQeS7HfuXslVnv44r8FzDI= X-Google-Smtp-Source: APXvYqxPMMiHlWFZwSS5rM0sxEQJzouyr//JBs6IBwyeuIYvbkKF3lHeFOsExNeUuWAhtyOYH4XkUQ== X-Received: by 2002:a1c:7907:: with SMTP id l7mr5024508wme.37.1581693200934; Fri, 14 Feb 2020 07:13:20 -0800 (PST) Received: from localhost (ip-37-188-133-87.eurotel.cz. [37.188.133.87]) by smtp.gmail.com with ESMTPSA id x21sm7205302wmi.30.2020.02.14.07.13.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 07:13:19 -0800 (PST) Date: Fri, 14 Feb 2020 16:13:18 +0100 From: Michal Hocko To: Tejun Heo Cc: Johannes Weiner , 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: <20200214151318.GC31689@dhcp22.suse.cz> References: <20200211164753.GQ10636@dhcp22.suse.cz> <20200212170826.GC180867@cmpxchg.org> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200214135728.GK88887@mtj.thefacebook.com> 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 08:57:28, Tejun Heo wrote: [...] Sorry to skip over a large part of your response. The discussion in this thread got quite fragmented already and I would really like to conclude to something. > > I believe I have already expressed the configurability concern elsewhere > > in the email thread. It boils down to necessity to propagate > > protection all the way up the hierarchy properly if you really need to > > protect leaf cgroups that are organized without a resource control in > > mind. Which is what systemd does. > > But that doesn't work for other controllers at all. I'm having a > difficult time imagining how making this one control mechanism work > that way makes sense. Memory protection has to be configured together > with IO protection to be actually effective. Please be more specific. If the protected workload is mostly in-memory, I do not really see how IO controller is relevant. See the example of the DB setup I've mentioned elsewhere. > As for cgroup hierarchy being unrelated to how controllers behave, it > frankly reminds me of cgroup1 memcg flat hierarchy thing I'm not sure > how that would actually work in terms of resource isolation. Also, I'm > not sure how systemd forces such configurations and I'd think systemd > folks would be happy to fix them if there are such problems. Is the > point you're trying to make "because of systemd, we have to contort > how memory controller behaves"? No, I am just saying and as explained in reply to Johannes, there are practical cases where the cgroup hierarchy reflects organizational structure as well. -- Michal Hocko SUSE Labs