Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp326573imm; Thu, 31 May 2018 00:47:17 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLU1WK0LaeBzjG8K/nlCRlG/Ak2ZSUDQqNEuEioAujBbG+Md8C31XcpE0NTkWpaXJyZG702 X-Received: by 2002:a63:730c:: with SMTP id o12-v6mr4629205pgc.1.1527752837916; Thu, 31 May 2018 00:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527752837; cv=none; d=google.com; s=arc-20160816; b=sKvEd7nlH2DdFgkmsBdgyarWvxAMZbRiNlukeu3l4L0/2BWDtPZ4afeyyYsVlbGeyS ZufitYP7mPRhl7ptWqposPuVZY+JN3xaDvfezHfRgVPVubVkvpXmhbKq/NXBBzvbdR+v kxCS0nPSp3I91SW9gJdNaDF3Fj1dS4UPlAHW2nNiZZg3ovNjtKhkEPX84GKapsmY+1F/ ZZz+sMJoFoje3OWb5ApGIh0lWgaxFR7xu1joc3vXVLgkmlABxDoSlABbigniojSjmNVs NGdFwPzCFrYrf0xCc1MpK5AzP7iSi4AQ6SpGM/UE9LXwRyXPAOXybhaN1OP5yxUQYuI8 u0wA== 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=XlTMzILn0Av3tkqRGXlOme8cC2e2AclD2RKkn0lbL6c=; b=DPs1rtOx3Y/PC89Wwalg6mFwQFhw1GWjooZaRSo9ZLu5clyGHHBtqItuT9sZZpXvvb mDc2BFFvkORZceNlmZy4v8cjtkvMXSCQJU00DIWn0jzTtQVoev2DWFbK8n7VBfqDQGcW 8IexETLOhWvHzw9zekvMxnLexWAcTbII3NB1WT5ceX2LmVq30kVT0RDpfLblQVZDFEEI K2gGHrMsuKPhkiG7ZHECZbeUKXM+yAUARXYVZBo1KKZJN0ITci2aUWUXGBX0Sj1coV5T +5fY7lve9EZiQZM4CwC6o1U74httH4kQhMyY2JbtQhso6NZy66sWyG2LKHRLa43i+3pp NWoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=L4L/OGW0; 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 g5-v6si3053112pgp.91.2018.05.31.00.47.04; Thu, 31 May 2018 00:47:17 -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=L4L/OGW0; 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 S1754078AbeEaHnp (ORCPT + 99 others); Thu, 31 May 2018 03:43:45 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38250 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754035AbeEaHnk (ORCPT ); Thu, 31 May 2018 03:43:40 -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=XlTMzILn0Av3tkqRGXlOme8cC2e2AclD2RKkn0lbL6c=; b=L4L/OGW0isbfnpqqQt7FnhfE9 d//o+yzMLEZc1oBSnf1D9JDK7KAccn+oYyFZ6fnL8o24prW5TY8zZZvmM5YdICj5JmnGjlBNjgtcA wWvO9aaieM9arquFVp9isxr2I3WUIyYgnzZdADm82Yjvc9PzqqpMYbEskBPg4qHcrfe32raBXsdum H4kZeMbjEI29mUzROuHIu+TtpwW1Xd3wm8XaoXC1pygJ//KkfRllerWGH7okFo0kt1YXj0fn3+/4D /SL7jWd8qQsrEU+J7MEKs7jmIuMh4EI4hxMyIfK+xunt+eIyM0U3zXF8DOFy8PA7Qbvyb2hPLLQMW 3Hw4fbk7w==; 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 1fOIF7-0001Xr-PT; Thu, 31 May 2018 07:43:29 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 663F92029F86E; Thu, 31 May 2018 09:43:27 +0200 (CEST) Date: Thu, 31 May 2018 09:43:27 +0200 From: Peter Zijlstra To: Zefan Li Cc: Waiman Long , Tejun Heo , 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: <20180531074327.GD12180@hirez.programming.kicks-ass.net> References: <1527687991-1431-1-git-send-email-longman@redhat.com> <5B0F4F09.9050100@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5B0F4F09.9050100@huawei.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:25:29AM +0800, Zefan Li wrote: > Hi Waiman, > > On 2018/5/30 21:46, Waiman Long wrote: > > It was found that the cpuset.cpus could contain CPUs that are not listed > > in their parent's cpu list as shown by the command sequence below: > > > > # echo "+cpuset" >cgroup.subtree_control > > # mkdir g1 > > # echo 0-5 >g1/cpuset.cpus > > # mkdir g1/g11 > > # echo "+cpuset" > g1/cgroup.subtree_control > > # echo 6-11 >g1/g11/cpuset.cpus > > # grep -R . g1 | grep "\.cpus" > > g1/cpuset.cpus:0-5 > > g1/cpuset.cpus.effective:0-5 > > g1/g11/cpuset.cpus:6-11 > > g1/g11/cpuset.cpus.effective:0-5 > > > > As the intersection of g11's cpus and that of g1 is empty, the effective > > cpus of g11 is just that of g1. The check in update_cpumask() is now > > corrected to make sure that cpus in a child cpus must be a subset of > > its parent's cpus. The error "write error: Invalid argument" will now > > be reported in the above case. > > > > We made the distinction between user-configured CPUs and effective CPUs > in commit 7e88291beefbb758, so actually it's not a bug. Why though; that makes no sense what so ever.