Re: [RFC 1/2] perf/core: Enable sched_task callbacks if PMU has it

2020-11-06 Thread Liang, Kan
On 11/5/2020 7:53 PM, Namhyung Kim wrote: On Fri, Nov 6, 2020 at 4:01 AM Liang, Kan wrote: On 11/5/2020 10:45 AM, Namhyung Kim wrote: Hello, On Thu, Nov 5, 2020 at 11:47 PM Liang, Kan wrote: On 11/2/2020 9:52 AM, Namhyung Kim wrote: If an event associated with a PMU which has a

Re: [RFC 1/2] perf/core: Enable sched_task callbacks if PMU has it

2020-11-05 Thread Namhyung Kim
On Fri, Nov 6, 2020 at 4:01 AM Liang, Kan wrote: > > > > On 11/5/2020 10:45 AM, Namhyung Kim wrote: > > Hello, > > > > On Thu, Nov 5, 2020 at 11:47 PM Liang, Kan > > wrote: > >> > >> > >> > >> On 11/2/2020 9:52 AM, Namhyung Kim wrote: > >>> If an event associated with a PMU which has a

Re: [RFC 1/2] perf/core: Enable sched_task callbacks if PMU has it

2020-11-05 Thread Liang, Kan
On 11/5/2020 10:45 AM, Namhyung Kim wrote: Hello, On Thu, Nov 5, 2020 at 11:47 PM Liang, Kan wrote: On 11/2/2020 9:52 AM, Namhyung Kim wrote: If an event associated with a PMU which has a sched_task callback, it should be called regardless of cpu/task context. For example, I don't

Re: [RFC 1/2] perf/core: Enable sched_task callbacks if PMU has it

2020-11-05 Thread Namhyung Kim
Hello, On Thu, Nov 5, 2020 at 11:47 PM Liang, Kan wrote: > > > > On 11/2/2020 9:52 AM, Namhyung Kim wrote: > > If an event associated with a PMU which has a sched_task callback, > > it should be called regardless of cpu/task context. For example, > > > I don't think it's necessary. We should

Re: [RFC 1/2] perf/core: Enable sched_task callbacks if PMU has it

2020-11-05 Thread Liang, Kan
On 11/2/2020 9:52 AM, Namhyung Kim wrote: If an event associated with a PMU which has a sched_task callback, it should be called regardless of cpu/task context. For example, I don't think it's necessary. We should call it when we have to. Otherwise, it just waste cycles. Shouldn't the

[RFC 1/2] perf/core: Enable sched_task callbacks if PMU has it

2020-11-02 Thread Namhyung Kim
If an event associated with a PMU which has a sched_task callback, it should be called regardless of cpu/task context. For example, a per-cpu event might enable large PEBS buffers so it needs to flush the buffer whenever task scheduling happens. The underlying PMU may or may not require this for