From: Ravi Bangoria <ravi.bangoria@amd.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: acme@kernel.org, alexander.shishkin@linux.intel.com,
jolsa@redhat.com, namhyung@kernel.org, songliubraving@fb.com,
eranian@google.com, ak@linux.intel.com, mark.rutland@arm.com,
frederic@kernel.org, maddy@linux.ibm.com, irogers@google.com,
will@kernel.org, robh@kernel.org, mingo@redhat.com,
catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
sandipan.das@amd.com, ananth.narayan@amd.com,
kim.phillips@amd.com, santosh.shukla@amd.com,
Ravi Bangoria <ravi.bangoria@amd.com>
Subject: Re: [PATCH] perf: Rewrite core context handling
Date: Mon, 10 Oct 2022 16:29:45 +0530 [thread overview]
Message-ID: <aa2484ea-03b1-f3fd-339e-145e3fb79c78@amd.com> (raw)
In-Reply-To: <Y0PwgBz6asJOHSan@hirez.programming.kicks-ass.net>
On 10-Oct-22 3:44 PM, Peter Zijlstra wrote:
> On Wed, Sep 07, 2022 at 04:58:49PM +0530, Ravi Bangoria wrote:
>>> -static void
>>> -ctx_flexible_sched_in(struct perf_event_context *ctx,
>>> - struct perf_cpu_context *cpuctx)
>>> +/* XXX .busy thingy from Peter's patch */
>>> +static void ctx_flexible_sched_in(struct perf_event_context *ctx, struct pmu *pmu)
>>
>> This one turned out to be very easy. Given that, we iterate over each
>> pmu, we can just return error if we fail to schedule any flexible event.
>> (It wouldn't be straight forward like this if we needed to implement
>> pmu=NULL optimization.)
>>
>> ---
>> diff --git a/kernel/events/core.c b/kernel/events/core.c
>> index e0232e0bb74e..923656af73fe 100644
>> --- a/kernel/events/core.c
>> +++ b/kernel/events/core.c
>> @@ -3751,6 +3751,7 @@ static int merge_sched_in(struct perf_event *event, void *data)
>> cpc = this_cpu_ptr(event->pmu_ctx->pmu->cpu_pmu_context);
>> perf_mux_hrtimer_restart(cpc);
>> group_update_userpage(event);
>> + return -EBUSY;
>> }
>> }
>>
>
> I'm afraid this breaks things; consider:
>
> f79256532682 ("perf/core: fix userpage->time_enabled of inactive events")
>
> I totally hate this -- because it means we *HAVE* to iterate the
> inactive events, but alas.
Sure. Will drop this.
Thanks,
Ravi
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-10-10 11:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220829113347.295-1-ravi.bangoria@amd.com>
2022-08-29 12:04 ` [PATCH] perf: Rewrite core context handling Peter Zijlstra
2022-08-29 14:40 ` Peter Zijlstra
2022-09-01 10:35 ` Ravi Bangoria
2022-09-01 11:29 ` Peter Zijlstra
2022-09-05 4:40 ` Ravi Bangoria
2022-09-06 5:50 ` Ravi Bangoria
2022-10-10 10:23 ` Peter Zijlstra
2022-10-10 11:01 ` Ravi Bangoria
2022-09-07 11:28 ` Ravi Bangoria
2022-10-10 10:14 ` Peter Zijlstra
2022-10-10 10:59 ` Ravi Bangoria [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=aa2484ea-03b1-f3fd-339e-145e3fb79c78@amd.com \
--to=ravi.bangoria@amd.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=ananth.narayan@amd.com \
--cc=catalin.marinas@arm.com \
--cc=eranian@google.com \
--cc=frederic@kernel.org \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=kim.phillips@amd.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=robh@kernel.org \
--cc=sandipan.das@amd.com \
--cc=santosh.shukla@amd.com \
--cc=songliubraving@fb.com \
--cc=will@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;
as well as URLs for NNTP newsgroup(s).