Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300437
| Path | csiph.com!1.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!weretis.net!feeder1.news.weretis.net!news.szaf.org!fu-berlin.de!bofh.it!news.nic.it!robomod |
|---|---|
| From | Zefan Li <lizefan@huawei.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] cpuset: fix cpus_allowed mask for offline/online CPUs |
| Date | Mon, 04 Jan 2016 03:00:02 +0100 |
| Message-ID | <qN2Bc-4ZX-3@gated-at.bofh.it> (permalink) |
| References | <qM6GS-2hD-9@gated-at.bofh.it> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="gbk"; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Originating-IP | [10.177.19.236] |
| X-Cfilter-Loop | Reflected |
| X-Mirapoint-Virus-Rapid-Raw | score=unknown(0), refid=str=0001.0A020205.5689D05D.0060,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 |
| X-Mirapoint-Loop-ID | 070f4136cad77060ec738d5ea4802586 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 34 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | <linux-kernel@vger.kernel.org>, Vlastimil Babka <vbabka@suse.cz>, "Rik van Riel" <riel@redhat.com>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, David Rientjes <rientjes@google.com>, Vishnu Pratap Singh <vishnu.ps@samsung.com>, "Pintu Kumar" <pintu.k@samsung.com>, Michal Nazarewicz <mina86@mina86.com>, "Mel Gorman" <mgorman@suse.de>, Paul Gortmaker <paul.gortmaker@windriver.com>, Peter Zijlstra <peterz@infradead.org>, Tim Chen <tim.c.chen@linux.intel.com>, Hugh Dickins <hughd@google.com>, Tejun Heo <tj@kernel.org> |
| X-Original-Date | Mon, 4 Jan 2016 09:52:09 +0800 |
| X-Original-Message-ID | <5689D049.4040500@huawei.com> |
| X-Original-References | <2f805346f87680dddfa9253dc9031db3b6ead8ad.1451648318.git.yu.c.chen@intel.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1300437 |
Show key headers only | View raw
On 2016/1/1 20:09, Chen Yu wrote:
> Commit be4c9dd7aee5 ("cpuset: enable onlined cpu/node in effective masks")
> leverages cpuset's cpus_allowed and its parent's effective_cpus to calculate
> the new_cpus by:
>
> cpumask_and(&new_cpus, cs->cpus_allowed, parent_cs(cs)->effective_cpus);
>
> However cpus_allowed will also be updated after the CPU is offline, in
> hotplug_update_tasks_legacy, so when the CPU is online again, it will use
> the old cpus_allowed mask to calculate the new_cpus, thus new_cpus will get
> incorrect value after each round of offline/online.
>
> This problem is found on ubuntu 15.10 with cpuset mounted:
>
> 1. echo 0 > /sys/devices/system/cpu/cpu2/online
> 2. echo 1 > /sys/devices/system/cpu/cpu2/online
> 3. cat /sys/fs/cgroup/cpuset/cpuset.cpus
> 0-3
> 4. cat /sys/fs/cgroup/cpuset/user.slice/cpuset.cpus
> 0-1,3
> 5. taskset -c 2 ls
> taskset: failed to set pid 0's affinity: Invalid argument
>
This is the expected behavior...In legacy hierachy onlining an offlined cpu
won't restore cpuset configurations automatically.
Commit be4c9dd7aee5 changed this behavior, but only for unified hierachy.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] cpuset: fix cpus_allowed mask for offline/online CPUs Chen Yu <yu.c.chen@intel.com> - 2016-01-01 13:10 +0100
RE: [PATCH] cpuset: fix cpus_allowed mask for offline/online CPUs "Chen, Yu C" <yu.c.chen@intel.com> - 2016-01-01 13:10 +0100
Re: [PATCH] cpuset: fix cpus_allowed mask for offline/online CPUs Tejun Heo <tj@kernel.org> - 2016-01-03 15:00 +0100
Re: [PATCH] cpuset: fix cpus_allowed mask for offline/online CPUs Zefan Li <lizefan@huawei.com> - 2016-01-04 03:00 +0100
RE: [PATCH] cpuset: fix cpus_allowed mask for offline/online CPUs "Chen, Yu C" <yu.c.chen@intel.com> - 2016-01-04 03:20 +0100
Re: [PATCH] cpuset: fix cpus_allowed mask for offline/online CPUs Zefan Li <lizefan@huawei.com> - 2016-01-04 03:30 +0100
csiph-web