LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pratik Sampat <psampat@linux.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
rafael.j.wysocki@intel.com, dsmythies@telus.net,
daniel.lezcano@linaro.org, ego@linux.vnet.ibm.com,
svaidy@linux.ibm.com, pratik.sampat@in.ibm.com,
pratik.r.sampat@gmail.com
Subject: Re: [RFC 1/1] Weighted approach to gather and use history in TEO governor
Date: Wed, 13 May 2020 11:01:02 +0530 [thread overview]
Message-ID: <09b8bf40-e371-e1eb-d77e-6c676f22dd29@linux.ibm.com> (raw)
In-Reply-To: <20200512173722.GM2978@hirez.programming.kicks-ass.net>
Thanks for your comment.
On 12/05/20 11:07 pm, Peter Zijlstra wrote:
> Just a quick note..
>
> On Mon, May 11, 2020 at 07:40:55PM +0530, Pratik Rajesh Sampat wrote:
>
>> + /*
>> + * Rearrange the weight distribution of the state, increase the weight
>> + * by the LEARNING RATE % for the idle state that was supposed to be
>> + * chosen and reduce by the same amount for rest of the states
>> + *
>> + * If the weights are greater than (100 - LEARNING_RATE) % or lesser
>> + * than LEARNING_RATE %, do not increase or decrease the confidence
>> + * respectively
>> + */
>> + for (i = 0; i < drv->state_count; i++) {
>> + unsigned int delta;
>> +
>> + if (idx == -1)
>> + break;
>> + if (i == idx) {
>> + delta = (LEARNING_RATE * cpu_data->state_mat[last_idx][i]) / 100;
> 100 is a crap number to divide by as a computer. We bio-puddings happend
> to have 10 digits, so 100 makes sense to us, but it does not to our
> binary friends.
>
>
Absolutely! I just wrote the code exactly the way I did the Math on paper,
definitely need to figure out an optimal way of doing things.
~Pratik
next prev parent reply other threads:[~2020-05-13 5:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 14:10 [RFC 0/1] Alternate history mechanism for the " Pratik Rajesh Sampat
2020-05-11 14:10 ` [RFC 1/1] Weighted approach to gather and use history in " Pratik Rajesh Sampat
2020-05-12 17:37 ` Peter Zijlstra
2020-05-13 5:31 ` Pratik Sampat [this message]
2020-05-13 14:49 ` Rafael J. Wysocki
2020-05-14 15:35 ` Pratik Sampat
2020-05-17 18:11 ` [RFC 0/1] Alternate history mechanism for the " Doug Smythies
2020-05-21 11:09 ` Pratik Sampat
2020-05-25 18:32 ` Doug Smythies
-- strict thread matches above, loose matches on Subject: below --
2020-02-22 7:00 [RFC 0/1] Weighted approach to gather and use history in " Pratik Rajesh Sampat
2020-02-22 7:00 ` [RFC 1/1] " Pratik Rajesh Sampat
2020-02-25 6:18 ` Gautham R Shenoy
2020-02-29 8:58 ` Pratik Sampat
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=09b8bf40-e371-e1eb-d77e-6c676f22dd29@linux.ibm.com \
--to=psampat@linux.ibm.com \
--cc=daniel.lezcano@linaro.org \
--cc=dsmythies@telus.net \
--cc=ego@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=pratik.r.sampat@gmail.com \
--cc=pratik.sampat@in.ibm.com \
--cc=rafael.j.wysocki@intel.com \
--cc=svaidy@linux.ibm.com \
--subject='Re: [RFC 1/1] Weighted approach to gather and use history in TEO governor' \
/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
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).