Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp805281imm; Thu, 31 May 2018 09:40:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKECUjVbt30Eko+zKNXNRG+ywAh5ArMk8761mapYZDip5p/goe5xcZpRdEosV9Er1vc20AI X-Received: by 2002:a62:c45a:: with SMTP id y87-v6mr7579776pff.190.1527784832039; Thu, 31 May 2018 09:40:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527784832; cv=none; d=google.com; s=arc-20160816; b=Mi0lueWzEINiATZkhV/z2f6JowvhqvtS5k0OVTVZ/hKeNCkH8jBVQfj32NQvfQ2/Tz KCGZRnftBni+n4znVmJRsr/oIOMSRT1wsSMw35XoiuUmTiYDgQI0RSetkSXXQKgs1tG7 CVTCEQdItTcgXkDBq54t214zJAt7qhPD/Q6RT0gF67WQmHxFHOZYCedQugX0YT0TOGn3 BiDmK1muz4GXTRvc4aCXlV0VG1tUPO/wOAATB6X5q5YoeVrvQoDEnS8PscUo4X/BbHNR ix6upatayyC7bVFcDMZCdP3O2isHWJMzytdf+b2oSLjIxfQo9ldyPP7t33Q3nPmaUku2 N8Sw== 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=4rK4IzXCiPVSROPJKAT+5rH4BeY0bOW4blMqoXnQbuc=; b=ZBMXKUMNveBa7viC3DFMJ+TCk7b2J32a7FfxNyWPp8DlU/8O3ShfbA8Ag/LF20Wm7d bLkLlNx2lGx+CdfTP5BYnnvsxyqrktXzvzrNpF5RnqjSwTKLwkhO6L5RohjTcNmBk4ZU zdMjOQulbJW38i+T9yCb8fvz+0p9sEFZUNWr3zVWSzsSSUEsnUhOPH1/fRVH/7A7tP2W m4msfXPA63+/FvFYjfQU0dPtNRoahcNO15dFXIpzBgiGnuPNdenHW2+3Yunjcoy3Nah9 a3m9Is7R2mUQVSYiab+tqJ/yoXW6x+C4Qs5P++uyuVA8zwd8Zd2TTQf/Ldi0iZqg+6FS 3QjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=nMuWzVE4; 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 m3-v6si29266074pgc.229.2018.05.31.09.40.17; Thu, 31 May 2018 09:40:32 -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=bombadil.20170209 header.b=nMuWzVE4; 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 S1755688AbeEaQik (ORCPT + 99 others); Thu, 31 May 2018 12:38:40 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:52284 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755562AbeEaQii (ORCPT ); Thu, 31 May 2018 12:38:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=4rK4IzXCiPVSROPJKAT+5rH4BeY0bOW4blMqoXnQbuc=; b=nMuWzVE4wnl5a6kjxd2/7Duzj QWnd8TCfhKaVdIxkGeykVz12bVapDyM17O4Bm13UjK5meBFEy/I3sbEhxDnOdfBx+XrmKBfDIaJbG zYdcFOwLfi49C5cr86FwBbM0yEyaq4EtjXjTSnDhTCt56zcmjlfNVuCzBBd+VBE8rbHQHua9D27XZ k3hLSjsOyl8aHeaOhu/eqT1lV4FsP90JNbL0z+ivGrEtGzcBSiQcKVaXh03iEUhcLbgJpaOa5A3Ws xE7A3a46mEwqk7RdrCqQz3pY/S5lOenjFwdMaAW4kVW5akLpRoO67YZ864j5w+6xX8lsZh3B1wGhg nDZnDAEGQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOQap-0007Zv-UD; Thu, 31 May 2018 16:38:28 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 44484201EA7A0; Thu, 31 May 2018 18:38:26 +0200 (CEST) Date: Thu, 31 May 2018 18:38:26 +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: <20180531163826.GO12180@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> <20180531161645.GN12180@hirez.programming.kicks-ass.net> <20180531161942.GW1351649@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180531161942.GW1351649@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 09:19:42AM -0700, Tejun Heo wrote: > Hello, > > On Thu, May 31, 2018 at 06:16:45PM +0200, Peter Zijlstra wrote: > > > So, let's please stay away from it even if that means a bit of > > > overhead in terms of interface. > > > > Urgh, that again :/ > > Yeah, well, it's pretty important. > > > 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. > > That's really messy and if you delegated away a subtree, you can't > walk the subtree in a race free way, not easily anyway. Messy perhaps, but taking away resources you gave out earlier isn't particularly nice either way around. Not sure the races matter, if you win, the delegate can't undo it, if you loose, you try again until you win. It's not like cgroup stuff gets changed often, so a conflict causing you to loose should be very rare indeed. > > 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. > > Yeah, for cpuset, it's messier, but it isn't different from hotunplug > scenario, right? I think the best we can do there is putting ancestor > operation on an equal footing as hotplug ops. Right, but hotplug is exceedingly rare, while I get the impression you think it is perfectly fine to recind on your resource grants.