summaryrefslogtreecommitdiff
path: root/drivers/media/test_drivers/vimc/vimc-sensor.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2025-10-08 13:43:26 -1000
committerTejun Heo <tj@kernel.org>2025-10-13 08:42:19 -1000
commit14c1da3895a116f4e32c20487046655f26d3999b (patch)
treea721afcd917dcebe67df5ce433975810d2217066 /drivers/media/test_drivers/vimc/vimc-sensor.c
parenta8ad873113d3fe01f9b5d737d4b0570fa36826b0 (diff)
sched_ext: Allocate scx_kick_cpus_pnt_seqs lazily using kvzalloc()
On systems with >4096 CPUs, scx_kick_cpus_pnt_seqs allocation fails during boot because it exceeds the 32,768 byte percpu allocator limit. Restructure to use DEFINE_PER_CPU() for the per-CPU pointers, with each CPU pointing to its own kvzalloc'd array. Move allocation from boot time to scx_enable() and free in scx_disable(), so the O(nr_cpu_ids^2) memory is only consumed when sched_ext is active. Use RCU to guard against racing with free. Arrays are freed via call_rcu() and kick_cpus_irq_workfn() uses rcu_dereference_bh() with a NULL check. While at it, rename to scx_kick_pseqs for brevity and update comments to clarify these are pick_task sequence numbers. v2: RCU protect scx_kick_seqs to manage kick_cpus_irq_workfn() racing against disable as per Andrea. v3: Fix bugs notcied by Andrea. Reported-by: Phil Auld <pauld@redhat.com> Link: http://lkml.kernel.org/r/20251007133523.GA93086@pauld.westford.csb Cc: Andrea Righi <arighi@nvidia.com> Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com> Reviewed-by: Phil Auld <pauld@redhat.com> Reviewed-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/media/test_drivers/vimc/vimc-sensor.c')
0 files changed, 0 insertions, 0 deletions