Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755430Ab3CSNXf (ORCPT ); Tue, 19 Mar 2013 09:23:35 -0400 Received: from mail-oa0-f54.google.com ([209.85.219.54]:53250 "EHLO mail-oa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752947Ab3CSNXd (ORCPT ); Tue, 19 Mar 2013 09:23:33 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 19 Mar 2013 18:53:32 +0530 Message-ID: Subject: Re: [PATCH V3 3/7] workqueue: Add helpers to schedule work on any cpu From: Viresh Kumar To: pjt@google.com, paul.mckenney@linaro.org, tglx@linutronix.de, tj@kernel.org, mingo@redhat.com, peterz@infradead.org, rostedt@goodmis.org Cc: linaro-kernel@lists.linaro.org, robin.randhawa@arm.com, Steve.Bannister@arm.com, Liviu.Dudau@arm.com, charles.garcia-tobin@arm.com, Arvind.Chauhan@arm.com, linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org, Viresh Kumar Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1690 Lines: 41 On 19 March 2013 10:45, Viresh Kumar wrote: > On 18 March 2013 20:53, Viresh Kumar wrote: >> queue_work() queues work on current cpu. This may wake up an idle CPU, which is >> actually not required. >> >> Some of these works can be processed by any CPU and so we must select a non-idle >> CPU here. The initial idea was to modify implementation of queue_work(), but >> that may end up breaking lots of kernel code that would be a nightmare to debug. >> >> So, we finalized to adding new workqueue interfaces, for works that don't depend >> on a cpu to execute them. Another fixup: commit 8753c6d936faa6e3233cbf44a55913d05de05683 Author: Viresh Kumar Date: Tue Mar 19 18:50:59 2013 +0530 fixup! workqueue: Add helpers to schedule work on any cpu --- kernel/workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 68daf50..4e023ab 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1242,7 +1242,7 @@ retry: if (!(wq->flags & WQ_UNBOUND)) { if (cpu == WORK_CPU_UNBOUND) { if (on_any_cpu) - cpu = sched_select_non_idle_cpu(0); + cpu = sched_select_non_idle_cpu(); else cpu = raw_smp_processor_id(); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/