Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp783540imm; Thu, 31 May 2018 09:18:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJlMyd0GT0McoDDjoBgkyGKXxx3HgHdxzLmkbFsvjTwlsMD6BHNFJvMRmQ0QN5HA6/emgUO X-Received: by 2002:a62:418b:: with SMTP id g11-v6mr7429940pfd.51.1527783526919; Thu, 31 May 2018 09:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527783526; cv=none; d=google.com; s=arc-20160816; b=WxH8+ztnlRofStIL0x5L9sZ2w4wi/UbXAjiiNTCGj976t045TX5QAR8A+csIxlYZHv amHRpT0JOMmn0x7vvi7GppWnB2n+9Mj+yrA2gqktqBJ28bF2N4ud9UVLWKIjW4zjt10V bVhsmI0HZEVh9VanaxCguTcxXMUhz/Z39kD7lrUjEORm/2bWh4znQIvNOThzWBy3LRpn 4MSBucX7hL9Ciiev/o0Sws0YZDYOxxLv4J9hVWBRNrtqzs/PH2UpYOYTUnlO1ioXDPsJ DloWBknuGjN7EYricVNpfsk59Inu5Qmd46JjU13U/jsk9QIHzZE9vLPh4RgF1c9+Y6lx +8lQ== 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:dkim-signature:arc-authentication-results; bh=cdKVbvwESEXqP4Z0cikNCkhJRxALessOYY6fqwrdu2o=; b=wm/6Ho6xPGlz7KFQCyo3rJIpS3011MF/a3mh8iMJKiH/Ku3w9AVNmrf73/UpXLcUuY W97ASCt9X575NdrduebqgW+JEr4DbObG9EHRZGGQ/KQ1KEqcd7glT8Xz/LZe9cns8bFR +f/UmU5vpQOfg7TxpO5urMX/8S/hMx3uMNLprR+twN/NOwaub5oq2N981wDxePYMQ+le 6v5SgA3iCp4/+QDPxQhwwpxoxbZls3RyB+4CdTVJVxlcsXzm/eXF43e3eGCLZIPnMg3m 1kRGA7zupPclMiJy6mUwl2+kU5p1l1LAzIUDTms4zovVh1qe83lwhk0QSjTCQD01wKqU JbBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Sv9E44yI; 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 r126-v6si38516830pfc.202.2018.05.31.09.18.33; Thu, 31 May 2018 09:18:46 -0700 (PDT) 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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Sv9E44yI; 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 S1755640AbeEaQRJ (ORCPT + 99 others); Thu, 31 May 2018 12:17:09 -0400 Received: from merlin.infradead.org ([205.233.59.134]:43122 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755456AbeEaQRG (ORCPT ); Thu, 31 May 2018 12:17:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=cdKVbvwESEXqP4Z0cikNCkhJRxALessOYY6fqwrdu2o=; b=Sv9E44yIj2uMOYQFtr/xm4YST /ErnlDx/I4MwIBL+C8g5boMAVuP0z5wsvrmcoONjM8ZxuuBLJvuwjwavAfJaUDosrqQWqLSjNXt5T 6LbJUHWTEbUxBqNMJNAtx9qtNoReys8L9YuY7e2av9WJP4nZpYf+p6PjclZwKiAxD91cqliUiDo8m v2100NTvStt1k1svewEGPhwu0dSimuTNEjKB8orR2wZI3SMAsc743zDVk8BEKjb5j1CPdub+1BBC0 VjfH/FuuZZJxeCNle2Wd2hLQptSC5e0p1SJRtSG3xG7OIvx8TL2m8TQqS/kJufXSb9Z7qaX+nWzyM tsOkMw0VA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOQFr-0007EO-GZ; Thu, 31 May 2018 16:16:47 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C232B2029F86E; Thu, 31 May 2018 18:16:45 +0200 (CEST) Date: Thu, 31 May 2018 18:16:45 +0200 From: Peter Zijlstra To: Tejun Heo Cc: Waiman Long , Zefan Li , Johannes Weiner , Ingo Molnar , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kernel-team@fb.com, pjt@google.com, luto@amacapital.net, Mike Galbraith , torvalds@linux-foundation.org, Roman Gushchin , Juri Lelli , Patrick Bellasi Subject: Re: [PATCH] cpuset: Enforce that a child's cpus must be a subset of the parent Message-ID: <20180531161645.GN12180@hirez.programming.kicks-ass.net> References: <1527687991-1431-1-git-send-email-longman@redhat.com> <5B0F4F09.9050100@huawei.com> <5B0FAE72.1090204@huawei.com> <20180531082613.GF12180@hirez.programming.kicks-ass.net> <5B0FB58C.9030705@huawei.com> <4dc718bc-4bd5-4998-853b-9c6ba67b89a0@redhat.com> <20180531155807.GU1351649@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180531155807.GU1351649@devbig577.frc2.facebook.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 31, 2018 at 08:58:07AM -0700, Tejun Heo wrote: > Tying together what's configured and what's applied may feel > attractive on the surface but it's a long term headache. > > * It's inconsistent with what other controllers are doing. All the > limit resource configs declare the upper bound the specific cgroup > can consume regardless of what's actually available to it. They > limit but don't guarantee access. > > * Which decouples a given cgroup's configurations from its ancestors', > which allows an ancestor to take away resources that it granted > before and then also giving it back later. No matter what you do, > if you couple configs of cgroup hierarchy, you end up restricting > what an ancestor can do to its sub-hierarchy, which can quickly > become a difficult operational headache. > > So, let's please stay away from it even if that means a bit of > overhead in terms of interface. Urgh, that again :/ I'm still not convinced by your arguments though. The root container can access all the sub-groups anyway and can grub around in them to take away resources if it really wants to. For cpuset in particular randomly restricting on the ancestor level can create an unrecoverable trainwreck inside a container. Affinities are not recoverable. Once a runnable task ends up with an empty set, its affinities are reset and the smaller (empty) set is lost.