On Wed, Oct 23, 2019 at 11:37:57AM +0200, Peter Zijlstra wrote: > Further, since we set it on reschedule, I propose you change the above > like: > > if (ctx->rotate_necessary) { > int type = get_event_type(event); > /* > * comment.. > */ > if (type & EVENT_PINNED) > type |= EVENT_FLEXIBLE; > + /* > + * Will be reset by ctx_resched()'s flexible_sched_in(). > + */ > + ctx->rotate_necessary = 0; > ctx_resched(cpuctx, cpuctx->task_ctx, type); > }
n/m, that is already done through ctx_sched_out().