Skip to main content

Module cell_manager

Module cell_manager 

Source
Expand description

Cell manager for userspace-driven cell creation.

This module implements the --cell-parent-cgroup mode where cells are created for direct child cgroups of a specified parent. Uses inotify to watch for cgroup creation/destruction and manages cell ID allocation.

Re-exportsยง

use std::collections::BTreeMap; ๐Ÿ”’
use std::collections::BTreeSet; ๐Ÿ”’
use std::collections::HashMap; ๐Ÿ”’
use std::collections::HashSet; ๐Ÿ”’
use std::fs::DirEntry; ๐Ÿ”’
use std::os::unix::fs::MetadataExt; ๐Ÿ”’
use std::os::unix::io::AsFd; ๐Ÿ”’
use std::os::unix::io::BorrowedFd; ๐Ÿ”’
use std::path::Path; ๐Ÿ”’
use std::path::PathBuf; ๐Ÿ”’
use std::sync::atomic::AtomicBool; ๐Ÿ”’
use std::sync::atomic::Ordering; ๐Ÿ”’
use anyhow::Context; ๐Ÿ”’
use anyhow::Result; ๐Ÿ”’
use anyhow::bail; ๐Ÿ”’
use inotify::Inotify; ๐Ÿ”’
use inotify::WatchMask; ๐Ÿ”’
use scx_utils::Cpumask; ๐Ÿ”’
use tracing::debug; ๐Ÿ”’
use tracing::info; ๐Ÿ”’

Structsยง

CellInfo
Information about a cell created for a cgroup
CellManager
Manages cells for direct child cgroups of a specified parent
CpuAssignment
Result of CPU assignment computation, containing both primary and optional borrowable masks.
CpuManager ๐Ÿ”’
Generic CPU allocator over a fixed domain of CPUs.
CpuMinimum ๐Ÿ”’
Minimum primary-CPU constraints for a partitioning recipient.
CpuRecipient ๐Ÿ”’
Generic allocation input for a CPU partitioning recipient.

Functionsยง

cgroup_root_relative ๐Ÿ”’
Strip the cgroup mount prefix from a stored cell path, yielding the root-relative cgroup path (e.g. /sys/fs/cgroup/a/b -> /a/b).
read_dir_sorted ๐Ÿ”’