[PATCH 2/2 V3] workqueue: simple refactor pwq_adjust_max_active()

2014-04-21 Thread Lai Jiangshan
Caculate the value(max_active) for pwq->max_active earlier. Fast exit for max_active is not changed. "if (!freezable && pwq->max_active == wq->saved_max_active)" is hardly hit after __WQ_FREEZING was introduced. So we change the exit-condition to a more possible condition.

[PATCH 2/2 V3] workqueue: simple refactor pwq_adjust_max_active()

2014-04-21 Thread Lai Jiangshan
Caculate the value(max_active) for pwq-max_active earlier. Fast exit for max_active is not changed. if (!freezable pwq-max_active == wq-saved_max_active) is hardly hit after __WQ_FREEZING was introduced. So we change the exit-condition to a more possible condition.