From: Tejun Heo Date: Wed, 13 Mar 2013 23:51:35 +0000 (-0700) Subject: workqueue: implement and use pwq_adjust_max_active() X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~125^2~47 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=699ce097efe8f45bc5c055e4f12cb1e271c270d9;p=pandora-kernel.git workqueue: implement and use pwq_adjust_max_active() Rename pwq_set_max_active() to pwq_adjust_max_active() and move pool_workqueue->max_active synchronization and max_active determination logic into it. The new function should be called with workqueue_lock held for stable workqueue->saved_max_active, determines the current max_active value the target pool_workqueue should be using from @wq->saved_max_active and the state of the associated pool, and applies it with proper synchronization. The current two users - workqueue_set_max_active() and thaw_workqueues() - are updated accordingly. In addition, the manual freezing handling in __alloc_workqueue_key() and freeze_workqueues_begin() are replaced with calls to pwq_adjust_max_active(). This centralizes max_active handling so that it's less error-prone. Signed-off-by: Tejun Heo --- Reading git-diff-tree failed