From: Namhyung Kim <namhyung@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>, Hao Luo <haoluo@google.com>,
Song Liu <song@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
bpf@vger.kernel.org, linux-perf-users@vger.kernel.org,
Ian Rogers <irogers@google.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v3 1/3] perf lock contention: Clear lock addr after use
Date: Thu, 26 Oct 2023 10:11:12 -0700 [thread overview]
Message-ID: <169833996388.1181734.6181786783343850640.b4-ty@kernel.org> (raw)
In-Reply-To: <20231020204741.1869520-1-namhyung@kernel.org>
On Fri, 20 Oct 2023 13:47:39 -0700, Namhyung Kim wrote:
> It checks the current lock to calculated the delta of contention time.
> The address is saved in the tstamp map which is allocated at begining of
> contention and released at end of contention.
>
> But it's possible for bpf_map_delete_elem() to fail. In that case, the
> element in the tstamp map kept for the current lock and it makes the
> next contention for the same lock tracked incorrectly. Specificially
> the next contention begin will see the existing element for the task and
> it'd just return. Then the next contention end will see the element and
> calculate the time using the timestamp for the previous begin.
>
> [...]
Applied to perf-tools-next, thanks!
prev parent reply other threads:[~2023-10-26 17:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 20:47 Namhyung Kim
2023-10-20 20:47 ` [PATCH v3 2/3] perf lock contention: Check race in tstamp elem creation Namhyung Kim
2023-10-25 4:13 ` Ian Rogers
2023-10-20 20:47 ` [PATCH v3 3/3] perf lock contention: Use per-cpu array map for spinlocks Namhyung Kim
2023-10-25 4:15 ` Ian Rogers
2023-10-25 4:13 ` [PATCH v3 1/3] perf lock contention: Clear lock addr after use Ian Rogers
2023-10-26 17:11 ` Namhyung Kim [this message]
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=169833996388.1181734.6181786783343850640.b4-ty@kernel.org \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=bpf@vger.kernel.org \
--cc=haoluo@google.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=song@kernel.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
all inboxes | Powered by JetHome®