Re: [RFC PATCH] usb: move hub init and LED blink work to powerefficient workqueue

From: Alan Stern
Date: Fri Jan 31 2014 - 21:36:25 EST


On Fri, 31 Jan 2014, Zoran Markovic wrote:

> From: Shaibal Dutta <shaibal.dutta@xxxxxxxxxxxx>
>
> Allow the scheduler to select the best CPU to handle hub initalization
> and LED blinking work. This extends idle residency times on idle CPUs
> and conserves power.
>
> This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected.

...

> @@ -1046,8 +1047,9 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
> if (type == HUB_INIT) {
> delay = hub_power_on(hub, false);
> PREPARE_DELAYED_WORK(&hub->init_work, hub_init_func2);
> - schedule_delayed_work(&hub->init_work,
> - msecs_to_jiffies(delay));
> + queue_delayed_work(system_power_efficient_wq,
> + &hub->init_work,
> + msecs_to_jiffies(delay));

I have no objection to selecting the power-efficient work queue, but
please don't change the indentation of the existing code. The style
used throughout (most of) the USB core is that continuation lines are
indented by two tab stops more than the first line of the statement.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/