On 03/27/2018 06:20 PM, Chengguang Xu wrote: >> Sent: Tuesday, March 27, 2018 at 9:58 PM >> From: "Tejun Heo" <tj@xxxxxxxxxx> >> To: "Chengguang Xu" <cgxu519@xxxxxxx> >> Cc: lizefan@xxxxxxxxxx, cgroups@xxxxxxxxxxxxxxx >> Subject: Re: [PATCH RFC] cpuset: change error code to -EPERM from -ENOSPC >> >> On Tue, Mar 27, 2018 at 06:02:24PM +0800, Chengguang Xu wrote: >>> When adding task to cpuset with empty cpus_allowed or empty mems_allowed, >>> there is an error with code -ENOSPC, it is a little bit confusing, >>> so change error code to -EPERM for better understanding. >>> >>> Signed-off-by: Chengguang Xu <cgxu519@xxxxxxx> >> >> I don't see why we'd change this or how EPERM is necessarily more >> intuitive here. > > After changing the error code, error message showed to user will change > from > > $ echo $$ > /sys/fs/cgroup/cpuset/2/tasks > -bash: echo: write error: No space left on device > > to > > $ echo $$ > /sys/fs/cgroup/cpuset/2/tasks > -bash: echo: write error: Operation not permitted > > Isn't it more understandable? IIUC, the logic here is for prohibiting attaching or > changing operations. I somewhat agree that "Operation not permitted" is a bit more meaningful. However this is something that has been in the kernel for a lot of years and changing it to another error message, that is also not the actual cause is not solving anyone's problems with this ;( The other thing is, that "Operation not permitted" may push the sysadmins in completely different search, like is it a SELinux related problem. Marian > > Thanks, > Chengguang. > -- > To unsubscribe from this list: send the line "unsubscribe cgroups" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Marian Marinov Co-founder & CTO of Kyup.com Jabber/GTalk: hackman@xxxxxxxxxx IRQ: 7556201 IRC: hackman @ irc.freenode.net Mobile: +359 886 660 270 -- To unsubscribe from this list: send the line "unsubscribe cgroups" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html