> 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. 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