Re: [Xen-devel] [PATCH] xen/sched_rt: Move repl_timer into struct rt_private

2018-01-11 Thread Meng Xu
On Thu, Jan 11, 2018 at 12:00 PM, Andrew Cooper
 wrote:
>
> 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_sleep234 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 
> ---


Reviewed-by: Meng Xu 

Thanks,

Meng

---
Meng Xu
Ph.D. Candidate in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] xen/sched_rt: Move repl_timer into struct rt_private

2018-01-11 Thread Dario Faggioli
On Thu, 2018-01-11 at 17:00 +, Andrew Cooper wrote:
> 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_sleep234 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 
>
Acked-by: Dario Faggioli 

Regards,
Dario
-- 
<> (Raistlin Majere)
-
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Software Engineer @ SUSE https://www.suse.com/

signature.asc
Description: This is a digitally signed message part
___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel