From: Tejun Heo Date: Tue, 29 Jun 2010 08:07:12 +0000 (+0200) Subject: workqueue: reimplement workqueue freeze using max_active X-Git-Tag: v2.6.36-rc1~506^2~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0a1a5fd4fb15ec61117c759fe9f5c16c53d9e9c;p=pandora-kernel.git workqueue: reimplement workqueue freeze using max_active Currently, workqueue freezing is implemented by marking the worker freezeable and calling try_to_freeze() from dispatch loop. Reimplement it using cwq->limit so that the workqueue is frozen instead of the worker. * workqueue_struct->saved_max_active is added which stores the specified max_active on initialization. * On freeze, all cwq->max_active's are quenched to zero. Freezing is complete when nr_active on all cwqs reach zero. * On thaw, all cwq->max_active's are restored to wq->saved_max_active and the worklist is repopulated. This new implementation allows having single shared pool of workers per cpu. Signed-off-by: Tejun Heo --- Reading git-diff-tree failed