sunrpc: queue work on system_power_efficient_wq
Subsystems (4)
PATCH 1/1 sunrpc: queue work on system_power_efficient_wq
From: Ke Wang <[email protected]>
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.
--- net/sunrpc/cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/sunrpc/cache.c +3 -2
@@ -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); }
Signature · 1 line
2.7.4
Quoted 11 lines · Chunyan Zhang
From: Ke Wang <[email protected]>
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.
Quoted 3 lines
After apply this patch,
system_wqwill be replaced bysystem_power_efficient_wqfor sunrpc. This functionality is enabled whenCONFIG_WQ_POWER_EFFICIENTis 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
Quoted 30 lines
Signed-off-by Ke Wang <[email protected]>--- net/sunrpc/cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)net/sunrpc/cache.c +3
-2@@ -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); }
A message that is not in the archive (sent off-list or not yet received): [email protected]
Resend behalf on Ke Wang.
Thanks,
Chunyan
Quoted 56 lines · Ke Wang (王科)
May I have any comments for this patch?
or
This patch can be merged directly into next release?Thanks,
Ke
________________________________________
发件人: Anna Schumaker <[email protected]>
发送时间: 2016年9月2日 2:46
收件人: Chunyan Zhang; [email protected]; [email protected]; davem-fT/PcQaiUtIeIZ0/[email protected] 抄送: [email protected]; [email protected]; [email protected]; Ke Wang (王科) 主题: Re: [PATCH] sunrpc: queue work onsystem_power_efficient_wqQuoted 11 lines · Chunyan Zhang
From: Ke Wang <[email protected]>
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.
Quoted 3 lines
After apply this patch,
system_wqwill be replaced bysystem_power_efficient_wqfor sunrpc. This functionality is enabled whenCONFIG_WQ_POWER_EFFICIENTis 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,
AnnaQuoted 22 lines
Signed-off-by Ke Wang <[email protected]>--- net/sunrpc/cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)net/sunrpc/cache.c +1
-1@@ -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 ;
Quoted 9 lines
net/sunrpc/cache.c static void do_cache_clean(struct work_struct *work) · line 483
Quoted 8 lines
net/sunrpc/cache.c +2
-1if (delay) -schedule_delayed_work (&cache_cleaner, delay); +queue_delayed_work (system_power_efficient_wq, + &cache_cleaner, delay); }
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
I took a second look at the patch and it still looks okay to me. It's in my git tree for 4.9.
Thanks,
Anna
Quoted 65 lines · Ke Wang (王科)
May I have any comments for this patch?
or
This patch can be merged directly into next release?Thanks,
Ke
________________________________________
发件人: Anna Schumaker <[email protected]>
发送时间: 2016年9月2日 2:46
收件人: Chunyan Zhang; [email protected]; [email protected]; [email protected] 抄送: [email protected]; [email protected]; [email protected]; Ke Wang (王科) 主题: Re: [PATCH] sunrpc: queue work onsystem_power_efficient_wqQuoted 11 lines · Chunyan Zhang
From: Ke Wang <[email protected]>
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.
Quoted 3 lines
After apply this patch,
system_wqwill be replaced bysystem_power_efficient_wqfor sunrpc. This functionality is enabled whenCONFIG_WQ_POWER_EFFICIENTis 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,
AnnaQuoted 30 lines
Signed-off-by Ke Wang <[email protected]>--- net/sunrpc/cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)net/sunrpc/cache.c +3
-2@@ -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); }