From: Andi Kleen <ak@linux.intel.com>
To: Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@redhat.com>, Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
Stephane Eranian <eranian@google.com>,
Ian Rogers <irogers@google.com>,
gmx@google.com
Subject: Re: [RFC] perf/core: Add an ioctl to get a number of lost samples
Date: Wed, 11 Aug 2021 06:12:04 -0700 [thread overview]
Message-ID: <c857acbf-432e-a9ee-923c-dabc0559a2ff@linux.intel.com> (raw)
In-Reply-To: <20210811062135.1332927-1-namhyung@kernel.org>
> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
> index f5a6a2f069ed..44d72079c77a 100644
> --- a/include/linux/perf_event.h
> +++ b/include/linux/perf_event.h
> @@ -756,6 +756,8 @@ struct perf_event {
> struct pid_namespace *ns;
> u64 id;
>
> + atomic_t lost_samples;
Would rather use atomic64_t. atomic_t might wrap too quickly.
But it might be better to put it somewhere where you already have a lock
on the event, then you wouldn't need an atomic.
-Andi
next prev parent reply other threads:[~2021-08-11 13:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 6:21 [RFC] perf/core: Add an ioctl to get a number of lost samples Namhyung Kim
2021-08-11 13:12 ` Andi Kleen [this message]
2021-08-11 15:04 ` Jiri Olsa
2021-08-11 19:33 ` Stephane Eranian
2021-08-11 19:57 ` Jiri Olsa
2021-08-11 20:57 ` Namhyung Kim
2021-08-11 23:57 ` Stephane Eranian
2021-08-11 20:54 ` Namhyung Kim
2021-08-24 14:02 ` Peter Zijlstra
2021-08-24 17:55 ` Namhyung Kim
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=c857acbf-432e-a9ee-923c-dabc0559a2ff@linux.intel.com \
--to=ak@linux.intel.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=gmx@google.com \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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