Re: [PATCH v9 6/7] cgroup/cpuset: Update description of cpuset.cpus.partition in cgroup-v2.rst

From: Waiman Long
Date: Wed Dec 15 2021 - 13:55:39 EST


On 12/15/21 13:35, Tejun Heo wrote:
Hello, Waiman.

On Wed, Dec 15, 2021 at 01:16:43PM -0500, Waiman Long wrote:
Allowing direct transition from member to invalid partition doesn't feel
right for me. A casual user may assume a partition is correctly formed
without double checking the "cpuset.partition" value. Returning an error
will prevent this kind of issue. If returning more information about the
failure is the main reason for allowing the invalid partition transition, we
can extend the "cpuset.partition" read syntax to also show the reason for
the previous failure.
I don't think it's a good idea to display error messages without a way to
link the error to the one who triggered it. This is the same problem we had
with resettable counters. It only works for scenarios where one guy is
sitting in front of the computer but gets nastry for more complex scnearios
and automation.
Yes, I agree it is not a good way to handle this issue.

I understand that allowing transitions to invalid state can feel jarring.
There are pros and cons to both approaches. It's similar dynamics tho.
Erroring out may be more intuitive for a casual user but makes it harder for
more complex scenarios because whether a given operation errors or not is
dependent on external asynchronous states, there's no good way of reporting
the exact nature of the error or detecting when the operation would succeed
in the future, and the error conditions are rather arbitrary.

Thanks for the explanation. Yes, there are always pros and cons for different approach to a problem. I am not totally against allowing member to invalid partition transition. In that case, reading back "cpuset.partition" is a must to verify that it is really a success.

How about we allow transition to an invalid partition state but still return an error?

Regards,
Longman