linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Shaohua Li <shli@fb.com>
Cc: linux-kernel@vger.kernel.org, Kernel-team@fb.com,
	Andy Lutomirski <luto@amacapital.net>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [RFC 2/2] perf: update userspace page info for software event
Date: Fri, 23 Jan 2015 09:44:51 +0100	[thread overview]
Message-ID: <20150123084451.GE2896@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <e0f8f6f0a114c464e8e38cd73be31564bd5ea7da.1421906750.git.shli@fb.com>

On Thu, Jan 22, 2015 at 01:09:02PM -0800, Shaohua Li wrote:
> ---
>  kernel/events/core.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 4edde3e..4221240 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -5950,6 +5950,7 @@ static int perf_swevent_add(struct perf_event *event, int flags)
>  	}
>  
>  	hlist_add_head_rcu(&event->hlist_entry, head);
> +	perf_event_update_userpage(event);
>  
>  	return 0;
>  }
> @@ -6419,6 +6420,7 @@ static int cpu_clock_event_add(struct perf_event *event, int flags)
>  {
>  	if (flags & PERF_EF_START)
>  		cpu_clock_event_start(event, flags);
> +	perf_event_update_userpage(event);
>  
>  	return 0;
>  }
> @@ -6493,6 +6495,7 @@ static int task_clock_event_add(struct perf_event *event, int flags)
>  {
>  	if (flags & PERF_EF_START)
>  		task_clock_event_start(event, flags);
> +	perf_event_update_userpage(event);
>  
>  	return 0;
>  }

How about the one I sent; which adds it to {start,stop} instead of add?
{start,stop} is the right place to add them, although this add might be
sufficient for your use case.

  reply	other threads:[~2015-01-23  8:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 21:09 [RFC 1/2] perf: update shadow timestamp before add event Shaohua Li
2015-01-22 21:09 ` [RFC 2/2] perf: update userspace page info for software event Shaohua Li
2015-01-23  8:44   ` Peter Zijlstra [this message]
2015-01-23 15:57     ` Shaohua Li
2015-01-29  7:00       ` Shaohua Li

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=20150123084451.GE2896@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=Kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=shli@fb.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 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).