From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Mel Gorman <mgorman@suse.de>,
Rafael J Wysocki <rafael.j.wysocki@intel.com>,
Nicolas Pitre <nico@linaro.org>
Cc: Mike Galbraith <mgalbraith@suse.de>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] cpuidle: menu: Use ktime_to_us instead of reinventing the wheel
Date: Wed, 06 Aug 2014 16:17:36 +0200 [thread overview]
Message-ID: <53E23900.3040007@linaro.org> (raw)
In-Reply-To: <1407331161-4642-3-git-send-email-mgorman@suse.de>
On 08/06/2014 03:19 PM, Mel Gorman wrote:
> The ktime_to_us implementation is slightly better than the one implemented
> in menu.c. Use it
>
> Signed-off-by: Mel Gorman <mgorman@suse.de>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
> drivers/cpuidle/governors/menu.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
> index 801b2ee..373278a 100644
> --- a/drivers/cpuidle/governors/menu.c
> +++ b/drivers/cpuidle/governors/menu.c
> @@ -297,7 +297,6 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
> int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
> int i;
> unsigned int interactivity_req;
> - struct timespec t;
>
> if (data->needs_update) {
> menu_update(drv, dev);
> @@ -311,9 +310,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
> return 0;
>
> /* determine the expected residency time, round up */
> - t = ktime_to_timespec(tick_nohz_get_sleep_length());
> - data->next_timer_us =
> - t.tv_sec * USEC_PER_SEC + t.tv_nsec / NSEC_PER_USEC;
> + data->next_timer_us = ktime_to_us(tick_nohz_get_sleep_length());
>
>
> data->bucket = which_bucket(data->next_timer_us);
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2014-08-06 14:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 13:19 [PATCH 0/4] Reduce overhead of menu governor Mel Gorman
2014-08-06 13:19 ` [PATCH 1/4] cpuidle: menu: Use shifts when calculating averages where possible Mel Gorman
2014-08-06 13:19 ` [PATCH 2/4] cpuidle: menu: Use ktime_to_us instead of reinventing the wheel Mel Gorman
2014-08-06 14:17 ` Daniel Lezcano [this message]
2014-08-06 13:19 ` [PATCH 3/4] cpuidle: menu: Call nr_iowait_cpu less times Mel Gorman
2014-08-06 13:19 ` [PATCH 4/4] cpuidle: menu: Lookup CPU runqueues less Mel Gorman
2014-08-06 19:17 ` [PATCH 0/4] Reduce overhead of menu governor Rafael J. Wysocki
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=53E23900.3040007@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mgalbraith@suse.de \
--cc=mgorman@suse.de \
--cc=nico@linaro.org \
--cc=rafael.j.wysocki@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.