mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/5] cpumask: Use cpumask_intersects* APIs where applicable
@ 2026-11-11  7:59 Shrikanth Hegde
  2026-11-11  7:59 ` [PATCH 1/5] sched/rt: cpupri_find: Use cpumask_intersects " Shrikanth Hegde
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Shrikanth Hegde @ 2026-11-11  7:59 UTC (permalink / raw)
  To: linux-kernel, yury.norov, linux-perf-users
  Cc: sshegde, mingo, peterz, juri.lelli, vincent.guittot, tglx,
	sudeep.holla, linux

It was observed while working on cpumask_intersects_and, check like
below could use it instead.

if (cpumask_first_and_and() < nr_cpu_ids)

While there, did check the code for any such similar patterns of
cpumask_any_and, cpumask_first_and and explicit loops where
cpu found by these APIs are not being used. All those callsites
instead can simply use cpumask_intersects.

Note that few more places can use similar change. But, I have left
them as is. 
drivers/net/ethernet/sfc/efx_channels.c+370
drivers/net/ethernet/sfc/siena/efx_channels.c+371
drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c+153

Also, these patches can combined into three patches if that is
easier for review/merge. I have kept it separate since they belong
to different subsystems.

Shrikanth Hegde (5):
  sched/rt: cpupri_find: Use cpumask_intersects where applicable
  cpu/hotplug: Use cpumask_intersects where applicable
  perf: Use cpumask_intersects where applicable
  cpuidle: Use cpumask_intersects_and where applicable
  arch_topology: Use cpumask_intersects where applicable

 drivers/base/arch_topology.c | 9 +--------
 drivers/cpuidle/coupled.c    | 4 ++--
 kernel/cpu.c                 | 3 +--
 kernel/events/core.c         | 7 ++-----
 kernel/sched/cpupri.c        | 2 +-
 5 files changed, 7 insertions(+), 18 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-11  8:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11  7:59 [PATCH 0/5] cpumask: Use cpumask_intersects* APIs where applicable Shrikanth Hegde
2026-11-11  7:59 ` [PATCH 1/5] sched/rt: cpupri_find: Use cpumask_intersects " Shrikanth Hegde
2026-11-11  7:59 ` [PATCH 2/5] cpu/hotplug: " Shrikanth Hegde
2026-11-11  7:59 ` [PATCH 3/5] perf: " Shrikanth Hegde
2026-11-11  7:59 ` [PATCH 4/5] cpuidle: Use cpumask_intersects_and " Shrikanth Hegde
2026-11-11  7:59 ` [PATCH 5/5] arch_topology: Use cpumask_intersects " Shrikanth Hegde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®