From: Anna Schumaker <Anna.Schumaker@netapp.com>
To: Chunyan Zhang <zhang.lyra@gmail.com>,
<trond.myklebust@primarydata.com>, <anna.schumaker@netapp.com>,
<davem@davemloft.net>
Cc: <linux-nfs@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <ke.wang@spreadtrum.com>
Subject: Re: [PATCH] sunrpc: queue work on system_power_efficient_wq
Date: Thu, 1 Sep 2016 14:46:35 -0400 [thread overview]
Message-ID: <544e309c-9893-a0ed-ab8a-ccbf5d342dc6@Netapp.com> (raw)
In-Reply-To: <1472715026-11397-1-git-send-email-zhang.lyra@gmail.com>
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);
> }
>
>
>
next prev parent reply other threads:[~2016-09-01 21:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-01 7:30 Chunyan Zhang
2016-09-01 18:46 ` Anna Schumaker [this message]
[not found] ` <d72ce63e4a054c8797c9ba92cdad3b5d@SHMBX03.spreadtrum.com>
2016-09-20 5:03 ` 答复: " Chunyan Zhang
2016-09-26 20:56 ` Anna Schumaker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=544e309c-9893-a0ed-ab8a-ccbf5d342dc6@Netapp.com \
--to=anna.schumaker@netapp.com \
--cc=davem@davemloft.net \
--cc=ke.wang@spreadtrum.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
--cc=zhang.lyra@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®