On 04/28/2015 09:44 AM, Lai Jiangshan wrote: >>> >>> + /* save the user configured attrs */ >>> + cpumask_and(new_attrs->cpumask, attrs->cpumask, cpu_possible_mask); >> >> Wouldn't this make a lot more sense above when copying @attrs into >> @new_attrs? The comment there even says "make a copy of @attrs and >> sanitize it". Copy to @new_attrs, mask with wq_unbound_cpumask and >> fall back to wq_unbound_cpumask if empty.
We need to save the user original configured attrs. When any time wq_unbound_cpumask is changed, we should use the user original configured attrs (cpumask) to re-calculate the pwqs and avoid losing any information. > > It should be: > > + copy_workqueue_attrs(new_attrs, attrs); > + cpumask_and(new_attrs->cpumask, new_attrs->cpumask, cpu_possible_mask); > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/