Skip to content

RFC sched: Optimizations to sched_class processing

Steven Rostedt lkml 1 version Applied

Status from this message: The following commit has been merged into the sched/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 9 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4sched: Force the address order of each sched class descriptorinclude/asm-generic/vmlinux.lds.h kernel/sched/deadline.c kernel/sched/fair.c +3 more+29 -57 replies
2/4sched: Have sched_class_highest define by vmlinux.lds.hinclude/asm-generic/vmlinux.lds.h kernel/sched/sched.h+13 -71 reply
3/4sched: Remove struct sched_class next fieldinclude/asm-generic/vmlinux.lds.h kernel/sched/deadline.c kernel/sched/fair.c +4 more+4 -81 reply
4/4sched: Micro optimization in pick_next_task() and in check_preempt_curr()kernel/sched/core.c+9 -150 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/4] sched: Optimizations to sched_class processing

As Kirill made a micro-optimization to the processing of pick_next_task() that required the address locations of the sched_class descriptors to be that of their priority to one another. This required a linker script modification to guarantee that order.

After adding the forced order in the linker script, I realized that we no longer needed the 'next' field in the sched_class descriptor. Thus, I changed it to use the order of the linker script.

Then decided that the sched_class_highest define could be moved to the linker script as well to keep the defines of the order to be in one location, and it be obvious what the highest sched_class is when SMP is not configured. (BTW, I have not tested this with !CONFIG_SMP yet, but who does ;-). As the removal of next was a bit more invasive than the highest sched class change, I moved that to be the second patch.

Finally I added Kirill's patch at the end, (Which may not have made it to LKML due to trying to not get it mangled by Exchange).

Kirill Tkhai (1):
sched: Micro optimization in pick_next_task() and in check_preempt_curr()

Steven Rostedt (VMware) (3):
sched: Force the address order of each sched class descriptor
sched: Have sched_class_highest define by vmlinux.lds.h
sched: Remove struct sched_class next field

----

 include/asm-generic/vmlinux.lds.h | 29 +++++++++++++++++++++++++++++
 kernel/sched/core.c               | 24 +++++++++---------------
 kernel/sched/deadline.c           |  4 ++--
 kernel/sched/fair.c               |  4 ++--
 kernel/sched/idle.c               |  4 ++--
 kernel/sched/rt.c                 |  4 ++--
 kernel/sched/sched.h              | 13 +++++--------
 kernel/sched/stop_task.c          |  4 ++--
 8 files changed, 53 insertions(+), 33 deletions(-)