From edb4a8a0e47a459ee313607b5ed3109de0572d77 Mon Sep 17 00:00:00 2001 From: "Suzuki K. Poulose" Date: Fri, 24 Apr 2015 12:23:57 +0100 Subject: [PATCH] kvmtool: Set the thread names for terminal and virtio-net-ctrl The terminal handling thread and the virtio-net-ctrl don't set their name, which ends up as follows up: terminal => lkvm virtio-net-ctrl => kvm-cpu-X !! Set the thread name explicitly to term-poll and virtio-net-ctrl respectively Signed-off-by: Suzuki K. Poulose Signed-off-by: Will Deacon --- term.c | 3 ++- virtio/net.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/term.c b/term.c index 1b8131a..9763211 100644 --- a/term.c +++ b/term.c @@ -101,9 +101,10 @@ static void *term_poll_thread_loop(void *param) { struct pollfd fds[TERM_MAX_DEVS]; struct kvm *kvm = (struct kvm *) param; - int i; + kvm__set_thread_name("term-poll"); + for (i = 0; i < TERM_MAX_DEVS; i++) { fds[i].fd = term_fds[i][TERM_FD_IN]; fds[i].events = POLLIN; diff --git a/virtio/net.c b/virtio/net.c index 077efbf..d59a0d5 100644 --- a/virtio/net.c +++ b/virtio/net.c @@ -232,6 +232,8 @@ static void *virtio_net_ctrl_thread(void *p) struct virtio_net_ctrl_hdr *ctrl; virtio_net_ctrl_ack *ack; + kvm__set_thread_name("virtio-net-ctrl"); + while (1) { mutex_lock(&ndev->io_lock[id]); if (!virt_queue__available(vq))