Thread (30 messages) 30 messages, 9 authors, 2021-06-18

Re: [PATCH 3/6] sched,perf,kvm: Fix preemption condition

From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-06-02 14:24:02
Also in: dm-devel, kvm, linux-block, linux-fsdevel, linux-mm, linux-perf-users, linux-pm, linux-usb, lkml, netdev, rcu

On Wed, Jun 02, 2021 at 10:15:16AM -0400, Mathieu Desnoyers wrote:
----- On Jun 2, 2021, at 9:12 AM, Peter Zijlstra peterz@infradead.org wrote:
[...]
quoted
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -8568,13 +8568,12 @@ static void perf_event_switch(struct tas
		},
	};

-	if (!sched_in && task->state == TASK_RUNNING)
+	if (!sched_in && current->on_rq) {
		switch_event.event_id.header.misc |=
				PERF_RECORD_MISC_SWITCH_OUT_PREEMPT;
+	}

-	perf_iterate_sb(perf_event_switch_output,
-		       &switch_event,
-		       NULL);
+	perf_iterate_sb(perf_event_switch_output, &switch_event, NULL);
}
There is a lot of code cleanup going on here which does not seem to belong
to a "Fix" patch.
Maybe, but I so hate whitespace only patches :-/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help