From: Tejun Heo Subject: Re: [PATCH v4 2/6] cgroup/cpuset: Properly handle partition root tree Date: Thu, 12 Aug 2021 12:18:40 -1000 Message-ID: References: <20210811030607.13824-1-longman@redhat.com> <20210811030607.13824-3-longman@redhat.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8zFCvlCdjE9f7sPEj6Bash+YWPaS4lcq1GCfTDwodeA=; b=R4yXwtdcvocwR/bdi8p+iX4Ffhyp8BtxcPTMUe3KaMmMcL1xZcLE1vuGp3F+9TdP8s dcdiW38YxfL7HE1FEOsByI0q89D59M470EtczPWxls4gAKkZCVpWm8S3vtG+tqrudv5v iHMG81t3Qc0Sf6N8VvoQqo5NhBfUb2x7FUlnJf5rwedYdXxYmNIEuOzvCV1rwq3AEtvl nWr8FlzZzZHYpft+FuA/4H7fvr3ch3zOHKlg6zcM9pAw4l+fz+850kwswV+B/kfb17Uf FrCh5S5NxORAqyS3QZTWFqQLNdxbEZJQBLHr3ILpsZfUO/WxiNpSd0slQY8bifjFOZLP XVdQ== Sender: Tejun Heo Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Waiman Long Cc: Zefan Li , Johannes Weiner , Jonathan Corbet , Shuah Khan , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kselftest-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , Roman Gushchin , Phil Auld , Peter Zijlstra , Juri Lelli , Frederic Weisbecker , Marcelo Tosatti , Michal =?iso-8859-1?Q?Koutn=FD?= Hello, On Wed, Aug 11, 2021 at 03:27:20PM -0400, Waiman Long wrote: > Disabling partition at the parent level does invalidate all the child > partitions under it. So it must be done with care when we disable a > partition. > > How about we give some indication that a child partition exist when reading > cpuset.cpus.partition and recommend double-checking it before disabling a > partition? For example, we keep track of the number of cpus delegated to > child partitions. Perhaps we can list that information on read. > > With that information available, I have no objection to allow disabling a > parent partition with child partitions under it. This is a general problem which has always existed regardless of whether the errors are synchronous or not. There are many different reasons that a write to a cpuset interface file could fail and it has never been easy to tell why a given operation was rejected. Making error notifications asynchronous doesn't really change anything fundamental although it does make the situation a bit more opaque. I'm all for improving visibility. Now that we can consolidate most error states into a unified failure state, this might actually be easier to do. IOW, we now just have to explain why a given cgroup is in an invalid state rather than additionally having to explain why a given write has been rejected, which is pretty awkward to do as those failures are transient and local to the writer. So, if you wanna tackle this, let's do it right and provide something comprehensive rather than explaining just one failure. Thanks. -- tejun