Re: [PATCH v14 05/12] cpuset: Add an error state to cpuset.sched.partition

2018-11-07 Thread Waiman Long
On 11/06/2018 06:40 AM, Peter Zijlstra wrote: > On Mon, Oct 15, 2018 at 04:29:30PM -0400, Waiman Long wrote: >> +spin_lock_irq(&callback_lock); >> +clear_bit(CS_CPU_EXCLUSIVE, &cp->flags); >> +spin_unlock_irq(&callb

Re: [PATCH v14 05/12] cpuset: Add an error state to cpuset.sched.partition

2018-11-06 Thread Waiman Long
On 11/06/2018 06:37 AM, Peter Zijlstra wrote: > On Mon, Oct 15, 2018 at 04:29:30PM -0400, Waiman Long wrote: >> Handling error returned by update_parent_subparts_cpumask() in >> update_cpumasks_hier() is problematic as the states may become >> inconsistent. To avoid that and increase flexibility in

Re: [PATCH v14 05/12] cpuset: Add an error state to cpuset.sched.partition

2018-11-06 Thread Peter Zijlstra
On Mon, Oct 15, 2018 at 04:29:30PM -0400, Waiman Long wrote: > + case PRS_ENABLED: > + if (update_parent_subparts_cpumask(cp, > + partcmd_update, NULL, tmp)) > + update_tasks_cpum

Re: [PATCH v14 05/12] cpuset: Add an error state to cpuset.sched.partition

2018-11-06 Thread Peter Zijlstra
On Mon, Oct 15, 2018 at 04:29:30PM -0400, Waiman Long wrote: > + spin_lock_irq(&callback_lock); > + clear_bit(CS_CPU_EXCLUSIVE, &cp->flags); > + spin_unlock_irq(&callback_lock); A single atomic bitop wrapped in a s

Re: [PATCH v14 05/12] cpuset: Add an error state to cpuset.sched.partition

2018-11-06 Thread Peter Zijlstra
On Mon, Oct 15, 2018 at 04:29:30PM -0400, Waiman Long wrote: > Handling error returned by update_parent_subparts_cpumask() in > update_cpumasks_hier() is problematic as the states may become > inconsistent. To avoid that and increase flexibility in handling other > error cases, a new error state (-

[PATCH v14 05/12] cpuset: Add an error state to cpuset.sched.partition

2018-10-15 Thread Waiman Long
Handling error returned by update_parent_subparts_cpumask() in update_cpumasks_hier() is problematic as the states may become inconsistent. To avoid that and increase flexibility in handling other error cases, a new error state (-1) is added to the partition_root_state flag. This new error state is