Daily MaverickEU agrees to expand and strengthen carbon emissions border levyPunch2027: Underestimate Tinubu at your peril, Duke warns oppositionThe Jerusalem PostNorth Korea's Kim Jong Un arrived in Beijing by armored train for his first state visit to ChinaInquirer EntertainmentAlexa Ilacad distances herself from nepo babies who abuse privilegeInquirerPNP refutes allegations of running online troll farmObservador DesportoCanadá: ciberataque com IA contra sistemas governamentaisSudinfoLe meurtrier de Tania, Kim et Ken identifié plus de 30 ans après les faits... mais il ne pourra pas être jugéFotogramasTom Cruise, sobre su relación con Penélope Cruz hace 25 años: "Al ser española, tuve que aprender su idioma para descifrar qué estaba hablando su familia cuando estaba con ella"الشرقأستراليا.. رسوم جديدة للحد من الهجرة وتجاوز فترات الإقامةNOSRapport: Rusland 'verplaatste' 38.601 kinderen uit Oekraïne, indoctrinatie in kampenVanguardState police should be adopted cautiously – SoworeCNN بالعربيةجلد أسود وأحمر شفاه.. هيفاء وهبي بإطلالة شتوية جريئة في بيروت
The Daily Newsstand · Free, Always
Tuesday, December 1, 2026

You are reading Joho no Todai on KioskNews: newspapers from many countries on one stand, each linked to its original. What other papers report

Linux 7.5 Development Branch Speeds Up CPU Allocation With Simpler cgroup Overlap Checks

Translate

On December 1, 2026, a Linux kernel cgroup maintainer announced that four patches from a ByteDance developer had been picked up for Linux 7.5. A Red Hat developer reviewed the series, which landed in cgroup/for-7.5.

Linux cgroups organize processes into a hierarchy and manage resources such as CPU time and memory. The cgroup v2 cpuset controller specifies which CPUs each group's tasks may use. Its effective CPU set is constrained by its parent.

In the second version of the series on November 30, the ByteDance developer described running dense container environments on large physical servers. One server can have many root partitions dividing its CPUs. The company redistributes CPUs while workloads are running based on CPU pressure stall information (PSI) for each partition, which measures how long tasks stall waiting for CPU resources.

When allocations change with demand, reallocating the resources itself should be inexpensive. The old implementation did more management work as the number of partitions or groups grew, a problem that became apparent on large systems.

Checking for CPU overlap in one pass

When Linux creates a root partition or changes its CPU range, it may rebuild scheduling domains, which balance workloads across CPUs. During a rebuild it checks whether the effective CPU sets of load-balancing root partitions overlap.

The old implementation compared every pair among the partitions' nonempty effective CPU masks, bitmaps representing sets of CPUs. The number of comparisons grew quadratically with the number of partitions.

The new implementation starts by copying the first partition's CPU mask into a scratch mask. It checks the next partition's mask against the scratch mask and then adds that partition's CPUs to it. Repeating this process detects overlaps in a single pass.

With 128 nonempty masks, for example, the old code needed 8,128 intersection tests. The new approach uses 127 intersection tests and 127 union operations. The scratch mask reuses memory allocated at startup for task placement, so the overlap check does not need a new allocation.

Changing what is kept between iterations changes how the number of comparisons grows as partitions are added.

Linux 7.5 development branch: cgroup v2 domain generation time

One pass checks for CPU overlap among load-balancing root partitionsTwo Xeon Platinum 8582C processors, 240 logical CPUs onlinePartition count includes the root. Median generation time in microseconds.
PartitionsBeforeAfterSpeedup
20.5240.520About 1.0×
80.7750.657About 1.2×
323.7341.222About 3.1×
6411.8751.797About 6.6×
12842.9363.138About 13.7×
19293.7814.700About 20.0×
238142.3055.424About 26.2×

※Bars are scaled to the highest speedup in the table.

The developer benchmarked a system with two Intel Xeon Platinum 8582C processors and 240 logical CPUs online. In the patch posted November 30, the developer triggered a domain rebuild by changing cpuset.cpus for a child partition. With 128 partitions including the root, median runtime for generate_sched_domains() fell from 42.936 to 3.138 microseconds, about 13.7 times as fast. With two partitions it barely moved, from 0.524 to 0.520 microseconds. With 238 partitions it fell from 142.305 to 5.424 microseconds. The advantage became more apparent as partition count rose.

Each partition in cgroup v2 also uses default scheduling domain attributes. Since the scheduler treats a NULL attribute pointer as the default, the patch removes the allocation and initialization of the attribute array. It also cleans up the old overlap function cpusets_overlap(), replacing its remaining cgroup v1 calls with cpumask_intersects().

Skipping the scan when the exclusive CPU mask stays empty

Another optimization changes validation when a regular cgroup v2 member, a group that is not a partition root, changes cpuset.cpus. The old code held a lock called cpuset_mutex while scanning sibling groups to verify CPU and memory exclusivity. Writes took longer as the number of child groups increased.

The new code skips the sibling scan when the exclusive CPU mask stays empty. An empty set cannot overlap another exclusive CPU set. The kernel also checks whether the change would take all allowed CPUs away from a sibling only when the target group's exclusive mask changes. Since memory exclusivity in v2 is limited to the top-level cpuset, the scan can also be skipped for cpuset.mems changes to the affected member groups.

Linux 7.5 development branch: cgroup v2 CPU allocation update time

Regular members skip the sibling scan when their exclusive CPU mask stays emptyTwo Xeon Platinum 8582C processors, 240 logical CPUs onlineOne sleeping task. A writer on CPU 1 alternates CPU 2 and CPUs 2–3.Median time over 256 configuration writes, in microseconds
Child groupsBeforeAfterSpeedup
10.8610.859About 1.0×
641.4250.856About 1.7×
5125.1840.855About 6.1×
204824.0560.853About 28.2×

In write tests published November 30, the developer put one sleeping task in the child group being modified. A writer pinned to CPU 1 alternated the child group's cpuset.cpus between CPU 2 and CPUs 2–3, then compared the median time across 256 writes. With one child group it fell from 861 to 859 nanoseconds. With 2,048 child groups it dropped from 24.056 to 0.853 microseconds, about 28.2 times as fast. The new median stayed below one microsecond at every tested group count.

Doing fewer checks while holding the lock may also reduce how long management operations wait for one another in environments that adjust CPU allocations frequently.

Using CPUs and managing them

The measurements cover the runtime of the function that builds scheduling domains and the time needed to write CPU allocation settings. Application performance inside a container also depends on factors such as how much CPU time the workload requires and how often resources are reallocated.

The changes address management overhead as container deployments grow. One pass now checks for overlap, and a group whose exclusive CPU mask stays empty can skip scanning its siblings. Fine-grained CPU allocation creates more work for the kernel unless the management path is kept efficient. How to use abundant CPU resources also means deciding how much CPU time to spend managing them.

View the original on Joho no Todai →

KioskNews shows a cleaned-up reading view extracted from the publisher’s page — the original always lives on their site, not ours.