X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=kernel%2Fworkqueue.c;h=5301935f609b7ea38f94b25d1c5863a92c354561;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=ee77ccd01d047c7f56124b721dde1a6b65aa62f1;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/kernel/workqueue.c b/kernel/workqueue.c index ee77ccd01..5301935f6 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -8,7 +8,7 @@ * * Derived from the taskqueue/keventd code by: * - * David Woodhouse + * David Woodhouse * Andrew Morton * Kai Petzke * Theodore Ts'o @@ -64,7 +64,7 @@ struct workqueue_struct { /* All the per-cpu workqueues on the system, for hotplug cpu to add/remove threads to each one as cpus come/go. */ -static spinlock_t workqueue_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(workqueue_lock); static LIST_HEAD(workqueues); /* If it's single threaded, it isn't in the list of workqueues. */ @@ -188,7 +188,7 @@ static int worker_thread(void *__cwq) current->flags |= PF_NOFREEZE; - set_user_nice(current, -10); + set_user_nice(current, -5); /* Block and flush all signals */ sigfillset(&blocked); @@ -485,8 +485,10 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, case CPU_ONLINE: /* Kick off worker threads. */ - list_for_each_entry(wq, &workqueues, list) + list_for_each_entry(wq, &workqueues, list) { + kthread_bind(wq->cpu_wq[hotcpu].thread, hotcpu); wake_up_process(wq->cpu_wq[hotcpu].thread); + } break; case CPU_UP_CANCELED: