Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1474136 > unrolled thread
| Started by | Chunyan Zhang <zhang.lyra@gmail.com> |
|---|---|
| First post | 2016-09-01 09:40 +0200 |
| Last post | 2016-09-01 23:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] sunrpc: queue work on system_power_efficient_wq Chunyan Zhang <zhang.lyra@gmail.com> - 2016-09-01 09:40 +0200
Re: [PATCH] sunrpc: queue work on system_power_efficient_wq Anna Schumaker <Anna.Schumaker@netapp.com> - 2016-09-01 23:20 +0200
| From | Chunyan Zhang <zhang.lyra@gmail.com> |
|---|---|
| Date | 2016-09-01 09:40 +0200 |
| Subject | [PATCH] sunrpc: queue work on system_power_efficient_wq |
| Message-ID | <scuLn-6aT-1@gated-at.bofh.it> |
From: Ke Wang <ke.wang@spreadtrum.com> sunrpc uses workqueue to clean cache regulary. There is no real dependency of executing work on the cpu which queueing it. On a idle system, especially for a heterogeneous systems like big.LITTLE, it is observed that the big idle cpu was woke up many times just to service this work, which against the principle of power saving. It would be better if we can schedule it on a cpu which the scheduler believes to be the most appropriate one. After apply this patch, system_wq will be replaced by system_power_efficient_wq for sunrpc. This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected. Signed-off-by: Ke Wang <ke.wang@spreadtrum.com> --- net/sunrpc/cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 4d8e11f..8aabe12 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -353,7 +353,7 @@ void sunrpc_init_cache_detail(struct cache_detail *cd) spin_unlock(&cache_list_lock); /* start the cleaning process */ - schedule_delayed_work(&cache_cleaner, 0); + queue_delayed_work(system_power_efficient_wq, &cache_cleaner, 0); } EXPORT_SYMBOL_GPL(sunrpc_init_cache_detail); @@ -476,7 +476,8 @@ static void do_cache_clean(struct work_struct *work) delay = 0; if (delay) - schedule_delayed_work(&cache_cleaner, delay); + queue_delayed_work(system_power_efficient_wq, + &cache_cleaner, delay); } -- 2.7.4
[toc] | [next] | [standalone]
| From | Anna Schumaker <Anna.Schumaker@netapp.com> |
|---|---|
| Date | 2016-09-01 23:20 +0200 |
| Message-ID | <scHyX-75a-73@gated-at.bofh.it> |
| In reply to | #1474136 |
On 09/01/2016 03:30 AM, Chunyan Zhang wrote: > From: Ke Wang <ke.wang@spreadtrum.com> > > sunrpc uses workqueue to clean cache regulary. There is no real dependency > of executing work on the cpu which queueing it. > > On a idle system, especially for a heterogeneous systems like big.LITTLE, > it is observed that the big idle cpu was woke up many times just to service > this work, which against the principle of power saving. It would be better > if we can schedule it on a cpu which the scheduler believes to be the most > appropriate one. > > After apply this patch, system_wq will be replaced by > system_power_efficient_wq for sunrpc. This functionality is enabled when > CONFIG_WQ_POWER_EFFICIENT is selected. Makes sense to me, but I'm a little surprised that there isn't a "schedule_delayed_power_efficient_work()" function to match how the normal workqueue is used. Thanks, Anna > > Signed-off-by: Ke Wang <ke.wang@spreadtrum.com> > --- > net/sunrpc/cache.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c > index 4d8e11f..8aabe12 100644 > --- a/net/sunrpc/cache.c > +++ b/net/sunrpc/cache.c > @@ -353,7 +353,7 @@ void sunrpc_init_cache_detail(struct cache_detail *cd) > spin_unlock(&cache_list_lock); > > /* start the cleaning process */ > - schedule_delayed_work(&cache_cleaner, 0); > + queue_delayed_work(system_power_efficient_wq, &cache_cleaner, 0); > } > EXPORT_SYMBOL_GPL(sunrpc_init_cache_detail); > > @@ -476,7 +476,8 @@ static void do_cache_clean(struct work_struct *work) > delay = 0; > > if (delay) > - schedule_delayed_work(&cache_cleaner, delay); > + queue_delayed_work(system_power_efficient_wq, > + &cache_cleaner, delay); > } > > >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web