All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Pihet <jean.pihet@newoldbits.com>
To: Thomas Renninger <trenn@suse.de>, Ming Lei <tom.leiming@gmail.com>
Cc: rostedt@goodmis.org, fweisbec@gmail.com, mingo@redhat.com,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	Len Brown <lenb@kernel.org>
Subject: Re: [PATCH 3/3] trace points: power: remove 'cpu_id' from trace_cpu_idle
Date: Fri, 2 Sep 2011 09:26:28 +0200	[thread overview]
Message-ID: <CAORVsuVkxHTEr5J9F1USr3csMoCELDfk9ixeG3kddy6oRj5RUw@mail.gmail.com> (raw)
In-Reply-To: <201108221027.34441.trenn@suse.de>

Ming Lei, Thomas,

Sorry if it is a bit late to jump in.

On Mon, Aug 22, 2011 at 10:27 AM, Thomas Renninger <trenn@suse.de> wrote:
> On Saturday, August 20, 2011 04:40:09 AM Ming Lei wrote:
>> Hi,
>>
>> 2011/8/20 Thomas Renninger <trenn@suse.de>:
>> > On Friday, August 19, 2011 05:04:04 PM tom.leiming@gmail.com wrote:
>> >> From: Ming Lei <tom.leiming@gmail.com>
>> >>
>> >> This patch removes the 'cpu_id' parameter of the cpu_idle
>> >> trace point, based on the ideas below:
>> >>
>> >> - the cpu_id which is passed to trace point is always the current
>> >>   cpu
>> > Are you sure this will always be true?
>>
>> It is sure at least now,  the only place to pass 'dev->cpu' is inside
>> cpuidle_idle_call,
> It was known that cpu_id is always the current cpu with current
> implementation when this got introduced.
> But the perf events API must not change back and forth for userspace
> compatibility. Therefore the cpu_id was added in case
> that future implementations want to pass info where the current cpu
> is not the cpu which is sent to the sleep state.
Agree. Let's keep the cpu_id field.

>
>> smp_processor_id() can't be used safely in preemptible context.
> I expect the only side effect that could happen is that if smp_process_id
> is interrupted you get the wrong core id on a cpu idle trace event.
> This only happens if cpuidle is not used and even then should happen
> very rarely, nothing to worry for a debug tool like that.
> And it should get fixed if these idle functions get fully integrated into
> cpuidle at some point of time.
>
>   Thomas
>

Regards,
Jean

  reply	other threads:[~2011-09-02  7:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19 15:04 [PATCH 1/3] trace points: power: remove 'cpu_id' from trace_clock_* tom.leiming
2011-08-19 15:04 ` [PATCH 2/3] trace points: power: remove 'cpu_id' from trace_power_domain_target tom.leiming
2011-08-19 15:04 ` [PATCH 3/3] trace points: power: remove 'cpu_id' from trace_cpu_idle tom.leiming
2011-08-19 20:31   ` Thomas Renninger
2011-08-20  2:40     ` Ming Lei
2011-08-20  2:40       ` Ming Lei
2011-08-22  8:27       ` Thomas Renninger
2011-09-02  7:26         ` Jean Pihet [this message]
2011-09-02  7:38           ` Ming Lei
2011-08-19 15:14 ` [PATCH 1/3] trace points: power: remove 'cpu_id' from trace_clock_* Steven Rostedt
2011-08-19 15:39   ` Ming Lei
2011-08-19 16:16     ` Arjan van de Ven
2011-08-20  2:44       ` Ming Lei
2011-08-20  2:44         ` Ming Lei
2011-08-20 15:59         ` Arjan van de Ven

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=CAORVsuVkxHTEr5J9F1USr3csMoCELDfk9ixeG3kddy6oRj5RUw@mail.gmail.com \
    --to=jean.pihet@newoldbits.com \
    --cc=fweisbec@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tom.leiming@gmail.com \
    --cc=trenn@suse.de \
    /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.