Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp89157imm; Wed, 30 May 2018 18:27:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIuTOPzXe95b91k4TyWy+thfofQQ/7ndNv3Sh+k8MOhy5OtsJ7qNXv5RmBCAUH23FQM5+2I X-Received: by 2002:a65:44c3:: with SMTP id g3-v6mr3915769pgs.428.1527730071148; Wed, 30 May 2018 18:27:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527730071; cv=none; d=google.com; s=arc-20160816; b=oKob2QsusMb1xA+GiNRyldM4x37QOtLuOz3qGRg3Q62I6hf/STgR4PnMKgwh+qzHGS 1IUmUnZylEiRPqmrUOtNb4vbTNsU+AZ0TLwDHw26mdpYiA01OhbDipirp4ygCOuW5Xd0 hZo9MqZ2PhdQbPA2FGpq4BdoiIjKqYBZOD2GONAlmvDGwNrdfjns0zRzbayVIO2SNWnn UK6BYgnaEp5Ghbzkcndy1NAu+tNbXYVmklagAbgeS85kJsGL+Dl3dnGtLF/LGp5IZRWQ CFw0Gj1U49IG3J1+zpd7zyvyo08WAF4q/MQOc3fw0wEqmW9QpDbS5ZHMWTa65OgrRB0R 2nTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=wFm2LLCXbBem6Luw1TL9d03eVPTo4RKK14GYq/QaYek=; b=0s08kG+TXy95Bui4I048acFWB+b/gKiTDmqgPy5QUQG8H9brSYJBgqtWJb6CqqNcGs lRMDV3JJY3Blg/xfx5jI3vwZkSZgUZ3HvbtDG72Rx93Dq6NrjldifC6LbS0GLoMwaqUM ysVPnpb/LPitM5YNzUuiU6nFRyWyTpFl1R3U4imquY5zBJZq4rAr5IHWcaj7KQDNylHi sxC3SRQPy3VIN3oCYXPfJ5CwLeMPpKFsKj8fSv4utk1Ztmquzuxll+J83XSLmFkahF0D 2HZuxo97xNNG7cZGnfJCDHCXI3ldm5NfattatG/kLR8L5JMwK5OJMmsPSHuD/eDa7jFI kubw== ARC-Authentication-Results: i=1; mx.google.com; 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 83-v6si921336pfu.274.2018.05.30.18.27.37; Wed, 30 May 2018 18:27:51 -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; 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 S932654AbeEaB0C (ORCPT + 99 others); Wed, 30 May 2018 21:26:02 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:37168 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932563AbeEaB0A (ORCPT ); Wed, 30 May 2018 21:26:00 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 65231DBD8DDD9; Thu, 31 May 2018 09:25:56 +0800 (CST) Received: from [10.177.19.236] (10.177.19.236) by smtp.huawei.com (10.3.19.212) with Microsoft SMTP Server (TLS) id 14.3.382.0; Thu, 31 May 2018 09:25:55 +0800 Subject: Re: [PATCH] cpuset: Enforce that a child's cpus must be a subset of the parent To: Waiman Long , Tejun Heo , "Johannes Weiner" , Peter Zijlstra , "Ingo Molnar" References: <1527687991-1431-1-git-send-email-longman@redhat.com> CC: , , , , , , Mike Galbraith , , Roman Gushchin , Juri Lelli , Patrick Bellasi From: Zefan Li X-Enigmail-Draft-Status: N1110 Message-ID: <5B0F4F09.9050100@huawei.com> Date: Thu, 31 May 2018 09:25:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1527687991-1431-1-git-send-email-longman@redhat.com> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.19.236] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.