linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chander Kashyap <chander.kashyap@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	rafael.j.wysocki@intel.com,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH] cpuidle: governor: menu: move repeated correction factor check to init
Date: Tue, 22 Apr 2014 17:56:39 +0530	[thread overview]
Message-ID: <CANuQgHFdYhTc8YZ2MbQv0r_CsJGDLwHOqy9NuVDEfVUOTsbRpA@mail.gmail.com> (raw)
In-Reply-To: <2942005.cg9fS5oSJO@vostro.rjw.lan>

On 22 April 2014 16:54, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Tuesday, April 22, 2014 03:24:21 PM Chander Kashyap wrote:
>> +cc
>> linux-pm@vger.kernel.org.
>
> And can you please resend the patch?  So that it shows up in Patchwork,
> for example?
>

Yes i will resend it again.

>
>> On 22 April 2014 15:33, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>> > On Tuesday, April 22, 2014 08:27:53 AM Chander Kashyap wrote:
>> >> ping
>> >
>> > Please CC cpuidle patches to linux-pm@vger.kernel.org.
>>
>> +cc to linux-pm@vger.kernel.org.
>> Thanks Rafael
>>
>> >
>> > Thanks!
>> >
>> >> On 10 April 2014 19:57, Tuukka Tikkanen <tuukka.tikkanen@linaro.org> wrote:
>> >> > On 10 April 2014 16:43, Chander Kashyap <chander.kashyap@linaro.org> wrote:
>> >> >> In menu_select function we check for correction factor every time.
>> >> >> If it is zero we are initializing to unity. Hence move it to init function
>> >> >> and initialise by unity, hence avoid repeated comparisons.
>> >> >>
>> >> >> Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
>> >> >> ---
>> >> >>  drivers/cpuidle/governors/menu.c |   15 ++++++++-------
>> >> >>  1 file changed, 8 insertions(+), 7 deletions(-)
>> >> >>
>> >> >> diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
>> >> >> index cf7f2f0..048f6d9 100644
>> >> >> --- a/drivers/cpuidle/governors/menu.c
>> >> >> +++ b/drivers/cpuidle/governors/menu.c
>> >> >> @@ -315,13 +315,6 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
>> >> >>         multiplier = performance_multiplier();
>> >> >>
>> >> >>         /*
>> >> >> -        * if the correction factor is 0 (eg first time init or cpu hotplug
>> >> >> -        * etc), we actually want to start out with a unity factor.
>> >> >> -        */
>> >> >> -       if (data->correction_factor[data->bucket] == 0)
>> >> >> -               data->correction_factor[data->bucket] = RESOLUTION * DECAY;
>> >> >> -
>> >> >> -       /*
>> >> >>          * Force the result of multiplication to be 64 bits even if both
>> >> >>          * operands are 32 bits.
>> >> >>          * Make sure to round up for half microseconds.
>> >> >> @@ -453,9 +446,17 @@ static int menu_enable_device(struct cpuidle_driver *drv,
>> >> >>                                 struct cpuidle_device *dev)
>> >> >>  {
>> >> >>         struct menu_device *data = &per_cpu(menu_devices, dev->cpu);
>> >> >> +       int i;
>> >> >>
>> >> >>         memset(data, 0, sizeof(struct menu_device));
>> >> >>
>> >> >> +       /*
>> >> >> +        * if the correction factor is 0 (eg first time init or cpu hotplug
>> >> >> +        * etc), we actually want to start out with a unity factor.
>> >> >> +        */
>> >> >> +       for(i = 0; i < BUCKETS; i++)
>> >> >> +               data->correction_factor[i] = RESOLUTION * DECAY;
>> >> >> +
>> >> >>         return 0;
>> >> >>  }
>> >> >>
>> >> >> --
>> >> >> 1.7.9.5
>> >> >>
>> >> >
>> >> > Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
>> >>
>> >>
>> >>
>> >>
>> >
>> > --
>> > I speak only for myself.
>> > Rafael J. Wysocki, Intel Open Source Technology Center.
>>
>>
>>
>>
>
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.



-- 
with warm regards,
Chander Kashyap

  reply	other threads:[~2014-04-22 12:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1397137433-19106-1-git-send-email-chander.kashyap@linaro.org>
     [not found] ` <CAG-99FPLOXWnjb_oiDbLmdrYnDnticN9r1drDm_8JHtG=4BSiA@mail.gmail.com>
     [not found]   ` <CANuQgHFGTkT0h6_FmxRxg4kYQA2NWEuzch1pj4Ec+_XnRHV2EQ@mail.gmail.com>
     [not found]     ` <2870361.ixyW1GZfvF@vostro.rjw.lan>
2014-04-22  9:54       ` [PATCH] cpuidle: governor: menu: move repeated correction factor check to init Chander Kashyap
2014-04-22 11:24         ` Rafael J. Wysocki
2014-04-22 12:26           ` Chander Kashyap [this message]
2014-04-22 12:38             ` [RESEND][PATCH] " Chander Kashyap
2014-05-16  8:16               ` Chander Kashyap
2014-05-16  9:46                 ` Rafael J. Wysocki
2014-05-16  9:54                   ` Chander Kashyap

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=CANuQgHFdYhTc8YZ2MbQv0r_CsJGDLwHOqy9NuVDEfVUOTsbRpA@mail.gmail.com \
    --to=chander.kashyap@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=tuukka.tikkanen@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).