Re: [PATCH 13/16] time: optimize tick_setup_device()

Peter Zijlstra
2022-07-18T21:36:31Z

On Mon, Jul 18, 2022 at 12:28:41PM -0700, Yury Norov wrote:
> kernel/time/tick-common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
> index 7205f76f8d10..7b2da8ef09ef 100644
> --- a/kernel/time/tick-common.c
> +++ b/kernel/time/tick-common.c
> @@ -255,7 +255,7 @@ static void tick_setup_device(struct tick_device *td,
> * When the device is not per cpu, pin the interrupt to the
> * current cpu:
> */
> - if (!cpumask_equal(newdev->cpumask, cpumask))
> + if (newdev->cpumask != cpumask && !cpumask_equal(newdev->cpumask, cpumask))
> irq_set_affinity(newdev->irq, cpumask);

This is again making a slow path harder to read for now benefit.