All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: jonghwa3.lee@samsung.com
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	cpufreq@vger.kernel.org, MyungJoo Ham <myungjoo.ham@samsung.com>,
	Lukasz Majewski <l.majewski@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	sw0312.kim@samsung.com, m.szyprowski@samsung.com
Subject: Re: [RFC PATCH 1/2] cpuidle: Add idle enter/exit time stamp for notifying current idle state.
Date: Tue, 02 Apr 2013 09:34:57 +0200	[thread overview]
Message-ID: <515A8A21.6070509@linaro.org> (raw)
In-Reply-To: <515A77FC.70008@samsung.com>

On 04/02/2013 08:17 AM, jonghwa3.lee@samsung.com wrote:
> On 2013년 04월 02일 14:00, Daniel Lezcano wrote:
> 
>> On 04/01/2013 10:24 AM, Jonghwa Lee wrote:
>>> This patch adds idle state time stamp to cpuidle device structure to
>>> notify its current idle state. If last enter time is newer than last
>>> exit time, then it means that the core is in idle now.
>>>
>>> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
>>> ---
>>
>> The patch description does not explain what problem you want to solve,
>> how to solve it and the patch itself shows nothing.
>>
>> Could you elaborate ?
> 
> 
> I'm sorry for lacking description. I supplement more.
> 
> This patch does add time-stamp for idle enter/exit only nothing more.
> The reason why I needed them is that I wanted to know current cpu idle
> state. It is hard to know whether cpu is in idle or not now.

Did you looked at:

include/linux/sched.h:extern int idle_cpu(int cpu);

?

> When I check the cpuidle state usage, sometimes the information is wrong.
> Because it is updated only when the cpu exits the idle state. So while the
> cpu is idling, the cpuidle state usage holds past one. Therefore I put
> the time-stamp for cpuidle enter/exit for checking current idling and
> calculating idle state usage correctly.
> 
> I just make this patch temporary for my cpufreq governor work. So, it just
> use time-stamp for all idle state together. After RFC working, I have a plan
> to update this patch to use timestamp for each idle state.

I suggest you look at the enter_idle / exit_idle function and make your
governor to subscribe to the IDLE_START/EXIT notifiers.

arch/x86/kernel/process.c

These are defined for the x86 architecture, maybe worth to add it to
another architecture.

Thanks
  -- Daniel

-- 
 <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


  reply	other threads:[~2013-04-02  7:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01  8:24 [RFC PATCH 0/2] cpufreq: Introduce LAB cpufreq governor Jonghwa Lee
2013-04-01  8:24 ` [RFC PATCH 1/2] cpuidle: Add idle enter/exit time stamp for notifying current idle state Jonghwa Lee
2013-04-02  5:00   ` Daniel Lezcano
2013-04-02  5:00     ` Daniel Lezcano
2013-04-02  6:17     ` jonghwa3.lee
2013-04-02  7:34       ` Daniel Lezcano [this message]
2013-04-02  9:37         ` jonghwa3.lee
2013-04-02 10:08           ` Daniel Lezcano
2013-04-02 11:07             ` jonghwa3.lee
2013-04-02 11:18               ` Daniel Lezcano
2013-04-03  6:10                 ` jonghwa3.lee
2013-04-01  8:24 ` [RFC PATCH 2/2] cpufreq: Introduce new cpufreq governor, LAB(Legacy Application Boost) Jonghwa Lee
2013-04-01 15:37 ` [RFC PATCH 0/2] cpufreq: Introduce LAB cpufreq governor Viresh Kumar
2013-04-09 10:37   ` Lukasz Majewski
2013-04-09 12:02     ` Viresh Kumar
2013-04-09 16:44       ` Lukasz Majewski
     [not found]         ` <CAKfTPtD6MK9ogq7mOijSxLSsH0n65Xra48XfRSB3DFs35GT=2g@mail.gmail.com>
2013-04-10  6:56           ` Vincent Guittot
2013-04-10  8:44           ` Lukasz Majewski
2013-04-10  8:44             ` Lukasz Majewski
2013-04-10  9:13             ` Vincent Guittot
2013-04-10  9:38               ` Lukasz Majewski
2013-04-10 10:45                 ` Vincent Guittot
2013-04-23  7:28               ` Lukasz Majewski
2013-04-23  7:53                 ` Vincent Guittot
2013-04-10 10:14             ` Lorenzo Pieralisi
2013-04-09 12:25     ` jonghwa3.lee

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=515A8A21.6070509@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=cpufreq@vger.kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=jonghwa3.lee@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=l.majewski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=rjw@sisk.pl \
    --cc=sw0312.kim@samsung.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.