<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/events, branch v5.10</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.10</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.10'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-11-09T17:12:36Z</updated>
<entry>
<title>perf: Tweak perf_event_attr::exclusive semantics</title>
<updated>2020-11-09T17:12:36Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2020-10-29T15:32:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1908dc911792067287458fdb0800f036f4f4e0f6'/>
<id>urn:sha1:1908dc911792067287458fdb0800f036f4f4e0f6</id>
<content type='text'>
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) &lt;peterz@infradead.org&gt;
Link: https://lkml.kernel.org/r/20201029162902.105962225@infradead.org
</content>
</entry>
<entry>
<title>perf: Fix event multiplexing for exclusive groups</title>
<updated>2020-11-09T17:12:36Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2020-10-29T15:29:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2714c3962f304d031d5016c963c4b459337b0749'/>
<id>urn:sha1:2714c3962f304d031d5016c963c4b459337b0749</id>
<content type='text'>
Commit 9e6302056f80 ("perf: Use hrtimers for event multiplexing")
placed the hrtimer (re)start call in the wrong place.  Instead of
capturing all scheduling failures, it only considered the PMU failure.

The result is that groups using perf_event_attr::exclusive are no
longer rotated.

Fixes: 9e6302056f80 ("perf: Use hrtimers for event multiplexing")
Reported-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lkml.kernel.org/r/20201029162902.038667689@infradead.org
</content>
</entry>
<entry>
<title>perf: Simplify group_sched_in()</title>
<updated>2020-11-09T17:12:35Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2020-10-29T15:29:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=251ff2d49347793d348babcff745289b11910e96'/>
<id>urn:sha1:251ff2d49347793d348babcff745289b11910e96</id>
<content type='text'>
Collate the error paths. Code duplication only leads to divergence and
extra bugs.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lkml.kernel.org/r/20201029162901.972161394@infradead.org
</content>
</entry>
<entry>
<title>perf: Simplify group_sched_out()</title>
<updated>2020-11-09T17:12:35Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2020-10-29T15:28:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c7855d82933bab7fa5e96f0e568fc125c2e1ab4'/>
<id>urn:sha1:8c7855d82933bab7fa5e96f0e568fc125c2e1ab4</id>
<content type='text'>
Since event_sched_out() clears cpuctx-&gt;exclusive upon removal of an
exclusive event (and only group leaders can be exclusive), there is no
point in group_sched_out() trying to do it too. It is impossible for
cpuctx-&gt;exclusive to still be set here.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lkml.kernel.org/r/20201029162901.904060564@infradead.org
</content>
</entry>
<entry>
<title>perf/arch: Remove perf_sample_data::regs_user_copy</title>
<updated>2020-11-09T17:12:34Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2020-10-30T11:14:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=76a4efa80900fc40e0fdf243b42aec9fb8c35d24'/>
<id>urn:sha1:76a4efa80900fc40e0fdf243b42aec9fb8c35d24</id>
<content type='text'>
struct perf_sample_data lives on-stack, we should be careful about it's
size. Furthermore, the pt_regs copy in there is only because x86_64 is a
trainwreck, solve it differently.

Reported-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Tested-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Link: https://lkml.kernel.org/r/20201030151955.258178461@infradead.org
</content>
</entry>
<entry>
<title>perf: Optimize get_recursion_context()</title>
<updated>2020-11-09T17:12:34Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2020-10-30T12:43:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=09da9c81253dd8e43e0d2d7cea02de6f9f19499d'/>
<id>urn:sha1:09da9c81253dd8e43e0d2d7cea02de6f9f19499d</id>
<content type='text'>
  "Look ma, no branches!"

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Link: https://lkml.kernel.org/r/20201030151955.187580298@infradead.org
</content>
</entry>
<entry>
<title>perf: Fix get_recursion_context()</title>
<updated>2020-11-09T17:12:34Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2020-10-30T11:49:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ce0f17fc93f63ee91428af10b7b2ddef38cd19e5'/>
<id>urn:sha1:ce0f17fc93f63ee91428af10b7b2ddef38cd19e5</id>
<content type='text'>
One should use in_serving_softirq() to detect SoftIRQ context.

Fixes: 96f6d4444302 ("perf_counter: avoid recursion")
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lkml.kernel.org/r/20201030151955.120572175@infradead.org
</content>
</entry>
<entry>
<title>perf: Reduce stack usage of perf_output_begin()</title>
<updated>2020-11-09T17:12:33Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2020-10-30T14:50:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=267fb27352b6fc9fdbad753127a239f75618ecbc'/>
<id>urn:sha1:267fb27352b6fc9fdbad753127a239f75618ecbc</id>
<content type='text'>
__perf_output_begin() has an on-stack struct perf_sample_data in the
unlikely case it needs to generate a LOST record. However, every call
to perf_output_begin() must already have a perf_sample_data on-stack.

Reported-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lkml.kernel.org/r/20201030151954.985416146@infradead.org
</content>
</entry>
<entry>
<title>perf/core: Fix a memory leak in perf_event_parse_addr_filter()</title>
<updated>2020-11-07T12:07:26Z</updated>
<author>
<name>kiyin(尹亮)</name>
<email>kiyin@tencent.com</email>
</author>
<published>2020-11-04T05:23:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7bdb157cdebbf95a1cd94ed2e01b338714075d00'/>
<id>urn:sha1:7bdb157cdebbf95a1cd94ed2e01b338714075d00</id>
<content type='text'>
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().

There are three possible ways that this could happen:

 - It could be allocated twice on subsequent iterations through the loop,
 - or leaked on the success path,
 - or on the failure path.

Clean up the code flow to make it obvious that 'filename' is always
freed in the reallocation path and in the two return paths as well.

We rely on the fact that kfree(NULL) is NOP and filename is initialized
with NULL.

This fixes the leak. No other side effects expected.

[ Dan Carpenter: cleaned up the code flow &amp; added a changelog. ]
[ Ingo Molnar: updated the changelog some more. ]

Fixes: 375637bc5249 ("perf/core: Introduce address range filtering")
Signed-off-by: "kiyin(尹亮)" &lt;kiyin@tencent.com&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: "Srivatsa S. Bhat" &lt;srivatsa@csail.mit.edu&gt;
Cc: Anthony Liguori &lt;aliguori@amazon.com&gt;
--
 kernel/events/core.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
</content>
</entry>
<entry>
<title>task_work: cleanup notification modes</title>
<updated>2020-10-17T21:05:30Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2020-10-16T15:02:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=91989c707884ecc7cd537281ab1a4b8fb7219da3'/>
<id>urn:sha1:91989c707884ecc7cd537281ab1a4b8fb7219da3</id>
<content type='text'>
A previous commit changed the notification mode from true/false to an
int, allowing notify-no, notify-yes, or signal-notify. This was
backwards compatible in the sense that any existing true/false user
would translate to either 0 (on notification sent) or 1, the latter
which mapped to TWA_RESUME. TWA_SIGNAL was assigned a value of 2.

Clean this up properly, and define a proper enum for the notification
mode. Now we have:

- TWA_NONE. This is 0, same as before the original change, meaning no
  notification requested.
- TWA_RESUME. This is 1, same as before the original change, meaning
  that we use TIF_NOTIFY_RESUME.
- TWA_SIGNAL. This uses TIF_SIGPENDING/JOBCTL_TASK_WORK for the
  notification.

Clean up all the callers, switching their 0/1/false/true to using the
appropriate TWA_* mode for notifications.

Fixes: e91b48162332 ("task_work: teach task_work_add() to do signal_wake_up()")
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
