linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Mingwei Zhang <mizhang@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	 Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	 Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	 Adrian Hunter <adrian.hunter@intel.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	 linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Yang Jihong <yangjihong1@huawei.com>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH v1] perf evlist: Avoid frequency mode for the dummy event
Date: Wed, 11 Oct 2023 09:14:42 -0700	[thread overview]
Message-ID: <CAM9d7ch9cFpe3YzDhKhK0sRMn9pZ3RL+_ONCVB52s+EJgcRdqw@mail.gmail.com> (raw)
In-Reply-To: <CAM9d7cjJxR5bvx5UvywEkwazkzpRZiKo8s7GLWutNiBKYa1J7g@mail.gmail.com>

On Tue, Oct 3, 2023 at 4:02 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> On Tue, Oct 3, 2023 at 3:36 PM Ian Rogers <irogers@google.com> wrote:
> > With the PMU disabled, isn't there still a risk of an interrupt still
> > being in flight? In other words the disable doesn't prevent a race and
> > we'll catch this on the next timer call to
> > perf_adjust_freq_unthr_context. I think we can also improve the code
> > by just disabling a PMU once, we can take advantage of the
> > perf_event_pmu_context and disable that PMU, iterate its events and
> > then re-enable the PMU - i.e. no need for an enable and disable per
> > event. I'll put a patch together.
>
> Thanks, I was thinking about that too.  It's also a side effect of
> the context rewrite.  Maybe we could iterate pmu_ctx's active lists
> and skip pmus with PERF_PMU_CAP_NO_INTERRUPT and
> individual non-sampling events.

Or we can add pmu_ctx->nr_freq and check it before accessing
pmu MSRs.

Thanks,
Namhyung

  reply	other threads:[~2023-10-11 16:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-16  4:09 [PATCH v1] perf evlist: Avoid frequency mode for the dummy event Ian Rogers
2023-09-17  0:45 ` Mingwei Zhang
2023-09-18 22:42   ` Ian Rogers
2023-09-21  5:04     ` Mingwei Zhang
2023-10-03 20:07       ` Namhyung Kim
2023-10-03 22:36         ` Ian Rogers
2023-10-03 23:02           ` Namhyung Kim
2023-10-11 16:14             ` Namhyung Kim [this message]
2023-10-03 23:19           ` Mingwei Zhang
2023-10-11 16:09             ` Namhyung Kim
2023-09-18  8:14 ` Adrian Hunter
2023-09-18 21:48   ` Ian Rogers
2023-09-19  5:59     ` Adrian Hunter
2023-09-21 19:26       ` Namhyung Kim
2023-09-22  5:36         ` Adrian Hunter
2023-09-22 15:05           ` Ian Rogers
2023-09-25  3:35             ` Yang Jihong
2023-09-25 17:37               ` Stephane Eranian
2023-09-30  6:06                 ` Namhyung Kim
2023-10-30 19:04 ` Mingwei Zhang
2023-10-30 20:01   ` Mingwei Zhang
2023-10-31  5:47     ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2023-09-16  3:56 Ian Rogers

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=CAM9d7ch9cFpe3YzDhKhK0sRMn9pZ3RL+_ONCVB52s+EJgcRdqw@mail.gmail.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=mizhang@google.com \
    --cc=peterz@infradead.org \
    --cc=yangjihong1@huawei.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).