Thread (2 messages) 2 messages, 2 authors, 2014-01-31

Re: [RFC PATCH] net: ipv4: move inetpeer garbage collector work to power efficient workqueue

From: Sergei Shtylyov <hidden>
Date: 2014-01-31 13:10:58
Also in: lkml

Hello.

On 31-01-2014 3:40, Zoran Markovic wrote:
From: Shaibal Dutta <redacted>
Garbage collector work does not have to be bound to the CPU that scheduled
it. By moving work to the power-efficient workqueue, the selection of
CPU executing the work is left to the scheduler. This extends idle
residency times and conserves power.
This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <redacted>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <redacted>
Cc: Patrick McHardy <redacted>
Signed-off-by: Shaibal Dutta <redacted>
[zoran.markovic@linaro.org: Rebased to latest kernel version. Added
commit message.]
Signed-off-by: Zoran Markovic <redacted>
---
  net/ipv4/inetpeer.c |    6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
quoted hunk ↗ jump to hunk
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index 48f4244..87155aa 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -161,7 +161,8 @@ static void inetpeer_gc_worker(struct work_struct *work)
  	list_splice(&list, &gc_list);
  	spin_unlock_bh(&gc_lock);

-	schedule_delayed_work(&gc_work, gc_delay);
+	queue_delayed_work(system_power_efficient_wq,
+		&gc_work, gc_delay);
    Please align the continuation line under the next character after ( on the 
broken up line.
quoted hunk ↗ jump to hunk
@@ -576,7 +577,8 @@ static void inetpeer_inval_rcu(struct rcu_head *head)
  	list_add_tail(&p->gc_list, &gc_list);
  	spin_unlock_bh(&gc_lock);

-	schedule_delayed_work(&gc_work, gc_delay);
+	queue_delayed_work(system_power_efficient_wq,
+		&gc_work, gc_delay);
    Same here. This is according to networking coding style.

WBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help