Merge tag 'perf-urgent-2025-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull misc perf events fixes from Ingo Molnar: - Use POLLERR for events in error state, instead of the ambiguous POLLHUP error value - Fix non-sampling (counting) events on certain x86 platforms * tag 'perf-urgent-2025-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86: Fix non-sampling (counting) events on certain x86 platforms perf/core: Change to POLLERR for pinned events with error
This commit is contained in:
@@ -629,7 +629,7 @@ int x86_pmu_hw_config(struct perf_event *event)
|
||||
if (event->attr.type == event->pmu->type)
|
||||
event->hw.config |= x86_pmu_get_event_config(event);
|
||||
|
||||
if (!event->attr.freq && x86_pmu.limit_period) {
|
||||
if (is_sampling_event(event) && !event->attr.freq && x86_pmu.limit_period) {
|
||||
s64 left = event->attr.sample_period;
|
||||
x86_pmu.limit_period(event, &left);
|
||||
if (left > event->attr.sample_period)
|
||||
|
||||
@@ -3943,7 +3943,7 @@ static int merge_sched_in(struct perf_event *event, void *data)
|
||||
perf_event_set_state(event, PERF_EVENT_STATE_ERROR);
|
||||
|
||||
if (*perf_event_fasync(event))
|
||||
event->pending_kill = POLL_HUP;
|
||||
event->pending_kill = POLL_ERR;
|
||||
|
||||
perf_event_wakeup(event);
|
||||
} else {
|
||||
@@ -6075,7 +6075,7 @@ static __poll_t perf_poll(struct file *file, poll_table *wait)
|
||||
|
||||
if (unlikely(READ_ONCE(event->state) == PERF_EVENT_STATE_ERROR &&
|
||||
event->attr.pinned))
|
||||
return events;
|
||||
return EPOLLERR;
|
||||
|
||||
/*
|
||||
* Pin the event->rb by taking event->mmap_mutex; otherwise
|
||||
|
||||
Reference in New Issue
Block a user