Re: [RFC PATCH v1 1/1] wq: Avoid using isolated cpus' timers on unbounded queue_delayed_work

From: Tejun Heo
Date: Wed Jan 24 2024 - 16:47:42 EST


On Wed, Jan 24, 2024 at 05:29:37AM -0300, Leonardo Bras wrote:
> + /*
> + * If the work is cpu-unbound, and cpu isolation is in place, only
> + * schedule use timers from housekeeping cpus. In favor of avoiding
> + * cacheline bouncing, run the WQ in the same cpu as the timer.
> + */
> + if (cpu == WORK_CPU_UNBOUND && housekeeping_enabled(HK_TYPE_TIMER))
> + cpu = housekeeping_any_cpu(HK_TYPE_TIMER);

Would it make more sense to use wq_unbound_cpumask?

Thanks.

--
tejun