Linux Operating System Source Code: IBM Patches

 
Scalable CPU Bitmasks
Description:
This patch implements a scalable bitmask specifically for tracking CPUs. It consists of a single file which simply adds a new datatype and supporting functions. It allows for future expansion to a CPU count which is not confined to the bit-size of (unsigned long). The new datatype (cpumap_t) and supporting functions are optimized at compile-time according to the definition of NR_CPUS.

While systems with more than 32 processors are still out in the future, these interfaces provide a path for gradual code migration. One of the primary goals is to provide current functionality without affecting performance. The following is a list of bitmasks that could be converted to the new datatype.

  • phys_cpu_present_map
  • cpu_initialized
  • wait_init_idle
  • cpu_online_map/cpu_present_mask
  • cpu_callin_map
  • cpu_callout_map

The cpu-phys_cpu_present patch modifies the phys_cpu_present_map bitmask to be a "scalable CPU bitmask". The datatype is changed to cpumap_t, and all accesses to the bitmask are done through the appropriate supporting functions. Note that this patch depends on the "Scalable CPU bitmasks" patch.

This patch affects i386 architecture specific code, but does not affect other architectures. Note that the x86_64 architecture uses a phys_cpu_present_map, but there is no shared use of the bitmask between architectures, and therefore no conflict.

Developer:
Russ Weight
Status:
Submitted to project

Notes:
The cpumap_to_ulong() and cpumap_ulong_to_cpumap() interfaces are provided specifically for migration. In their current form, they call BUG() if NR_CPUS is defined to be greater than the bit-size of (unsigned long).
Release Notes Date Files
2.5.7 Release Notes 2002-04-01  
  File Notes   cpumap-2.5.7.patch.gz
  File Notes   phys_cpu_present-2.5.7.patch.gz

Show all releases