Skip to content

Commit

Permalink
More power efficiency
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhinandAK350 committed Jan 26, 2022
1 parent db5394d commit d8ede94
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion block/bio-integrity.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ void __init bio_integrity_init(void)
* Make it highpri CPU intensive wq with max concurrency of 1.
*/
kintegrityd_wq = alloc_workqueue("kintegrityd", WQ_MEM_RECLAIM |
WQ_HIGHPRI | WQ_CPU_INTENSIVE, 1);
WQ_HIGHPRI | WQ_POWER_EFFICIENT | WQ_CPU_INTENSIVE, 1);
if (!kintegrityd_wq)
panic("Failed to create kintegrityd\n");

Expand Down
2 changes: 1 addition & 1 deletion block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3591,7 +3591,7 @@ int __init blk_dev_init(void)

/* used for unplugging and affects IO latency/throughput - HIGHPRI */
kblockd_workqueue = alloc_workqueue("kblockd",
WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_POWER_EFFICIENT, 0);
if (!kblockd_workqueue)
panic("Failed to create kblockd\n");

Expand Down
2 changes: 1 addition & 1 deletion crypto/crypto_wq.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ EXPORT_SYMBOL_GPL(kcrypto_wq);
static int __init crypto_wq_init(void)
{
kcrypto_wq = alloc_workqueue("crypto",
WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE, 1);
WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE | WQ_POWER_EFFICIENT, 1);
if (unlikely(!kcrypto_wq))
return -ENOMEM;
return 0;
Expand Down
2 changes: 1 addition & 1 deletion crypto/pcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ static int pcrypt_init_padata(struct padata_pcrypt *pcrypt,

get_online_cpus();

pcrypt->wq = alloc_workqueue("%s", WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE,
pcrypt->wq = alloc_workqueue("%s", WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE | WQ_POWER_EFFICIENT,
1, name);
if (!pcrypt->wq)
goto err;
Expand Down
2 changes: 1 addition & 1 deletion drivers/cpuidle/lpm-workarounds.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static int lpm_wa_cx_unvote_init(struct platform_device *pdev)
INIT_WORK(&dummy_vote_work, send_dummy_cx_vote);

lpm_wa_wq = alloc_workqueue("lpm-wa",
WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_HIGHPRI, 1);
WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_POWER_EFFICIENT, 1);

return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/crypto/msm/qcrypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -5565,7 +5565,7 @@ static int __init _qcrypto_init(void)
spin_lock_init(&pcp->lock);
mutex_init(&pcp->engine_lock);
pcp->resp_wq = alloc_workqueue("qcrypto_seq_response_wq",
WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_CPU_INTENSIVE, 1);
WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_CPU_INTENSIVE | WQ_POWER_EFFICIENT, 1);
if (!pcp->resp_wq) {
pr_err("Error allocating workqueue\n");
return -ENOMEM;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/msm/kgsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4862,7 +4862,7 @@ int kgsl_device_platform_probe(struct kgsl_device *device)
}

device->events_wq = alloc_workqueue("kgsl-events",
WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS, 0);
WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS | WQ_POWER_EFFICIENT | WQ_HIGHPRI, 0);

/* Initialize the snapshot engine */
kgsl_device_snapshot_init(device);
Expand Down
4 changes: 2 additions & 2 deletions drivers/platform/msm/ipa/ipa_v2/ipa_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ int ipa2_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl)
snprintf(buff, IPA_RESOURCE_NAME_MAX, "ipawq%d",
sys_in->client);
ep->sys->wq = alloc_workqueue(buff,
WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND | WQ_POWER_EFFICIENT, 1);
if (!ep->sys->wq) {
IPAERR("failed to create wq for client %d\n",
sys_in->client);
Expand All @@ -1285,7 +1285,7 @@ int ipa2_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl)
snprintf(buff, IPA_RESOURCE_NAME_MAX, "iparepwq%d",
sys_in->client);
ep->sys->repl_wq = alloc_workqueue(buff,
WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND | WQ_POWER_EFFICIENT, 1);
if (!ep->sys->repl_wq) {
IPAERR("failed to create rep wq for client %d\n",
sys_in->client);
Expand Down
4 changes: 2 additions & 2 deletions drivers/platform/msm/ipa/ipa_v3/ipa_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ int ipa3_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl)
snprintf(buff, IPA_RESOURCE_NAME_MAX, "ipawq%d",
sys_in->client);
ep->sys->wq = alloc_workqueue(buff,
WQ_MEM_RECLAIM | WQ_UNBOUND | WQ_SYSFS, 1);
WQ_MEM_RECLAIM | WQ_UNBOUND | WQ_POWER_EFFICIENT | WQ_SYSFS, 1);

