mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
Revert "workqueue: Override implicit ordered attribute in workqueue_apply_unbound_cpumask()"
commit aac8a59537dfc704ff344f1aacfd143c089ee20f upstream. This reverts commitca10d851b9
. The commit allowed workqueue_apply_unbound_cpumask() to clear __WQ_ORDERED on now removed implicitly ordered workqueues. This was incorrect in that system-wide config change shouldn't break ordering properties of all workqueues. The reason why apply_workqueue_attrs() path was allowed to do so was because it was targeting the specific workqueue - either the workqueue had WQ_SYSFS set or the workqueue user specifically tried to change max_active, both of which indicate that the workqueue doesn't need to be ordered. The implicitly ordered workqueue promotion was removed by the previous commit 3bc1e711c26b ("workqueue: Don't implicitly make UNBOUND workqueues w/ @max_active==1 ordered"). However, it didn't update this path and broke build. Let's revert the commit which was incorrect in the first place which also fixes build. Signed-off-by: Tejun Heo <tj@kernel.org> Fixes: 3bc1e711c26b ("workqueue: Don't implicitly make UNBOUND workqueues w/ @max_active==1 ordered") Fixes:ca10d851b9
("workqueue: Override implicit ordered attribute in workqueue_apply_unbound_cpumask()") Cc: stable@vger.kernel.org # v6.6+ Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d767929311
commit
5ad73e1056
1 changed files with 2 additions and 6 deletions
|
@ -5793,13 +5793,9 @@ static int workqueue_apply_unbound_cpumask(const cpumask_var_t unbound_cpumask)
|
|||
list_for_each_entry(wq, &workqueues, list) {
|
||||
if (!(wq->flags & WQ_UNBOUND))
|
||||
continue;
|
||||
|
||||
/* creating multiple pwqs breaks ordering guarantee */
|
||||
if (!list_empty(&wq->pwqs)) {
|
||||
if (wq->flags & __WQ_ORDERED_EXPLICIT)
|
||||
continue;
|
||||
wq->flags &= ~__WQ_ORDERED;
|
||||
}
|
||||
if (wq->flags & __WQ_ORDERED)
|
||||
continue;
|
||||
|
||||
ctx = apply_wqattrs_prepare(wq, wq->unbound_attrs, unbound_cpumask);
|
||||
if (IS_ERR(ctx)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue