From 76ca442212e01a85a3a9783832e0ecf937a3b861 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 2 Oct 2024 16:20:44 -0700 Subject: [PATCH] devices: vhost-user frontend: shorten thread name The worker thread used to be named "vhost_user_virtio_{type}", which is too long to fix in the 15 characters available for thread names on Linux. Use the device's debug_label() instead, which follows the pattern "vu-{type}", so the threads for different devices can be distinguished. Change-Id: I8cadf54518724c5a764a0b28b0bc4144cd938d1e Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5906571 Commit-Queue: Daniel Verkamp Reviewed-by: Frederick Mayle --- devices/src/virtio/vhost_user_frontend/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/src/virtio/vhost_user_frontend/mod.rs b/devices/src/virtio/vhost_user_frontend/mod.rs index cdcce1b449..fd6e9f171e 100644 --- a/devices/src/virtio/vhost_user_frontend/mod.rs +++ b/devices/src/virtio/vhost_user_frontend/mod.rs @@ -349,7 +349,7 @@ impl VhostUserFrontend { "BUG: attempted to start worker twice" ); - let label = format!("vhost_user_virtio_{}", self.device_type); + let label = self.debug_label(); let mut backend_req_handler = self.backend_req_handler.take(); if let Some(handler) = &mut backend_req_handler {