[PATCH 1/3] tuna: Improve process migration messaging clarity

John Kacur <[email protected]> Thu, 16 Jul 2026 15:10:26 -0400
Newsgroups org.kernel.vger.linux-rt-users
Message-ID <[email protected]>
Change the migration report from 'failed: N' to 'N kernel threads skipped'
to clarify that these are expected kernel thread rejections, not errors.

Kernel threads (cpuhp, ksoftirqd, migration, kworker, IRQ handlers, etc.)
cannot be migrated to user cpusets and are correctly rejected by the kernel
with EINVAL. The previous wording made this normal behavior appear as
failures, which was confusing to users.

Assisted-by: Claude:claude-sonnet-4-5
Signed-off-by: John Kacur <[email protected]>
---
 tuna-cmd.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tuna-cmd.py b/tuna-cmd.py
index 5436f68c5029..ae02f2d50936 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -1704,7 +1704,7 @@ def main():
                     print(f"Migrating processes to housekeeping cpuset...")
                     tm = cpuset.TaskMigrate(cpusets_init, hk_cpuset)
                     migrated, failed = tm.migrate()
-                    print(f"Migrated {migrated} processes to '{housekeeping_name}' (failed: {failed})")
+                    print(f"Migrated {migrated} processes to '{housekeeping_name}' ({failed} kernel threads skipped)")
 
             except Exception as e:
                 print(f"Error creating cpusets: {e}", file=sys.stderr)
-- 
2.55.0