mirror of
https://github.com/systemd/systemd.git
synced 2026-08-09 17:38:42 +00:00
Add support for two newer NUMA memory policies: - MPOL_PREFERRED_MANY (Linux 5.15): like MPOL_PREFERRED but accepts a set of nodes instead of a single node, falling back to all nodes if preferred nodes cannot satisfy the allocation. - MPOL_WEIGHTED_INTERLEAVE (Linux 6.9): like MPOL_INTERLEAVE but distributes pages across nodes proportionally to per-node weights configured via /sys/kernel/mm/mempolicy/weighted_interleave/. On kernels that do not support the requested policy, set_mempolicy() returns EINVAL. We convert EINVAL to EOPNOTSUPP only for the two new policies (MPOL_PREFERRED_MANY, MPOL_WEIGHTED_INTERLEAVE), so that a bad NUMAMask= for already-supported policies still fails the service rather than being silently ignored. The NUMA subsystem being absent (ENOSYS) continues to be handled silently at debug level, as before. Varlink serialization uses json_underscorify() on an owned copy of the policy name string to convert hyphenated names to the underscore form declared in the IDL enum, avoiding mutation of the read-only static string table. Signed-off-by: dongshengyuan <dongshengyuan@uniontech.com>
333 KiB
333 KiB