/* Preempt the current task with a newly woken task if needed:  */
static void check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
/* Preempt the current task with a newly woken task if needed:  */
static void check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
{
	unsigned long ideal_runtime, delta_exec;
	ideal_runtime = sched_slice(cfs_rq, curr);
	delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime;
	if (delta_exec > ideal_runtime) {
		resched_task(rq_of(cfs_rq)->curr);
		clear_buddies(cfs_rq, curr);
		return;
	}
	if (!sched_feat(WAKEUP_PREEMPT))
		return;
	if (delta_exec < sysctl_sched_min_granularity)
		return;
	if (cfs_rq->nr_running > 1) {
		struct sched_entity *se = __pick_next_entity(cfs_rq);
		s64 delta = curr->vruntime - se->vruntime;
		if (delta > ideal_runtime)
			resched_task(rq_of(cfs_rq)->curr);
	}
}