xen/sched_rt: Move repl_timer into struct rt_private
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 29 Dec 2017 13:06:14 +0000 (13:06 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 12 Jan 2018 11:22:54 +0000 (11:22 +0000)
commit418ae6021d0a115ddbbf2b76a439c5327af66191
treed6f852ab3531397c9a92a7c000dcc35ce009e0d1
parent4d00a99dc8b16a1a65874d4906ec30b7bc1e3634
xen/sched_rt: Move repl_timer into struct rt_private

struct timer is only 48 bytes and repl_timer has a 1-to-1 correspondance with
struct rt_private, so having it referenced by pointer is wasteful.

This avoids one memory allocation in rt_init(), and the resulting diffstat is:

  add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-156 (-156)
  function                                     old     new   delta
  rt_switch_sched                              134     133      -1
  rt_context_saved                             278     271      -7
  rt_vcpu_remove                               253     245      -8
  rt_vcpu_sleep                                234     218     -16
  repl_timer_handler                           761     744     -17
  rt_deinit                                     44      20     -24
  rt_init                                      219     136     -83

As an extra bit of cleanup noticed while making this change, there is no need
to call cpumask_clear() on an zeroed memory allocation.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Dario Faggioli <dfaggioli@suse.com>
Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>
xen/common/sched_rt.c