On Thu, 2020-01-23 at 10:03 +0100, Juergen Gross wrote:
> There are still several instances of cpumask_t on the stack in
> scheduling code. Avoid them as far as possible.
> 
> Signed-off-by: Juergen Gross <jgr...@suse.com>
>
Reviewed-by: Dario Faggioli <dfaggi...@suse.com>

Just curious...

> --- a/xen/common/sched/core.c
> +++ b/xen/common/sched/core.c
> @@ -2586,11 +2582,11 @@ static void schedule(void)
>  
>      if ( gran > 1 )
>      {
> -        cpumask_t mask;
> +        cpumask_t *mask = cpumask_scratch_cpu(cpu);
>  
>          prev->rendezvous_in_cnt = gran;
> -        cpumask_andnot(&mask, sr->cpus, cpumask_of(cpu));
> -        cpumask_raise_softirq(&mask, SCHED_SLAVE_SOFTIRQ);
> +        cpumask_andnot(mask, sr->cpus, cpumask_of(cpu));
> +        cpumask_raise_softirq(mask, SCHED_SLAVE_SOFTIRQ);
>
... why are we keeping the temporary variable (mask) ?

Thanks and Regards
-- 
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)

Attachment: 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

Reply via email to