if (!ep->sys->wq) {
IPAERR("failed to create wq for client %d\n",
Expand All @@ -947,7 +947,7 @@ int ipa3_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl)
snprintf(buff, IPA_RESOURCE_NAME_MAX, "iparepwq%d",
sys_in->client);
ep->sys->repl_wq = alloc_workqueue(buff,
WQ_MEM_RECLAIM | WQ_UNBOUND | WQ_SYSFS, 1);
WQ_MEM_RECLAIM | WQ_UNBOUND | WQ_POWER_EFFICIENT | WQ_SYSFS, 1);
if (!ep->sys->repl_wq) {
IPAERR("failed to create rep wq for client %d\n",
sys_in->client);
Expand Down
2 changes: 1 addition & 1 deletion drivers/platform/msm/usb_bam.c
Original file line number Diff line number Diff line change
Expand Up @@ -3300,7 +3300,7 @@ static int usb_bam_probe(struct platform_device *pdev)
mutex_init(&info[bam_type].suspend_resume_mutex);

ctx->usb_bam_wq = alloc_workqueue("usb_bam_wq",
WQ_UNBOUND | WQ_MEM_RECLAIM, 1);
WQ_UNBOUND | WQ_POWER_EFFICIENT | WQ_HIGHPRI | WQ_MEM_RECLAIM, 1);
if (!ctx->usb_bam_wq) {
log_event_err("unable to create workqueue usb_bam_wq\n");
return -ENOMEM;
Expand Down
2 changes: 1 addition & 1 deletion drivers/soc/qcom/bam_dmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -2743,7 +2743,7 @@ static int bam_dmux_probe(struct platform_device *pdev)
create_singlethread_workqueue("bam_dmux_rx");
else
bam_mux_rx_workqueue = alloc_workqueue("bam_dmux_rx",
WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE, 1);
WQ_MEM_RECLAIM | WQ_POWER_EFFICIENT | WQ_CPU_INTENSIVE, 1);
if (!bam_mux_rx_workqueue)
return -ENOMEM;

Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/msm_serial_hs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3517,7 +3517,7 @@ static int msm_hs_probe(struct platform_device *pdev)
msm_uport->pclk = NULL;

msm_uport->hsuart_wq = alloc_workqueue("k_hsuart",
WQ_UNBOUND | WQ_MEM_RECLAIM, 1);
WQ_UNBOUND | WQ_POWER_EFFICIENT | WQ_HIGHPRI | WQ_MEM_RECLAIM, 1);
if (!msm_uport->hsuart_wq) {
MSM_HS_ERR("%s(): Unable to create workqueue hsuart_wq\n",
__func__);
Expand Down
4 changes: 2 additions & 2 deletions net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3060,14 +3060,14 @@ int hci_register_dev(struct hci_dev *hdev)

BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);

hdev->workqueue = alloc_workqueue("%s", WQ_HIGHPRI | WQ_UNBOUND |
hdev->workqueue = alloc_workqueue("%s", WQ_HIGHPRI | WQ_UNBOUND | WQ_POWER_EFFICIENT |
WQ_MEM_RECLAIM, 1, hdev->name);
if (!hdev->workqueue) {
error = -ENOMEM;
goto err;
}

hdev->req_workqueue = alloc_workqueue("%s", WQ_HIGHPRI | WQ_UNBOUND |
hdev->req_workqueue = alloc_workqueue("%s", WQ_HIGHPRI | WQ_UNBOUND | WQ_POWER_EFFICIENT |
WQ_MEM_RECLAIM, 1, hdev->name);
if (!hdev->req_workqueue) {
destroy_workqueue(hdev->workqueue);
Expand Down

0 comments on commit d8ede94

Please sign in to comment.