From patchwork Sun Mar 31 14:31:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 15783 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DF56C23E33 for ; Sun, 31 Mar 2013 14:32:17 +0000 (UTC) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by fiordland.canonical.com (Postfix) with ESMTP id 815A7A194C9 for ; Sun, 31 Mar 2013 14:32:17 +0000 (UTC) Received: by mail-ve0-f176.google.com with SMTP id ox1so1785619veb.7 for ; Sun, 31 Mar 2013 07:32:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references:x-gm-message-state; bh=hb64zoIHTOkFHvoXcsvRG+kAcA27PDMwJkdhq4uPank=; b=VBrEolork9meOi28JqcgRhY+zKFue0pApi5D0jUxO8a1VzGsOcOT1R9/Evl+qkHFzE siL040zvt4xeGUd8ZFOE0xAYNMBPyRJRugxfozlC8fTVzql5eO5U4FFq6Ge8vYCFcu7+ PT2CbeK1pQUec3UBhyFq80cW9SHPj/+dAqq44Sw6bDGyPaNM3qJMk5kJ8JYTmmYxyENJ vaZwO6Nw3XlwfcEkJT+e+PObyNXvT5w4yEuZG3OHElaW6WPCzf9uCBE/D5j+UWk4DrkO C94dcL/AstWXGziBc68mH7u0WBN7VmAXUG1xhO1FIrUAEr0spsdEWIjKry60tAVoAQLN e1wg== X-Received: by 10.52.31.103 with SMTP id z7mr5791563vdh.56.1364740337019; Sun, 31 Mar 2013 07:32:17 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.59.4.204 with SMTP id cg12csp51847ved; Sun, 31 Mar 2013 07:32:16 -0700 (PDT) X-Received: by 10.66.222.67 with SMTP id qk3mr14298086pac.27.1364740336103; Sun, 31 Mar 2013 07:32:16 -0700 (PDT) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by mx.google.com with ESMTPS id aj10si10153011pbd.75.2013.03.31.07.32.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 31 Mar 2013 07:32:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.173 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.173; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.192.173 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) smtp.mail=viresh.kumar@linaro.org Received: by mail-pd0-f173.google.com with SMTP id v10so853265pde.32 for ; Sun, 31 Mar 2013 07:32:15 -0700 (PDT) X-Received: by 10.68.129.197 with SMTP id ny5mr13636750pbb.110.1364740335723; Sun, 31 Mar 2013 07:32:15 -0700 (PDT) Received: from localhost ([122.167.73.68]) by mx.google.com with ESMTPS id i9sm11417937paa.7.2013.03.31.07.32.09 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 31 Mar 2013 07:32:15 -0700 (PDT) From: Viresh Kumar To: tj@kernel.org Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, robin.randhawa@arm.com, Steve.Bannister@arm.com, Liviu.Dudau@arm.com, charles.garcia-tobin@arm.com, arvind.chauhan@arm.com, davem@davemloft.net, airlied@redhat.com, axboe@kernel.dk, tglx@linutronix.de, peterz@infradead.org, mingo@redhat.com, rostedt@goodmis.org, linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH V4 1/4] workqueue: Add system wide system_freezable_unbound_wq Date: Sun, 31 Mar 2013 20:01:44 +0530 Message-Id: <147bfb5aa81790f94df75858bf20570cbacc9dca.1364740180.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQkBXBQz1qBRqR/4JdvjxNlHWH0IU0rMllpdqU3SAJ7Rdy9xeaxLe74UINh7Zq61Dk6v7+ob This patch adds system wide system_freezable_unbound_wq which will be used by code that currently uses system_freezable_wq and can be moved to unbound workqueues. Signed-off-by: Viresh Kumar --- include/linux/workqueue.h | 4 ++++ kernel/workqueue.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 835d12b..ab7597b 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -325,11 +325,15 @@ enum { * * system_freezable_wq is equivalent to system_wq except that it's * freezable. + * + * system_freezable_unbound_wq is equivalent to system_unbound_wq except that + * it's freezable. */ extern struct workqueue_struct *system_wq; extern struct workqueue_struct *system_long_wq; extern struct workqueue_struct *system_unbound_wq; extern struct workqueue_struct *system_freezable_wq; +extern struct workqueue_struct *system_freezable_unbound_wq; static inline struct workqueue_struct * __deprecated __system_nrt_wq(void) { diff --git a/kernel/workqueue.c b/kernel/workqueue.c index df2f6c4..771a5cc 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -281,6 +281,8 @@ struct workqueue_struct *system_unbound_wq __read_mostly; EXPORT_SYMBOL_GPL(system_unbound_wq); struct workqueue_struct *system_freezable_wq __read_mostly; EXPORT_SYMBOL_GPL(system_freezable_wq); +struct workqueue_struct *system_freezable_unbound_wq __read_mostly; +EXPORT_SYMBOL_GPL(system_freezable_unbound_wq); static int worker_thread(void *__worker); static void copy_workqueue_attrs(struct workqueue_attrs *to, @@ -4467,8 +4469,11 @@ static int __init init_workqueues(void) WQ_UNBOUND_MAX_ACTIVE); system_freezable_wq = alloc_workqueue("events_freezable", WQ_FREEZABLE, 0); + system_freezable_unbound_wq = alloc_workqueue("events_unbound_freezable", + WQ_FREEZABLE | WQ_UNBOUND, 0); BUG_ON(!system_wq || !system_highpri_wq || !system_long_wq || - !system_unbound_wq || !system_freezable_wq); + !system_unbound_wq || !system_freezable_wq || + !system_freezable_unbound_wq); return 0; } early_initcall(init_workqueues);