sched: remove PREEMPT_RESTRICT

remove PREEMPT_RESTRICT. (this is a separate commit so that any
regression related to the removal itself is bisectable)

Signed-off-by: Ingo Molnar <mingo@elte.hu>

+3 -12
-1
include/linux/sched.h
··· 863 863 struct load_weight load; /* for load-balancing */ 864 864 struct rb_node run_node; 865 865 unsigned int on_rq; 866 - int peer_preempt; 867 866 868 867 u64 exec_start; 869 868 u64 sum_exec_runtime;
+1 -3
kernel/sched.c
··· 460 460 SCHED_FEAT_TREE_AVG = 4, 461 461 SCHED_FEAT_APPROX_AVG = 8, 462 462 SCHED_FEAT_WAKEUP_PREEMPT = 16, 463 - SCHED_FEAT_PREEMPT_RESTRICT = 32, 464 463 }; 465 464 466 465 const_debug unsigned int sysctl_sched_features = ··· 467 468 SCHED_FEAT_START_DEBIT * 1 | 468 469 SCHED_FEAT_TREE_AVG * 0 | 469 470 SCHED_FEAT_APPROX_AVG * 0 | 470 - SCHED_FEAT_WAKEUP_PREEMPT * 1 | 471 - SCHED_FEAT_PREEMPT_RESTRICT * 0; 471 + SCHED_FEAT_WAKEUP_PREEMPT * 1; 472 472 473 473 #define sched_feat(x) (sysctl_sched_features & SCHED_FEAT_##x) 474 474
+2 -8
kernel/sched_fair.c
··· 546 546 547 547 update_stats_dequeue(cfs_rq, se); 548 548 if (sleep) { 549 - se->peer_preempt = 0; 550 549 #ifdef CONFIG_SCHEDSTATS 551 550 if (entity_is_task(se)) { 552 551 struct task_struct *tsk = task_of(se); ··· 573 574 574 575 ideal_runtime = sched_slice(cfs_rq, curr); 575 576 delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; 576 - if (delta_exec > ideal_runtime || 577 - (sched_feat(PREEMPT_RESTRICT) && curr->peer_preempt)) 577 + if (delta_exec > ideal_runtime) 578 578 resched_task(rq_of(cfs_rq)->curr); 579 - curr->peer_preempt = 0; 580 579 } 581 580 582 581 static void ··· 864 867 gran = calc_delta_fair(gran, &se->load); 865 868 866 869 if (delta > gran) { 867 - int now = !sched_feat(PREEMPT_RESTRICT); 868 - 869 - if (now || p->prio < curr->prio || !se->peer_preempt++) 870 + if (p->prio < curr->prio) 870 871 resched_task(curr); 871 872 } 872 873 } ··· 1078 1083 swap(curr->vruntime, se->vruntime); 1079 1084 } 1080 1085 1081 - se->peer_preempt = 0; 1082 1086 enqueue_task_fair(rq, p, 0); 1083 1087 resched_task(rq->curr); 1084 1088 }