Commit b30f0e3
sched/preempt: Optimize preemption operations on __schedule() callers
__schedule() disables preemption and some of its callers
(the preempt_schedule*() family) also set PREEMPT_ACTIVE.
So we have two preempt_count() modifications that could be performed
at once.
Lets remove the preemption disablement from __schedule() and pull
this responsibility to its callers in order to optimize preempt_count()
operations in a single place.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1431441711-29753-5-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>1 parent 90b62b5 commit b30f0e3
2 files changed
+21
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
140 | 152 | | |
141 | 153 | | |
142 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2773 | 2773 | | |
2774 | 2774 | | |
2775 | 2775 | | |
2776 | | - | |
2777 | | - | |
2778 | | - | |
| 2776 | + | |
2779 | 2777 | | |
2780 | 2778 | | |
2781 | 2779 | | |
| |||
2784 | 2782 | | |
2785 | 2783 | | |
2786 | 2784 | | |
2787 | | - | |
2788 | 2785 | | |
2789 | 2786 | | |
2790 | 2787 | | |
| |||
2848 | 2845 | | |
2849 | 2846 | | |
2850 | 2847 | | |
2851 | | - | |
2852 | | - | |
2853 | 2848 | | |
2854 | 2849 | | |
2855 | 2850 | | |
| |||
2870 | 2865 | | |
2871 | 2866 | | |
2872 | 2867 | | |
| 2868 | + | |
2873 | 2869 | | |
| 2870 | + | |
2874 | 2871 | | |
2875 | 2872 | | |
2876 | 2873 | | |
| |||
2909 | 2906 | | |
2910 | 2907 | | |
2911 | 2908 | | |
2912 | | - | |
| 2909 | + | |
2913 | 2910 | | |
2914 | | - | |
| 2911 | + | |
2915 | 2912 | | |
2916 | 2913 | | |
2917 | 2914 | | |
2918 | 2915 | | |
2919 | 2916 | | |
2920 | | - | |
2921 | 2917 | | |
2922 | 2918 | | |
2923 | 2919 | | |
| |||
2964 | 2960 | | |
2965 | 2961 | | |
2966 | 2962 | | |
2967 | | - | |
| 2963 | + | |
2968 | 2964 | | |
2969 | 2965 | | |
2970 | 2966 | | |
| |||
2974 | 2970 | | |
2975 | 2971 | | |
2976 | 2972 | | |
2977 | | - | |
2978 | | - | |
| 2973 | + | |
2979 | 2974 | | |
2980 | 2975 | | |
2981 | 2976 | | |
| |||
2999 | 2994 | | |
3000 | 2995 | | |
3001 | 2996 | | |
3002 | | - | |
| 2997 | + | |
3003 | 2998 | | |
3004 | 2999 | | |
3005 | 3000 | | |
3006 | | - | |
3007 | | - | |
3008 | | - | |
3009 | | - | |
3010 | | - | |
3011 | | - | |
3012 | | - | |
| 3001 | + | |
3013 | 3002 | | |
3014 | 3003 | | |
3015 | 3004 | | |
| |||
0 commit comments