From: "tip-bot2 for Peter Zijlstra" <tip-bot2@linutronix.de> To: linux-tip-commits@vger.kernel.org Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>, x86@kernel.org, linux-kernel@vger.kernel.org Subject: [tip: perf/urgent] perf: Tweak perf_event_attr::exclusive semantics Date: Tue, 10 Nov 2020 12:45:17 -0000 Message-ID: <160501231753.11244.9753179853237971652.tip-bot2@tip-bot2> (raw) In-Reply-To: <20201029162902.105962225@infradead.org> The following commit has been merged into the perf/urgent branch of tip: Commit-ID: 1908dc911792067287458fdb0800f036f4f4e0f6 Gitweb: https://git.kernel.org/tip/1908dc911792067287458fdb0800f036f4f4e0f6 Author: Peter Zijlstra <peterz@infradead.org> AuthorDate: Thu, 29 Oct 2020 16:32:22 +01:00 Committer: Peter Zijlstra <peterz@infradead.org> CommitterDate: Mon, 09 Nov 2020 18:12:36 +01:00 perf: Tweak perf_event_attr::exclusive semantics Currently perf_event_attr::exclusive can be used to ensure an event(group) is the sole group scheduled on the PMU. One consequence is that when you have a pinned event (say the watchdog) you can no longer have regular exclusive event(group)s. Inspired by the fact that !pinned events are considered less strict, allow !pinned,exclusive events to share the PMU with pinned,!exclusive events. Pinned,exclusive is still fully exclusive. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20201029162902.105962225@infradead.org --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 00be48a..dc568ca 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -2637,7 +2637,7 @@ static int group_can_go_on(struct perf_event *event, * If this group is exclusive and there are already * events on the CPU, it can't go on. */ - if (event->attr.exclusive && cpuctx->active_oncpu) + if (event->attr.exclusive && !list_empty(get_event_list(event))) return 0; /* * Otherwise, try to add it if all previous groups were able
next prev parent reply index Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-29 16:27 [PATCH v2 0/4] perf: Fix perf_event_attr::exclusive rotation Peter Zijlstra 2020-10-29 16:27 ` [PATCH v2 1/4] perf: Simplify group_sched_out() Peter Zijlstra 2020-11-10 12:45 ` [tip: perf/urgent] " tip-bot2 for Peter Zijlstra 2020-10-29 16:27 ` [PATCH v2 2/4] perf: Simplify group_sched_in() Peter Zijlstra 2020-11-10 12:45 ` [tip: perf/urgent] " tip-bot2 for Peter Zijlstra 2020-10-29 16:27 ` [PATCH v2 3/4] perf: Fix event multiplexing for exclusive groups Peter Zijlstra 2020-11-10 12:45 ` [tip: perf/urgent] " tip-bot2 for Peter Zijlstra 2020-10-29 16:27 ` [PATCH v2 4/4] perf: Tweak perf_event_attr::exclusive semantics Peter Zijlstra 2020-11-10 12:45 ` tip-bot2 for Peter Zijlstra [this message] 2020-10-31 23:44 ` [PATCH v2 0/4] perf: Fix perf_event_attr::exclusive rotation Jiri Olsa 2020-11-02 3:52 ` Andi Kleen 2020-11-02 14:16 ` Peter Zijlstra 2020-11-03 2:41 ` Andi Kleen 2020-11-09 11:48 ` Peter Zijlstra
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=160501231753.11244.9753179853237971652.tip-bot2@tip-bot2 \ --to=tip-bot2@linutronix.de \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-tip-commits@vger.kernel.org \ --cc=peterz@infradead.org \ --cc=x86@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
LKML Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \ linux-kernel@vger.kernel.org public-inbox-index lkml Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git