Skip to content

Final cpumask conversion patches for 4096+ cpus

Rusty Russell lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6cpumask: truncate mm_struct.cpu_vm_mask for CONFIG_CPUMASK_OFFSTACKarch/x86/kernel/tboot.c include/linux/mm_types.h kernel/fork.c +1 more+25 -60 replies
2/6cpumask: use tsk_cpumask() to access task_struct cpus_allowed.arch/arm/mach-integrator/cpu.c arch/blackfin/kernel/process.c arch/ia64/kernel/cpufreq/acpi-cpufreq.c +25 more+63 -612 replies
3/6cpumask: truncate task_struct.cpus_allowed for CONFIG_CPUMASK_OFFSTACKinclude/linux/init_task.h include/linux/sched.h kernel/fork.c+24 -44 replies
4/6cpumask: select disabling obsolete cpumask functions on x86include/linux/cpumask.h include/linux/sched.h lib/Kconfig +1 more+9 -40 replies
5/6cpumask: remove struct cpumask definition when CONFIG_CPUMASK_OFFSTACK=yinclude/linux/cpumask.h+15 -00 replies
6/6cpumask: reduce cpumask_sizeinclude/linux/cpumask.h+2 -40 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchDavid S. MillerPaul Mundt
1/6
2/6A-b A-b
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] Final cpumask conversion patches for 4096+ cpus

Finally, these 6 patches actually allocate short (nr_cpu_ids-bits) cpumasks and nail down the lid so the compiler will find new abuses if they creep in.

For non-CONFIG_CPUMASK_OFFSTACK:
The only visible changes are that you have to use the accessors mm_cpumask() and tsk_cpumask. They convert the bitmaps (moved to the end of those structs) to 'struct cpumask *'.

For CONFIG_CPUMASK_OFFSTACK=y:
We allocate the mm and task_struct bitmaps short (nr_cpu_ids, rather than the compile-time NR_CPUS). A couple of patches get rid of the old-style cpus_ ops so noone uses them accidentally. We don't define struct cpumask at all, which prevents accidental abuse. Finally, we reduce cpumask_size() so our dynamically-allocated cpumasks are only nr_cpu_ids big.

Cheers,
Rusty.