Re: [RFC] perf evlist: Warn if event group has mixed sw/hw events

2020-11-05 Thread Stephane Eranian
On Mon, Oct 26, 2020 at 7:19 AM Namhyung Kim wrote: > > I found that order of events in a group impacts performance during the > open. If a group has a software event as a leader and has other > hardware events, the lead needs to be moved to a hardware context. > This includes RCU synchronization

Re: [RFC] perf evlist: Warn if event group has mixed sw/hw events

2020-10-26 Thread Namhyung Kim
Hi, On Tue, Oct 27, 2020 at 12:49 AM Alexander Shishkin wrote: > > Andi Kleen writes: > > > On Mon, Oct 26, 2020 at 11:19:37PM +0900, Namhyung Kim wrote: > >> This patch just added a warning before running it. I'd really want to > >> fix the kernel if possible but don't have a good idea. Thoug

Re: [RFC] perf evlist: Warn if event group has mixed sw/hw events

2020-10-26 Thread Namhyung Kim
Hi Andi, On Tue, Oct 27, 2020 at 12:21 AM Andi Kleen wrote: > > On Mon, Oct 26, 2020 at 11:19:37PM +0900, Namhyung Kim wrote: > > This patch just added a warning before running it. I'd really want to > > fix the kernel if possible but don't have a good idea. Thoughts? > > The easiest fix would

Re: [RFC] perf evlist: Warn if event group has mixed sw/hw events

2020-10-26 Thread Alexander Shishkin
Andi Kleen writes: > On Mon, Oct 26, 2020 at 11:19:37PM +0900, Namhyung Kim wrote: >> This patch just added a warning before running it. I'd really want to >> fix the kernel if possible but don't have a good idea. Thoughts? > > The easiest fix would be some multi threading in perf stat opening,

Re: [RFC] perf evlist: Warn if event group has mixed sw/hw events

2020-10-26 Thread Andi Kleen
On Mon, Oct 26, 2020 at 11:19:37PM +0900, Namhyung Kim wrote: > This patch just added a warning before running it. I'd really want to > fix the kernel if possible but don't have a good idea. Thoughts? The easiest fix would be some multi threading in perf stat opening, then then extra latencies c

[RFC] perf evlist: Warn if event group has mixed sw/hw events

2020-10-26 Thread Namhyung Kim
I found that order of events in a group impacts performance during the open. If a group has a software event as a leader and has other hardware events, the lead needs to be moved to a hardware context. This includes RCU synchronization which takes about 20 msec on my system. And this is just for