From: Tejun Heo <tj@kernel.org>
To: Viresh Kumar <viresh.kumar@linaro.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
Subject: Re: [PATCH V4 3/4] block: queue work on unbound wq
Date: Tue, 9 Apr 2013 11:30:20 -0700 [thread overview]
Message-ID: <20130409183020.GD6186@mtj.dyndns.org> (raw)
In-Reply-To: <CAKohpomGSkz6_YqDzaTYEsJfVmcg2=TvdgquWqTvd-nmtOmoaQ@mail.gmail.com>
Yo!
On Tue, Apr 09, 2013 at 01:00:59PM +0530, Viresh Kumar wrote:
> + workqueue.power_efficient
> + Workqueues can be performance or power oriented. For
> + performance we may want to keep them running on a single
> + cpu, so that it remains cache hot. For power we can give
> + scheduler the liberty to choose target cpu for running
> + work handler.
> +
> + Later one (Power oriented WQ) can be achieved if the
> + workqueue is allocated with WQ_UNBOUND flag. Enabling
> + power_efficient boot param will convert
> + WQ_POWER_EFFICIENT flag to WQ_UNBOUND on wq allocation.
> + This requires CONFIG_WQ_POWER_EFFICIENT to be enabled.
> + WQ_POWER_EFFICIENT is unused if power_efficient is not
> + set in boot params.
Looks mostly good to me but I think it'd be better if the parameter
name is a bit more specific.
> @@ -299,6 +299,9 @@ enum {
> WQ_HIGHPRI = 1 << 4, /* high priority */
> WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */
> WQ_SYSFS = 1 << 6, /* visible in sysfs, see wq_sysfs_register() */
> + WQ_POWER_EFFICIENT = 1 << 7, /* WQ_UNBOUND, for power
> + * saving, if wq_power_efficient is
> + * enabled. Unused otherwise. */
Ditto for the flag name. It's not a requirement tho. If you can
think of something which is a bit more specific to what it does while
not being unreasonably long, great. If not, we'll live.
> @@ -271,6 +271,11 @@ static cpumask_var_t *wq_numa_possible_cpumask;
> static bool wq_disable_numa;
> module_param_named(disable_numa, wq_disable_numa, bool, 0444);
>
> +#ifdef CONFIG_WQ_POWER_EFFICIENT
> +static bool wq_power_efficient = 0;
> +module_param_named(power_efficient, wq_power_efficient, bool, 0444);
> +#endif
I don't think we need to make the whole thing configurable. Turning
it off isn't gonna save much - my gut tells me it's gonna be four
instructions. :)
What I meant was that the default value for the parameter would
probably be need to be configurable so that mobile people don't have
to include the kernel param all the time or patch the kernel
themselves.
> + if (flags & WQ_POWER_EFFICIENT) {
> + flags &= ~WQ_POWER_EFFICIENT;
No need to clear the flag.
> +#ifdef CONFIG_WQ_POWER_EFFICIENT
> + if (wq_power_efficient)
> + flags |= WQ_UNBOUND;
> +#endif
Thanks!
--
tejun
next prev parent reply other threads:[~2013-04-09 18:30 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-31 14:31 [PATCH V4 0/4] Queue work on UNBOUND wq Viresh Kumar
2013-03-31 14:31 ` [PATCH V4 1/4] workqueue: Add system wide system_freezable_unbound_wq Viresh Kumar
2013-04-01 5:20 ` Amit Kucheria
2013-04-01 5:25 ` Viresh Kumar
2013-04-08 16:59 ` Steven Rostedt
2013-04-09 4:11 ` Viresh Kumar
2013-03-31 14:31 ` [PATCH V4 2/4] PHYLIB: queue work on unbound wq Viresh Kumar
2013-03-31 16:45 ` David Miller
2013-03-31 14:31 ` [PATCH V4 3/4] block: " Viresh Kumar
2013-03-31 18:19 ` Tejun Heo
2013-04-01 6:31 ` Viresh Kumar
2013-04-03 21:54 ` Tejun Heo
2013-04-05 9:47 ` Viresh Kumar
2013-04-05 12:22 ` Tejun Heo
2013-04-08 10:24 ` Viresh Kumar
2013-04-08 10:37 ` Amit Kucheria
2013-04-08 11:02 ` Viresh Kumar
2013-04-08 11:13 ` Jens Axboe
2013-04-08 11:14 ` Viresh Kumar
2013-04-09 7:30 ` Viresh Kumar
2013-04-09 9:18 ` Amit Kucheria
2013-04-09 9:35 ` Viresh Kumar
2013-04-09 9:53 ` Amit Kucheria
2013-04-09 9:55 ` Viresh Kumar
2013-04-09 9:58 ` Amit Kucheria
2013-04-09 10:11 ` Viresh Kumar
2013-04-09 18:30 ` Tejun Heo [this message]
2013-04-22 6:20 ` Viresh Kumar
2013-04-23 20:24 ` Tejun Heo
2013-03-31 14:31 ` [PATCH V4 4/4] fbcon: " Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130409183020.GD6186@mtj.dyndns.org \
--to=tj@kernel.org \
--cc=Liviu.Dudau@arm.com \
--cc=Steve.Bannister@arm.com \
--cc=airlied@redhat.com \
--cc=arvind.chauhan@arm.com \
--cc=axboe@kernel.dk \
--cc=charles.garcia-tobin@arm.com \
--cc=davem@davemloft.net \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=patches@linaro.org \
--cc=peterz@infradead.org \
--cc=robin.randhawa@arm.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).