From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C2A637DE8B for ; Thu, 23 Apr 2026 16:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776963250; cv=none; b=Ce/5UUg2jVzVMnGT6CxGZZRUEh/KNYBUAlpab91FVfIyu5TV6aa28Rk2MQUlhF56kf31fG3BUmSmlxCIlMgiuUCkf+rtjuLcjngdySTMVzxrl1nCOLnhahJgQE/YzIEEBneqrPQKhzLdzFDNdtUu/zt3SvOAmHllbuHWQMrmdGk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776963250; c=relaxed/simple; bh=4xs4/cwtYOq+1JkDsMP8WEXgpqf973tgGClM/Kqhnrs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Vk/g52IvYJk4TpTjPYYNRISQZGwdU7v81uslOX1ncJMya6UeEdQ3ON2D1VxgjfEZgJA5nzbTURFi5kNNSEVsAZSi/98SHsRnMxHOUvYLee4u5OwIVTAGf63cevQmtGuBB03G2tjdvT89laHrwhgN4o8Nrwb42odaMnPlIOa99Pk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=J2aie6eZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="J2aie6eZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC645C2BCB4; Thu, 23 Apr 2026 16:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776963250; bh=4xs4/cwtYOq+1JkDsMP8WEXgpqf973tgGClM/Kqhnrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J2aie6eZEdcb7SKqwxgdDA3HQFKbg/Nm4UuwA9qApEWVnqkbWWW62zmkK4AemBi4h +r5bs2YWdMDR7UyVwi4sYGa8tESW11ZVviGepe4TUhapD7syrOsgtQ9fSJJfKbIEJW LZHcY2cggf2YQ4PbQ90Y+LPdP3UaowoPXZMtRcyaODp8lBvr790rKKk7xgal642Fji P/lg/3Ajlx6eUL9+/ijqE1cDaH9mNEpR5ko8nUQBQ6YiaojHIbb/3oFe+yirkgEfox tyfAuK2GLf8EIg+FfdmM/kxxpyhTF9C8/shCWvnmsvWst7d7n6QJe9HrbQ/7aozRq+ LsTUnqInJUxYw== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Anna-Maria Behnsen , Sehee Jeong , Thomas Gleixner Subject: [PATCH 5/6] timers/migration: Handle capacity in connect tracepoints Date: Thu, 23 Apr 2026 18:53:53 +0200 Message-ID: <20260423165354.95152-6-frederic@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423165354.95152-1-frederic@kernel.org> References: <20260423165354.95152-1-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This let tracers know to which hierarchy a CPU belongs to. Signed-off-by: Frederic Weisbecker --- include/trace/events/timer_migration.h | 24 ++++++++++++++---------- kernel/time/timer_migration.c | 4 ++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/include/trace/events/timer_migration.h b/include/trace/events/timer_migration.h index 61171b13c687..0b135e9301b1 100644 --- a/include/trace/events/timer_migration.h +++ b/include/trace/events/timer_migration.h @@ -33,15 +33,16 @@ TRACE_EVENT(tmigr_group_set, TRACE_EVENT(tmigr_connect_child_parent, - TP_PROTO(struct tmigr_group *child), + TP_PROTO(struct tmigr_hierarchy *hier, struct tmigr_group *child), - TP_ARGS(child), + TP_ARGS(hier, child), TP_STRUCT__entry( __field( void *, child ) __field( void *, parent ) __field( unsigned int, lvl ) __field( unsigned int, numa_node ) + __field( unsigned int, capacity ) __field( unsigned int, num_children ) __field( u32, groupmask ) ), @@ -51,26 +52,28 @@ TRACE_EVENT(tmigr_connect_child_parent, __entry->parent = child->parent; __entry->lvl = child->parent->level; __entry->numa_node = child->parent->numa_node; + __entry->capacity = hier->capacity; __entry->num_children = child->parent->num_children; __entry->groupmask = child->groupmask; ), - TP_printk("group=%p groupmask=%0x parent=%p lvl=%d numa=%d num_children=%d", - __entry->child, __entry->groupmask, __entry->parent, - __entry->lvl, __entry->numa_node, __entry->num_children) + TP_printk("group=%p groupmask=%0x parent=%p lvl=%d numa=%d capacity=%d num_children=%d", + __entry->child, __entry->groupmask, __entry->parent, __entry->lvl, + __entry->numa_node, __entry->capacity, __entry->num_children) ); TRACE_EVENT(tmigr_connect_cpu_parent, - TP_PROTO(struct tmigr_cpu *tmc), + TP_PROTO(struct tmigr_hierarchy *hier, struct tmigr_cpu *tmc), - TP_ARGS(tmc), + TP_ARGS(hier, tmc), TP_STRUCT__entry( __field( void *, parent ) __field( unsigned int, cpu ) __field( unsigned int, lvl ) __field( unsigned int, numa_node ) + __field( unsigned int, capacity ) __field( unsigned int, num_children ) __field( u32, groupmask ) ), @@ -80,13 +83,14 @@ TRACE_EVENT(tmigr_connect_cpu_parent, __entry->cpu = tmc->cpuevt.cpu; __entry->lvl = tmc->tmgroup->level; __entry->numa_node = tmc->tmgroup->numa_node; + __entry->capacity = hier->capacity; __entry->num_children = tmc->tmgroup->num_children; __entry->groupmask = tmc->groupmask; ), - TP_printk("cpu=%d groupmask=%0x parent=%p lvl=%d numa=%d num_children=%d", - __entry->cpu, __entry->groupmask, __entry->parent, - __entry->lvl, __entry->numa_node, __entry->num_children) + TP_printk("cpu=%d groupmask=%0x parent=%p lvl=%d numa=%d capacity=%d num_children=%d", + __entry->cpu, __entry->groupmask, __entry->parent, __entry->lvl, + __entry->numa_node, __entry->capacity, __entry->num_children) ); DECLARE_EVENT_CLASS(tmigr_group_and_cpu, diff --git a/kernel/time/timer_migration.c b/kernel/time/timer_migration.c index 0a8c893353a2..ec3ff80f795c 100644 --- a/kernel/time/timer_migration.c +++ b/kernel/time/timer_migration.c @@ -1756,7 +1756,7 @@ static void tmigr_connect_child_parent(struct tmigr_hierarchy *hier, */ smp_store_release(&child->parent, parent); - trace_tmigr_connect_child_parent(child); + trace_tmigr_connect_child_parent(hier, child); } static int tmigr_setup_groups(struct tmigr_hierarchy *hier, unsigned int cpu, @@ -1831,7 +1831,7 @@ static int tmigr_setup_groups(struct tmigr_hierarchy *hier, unsigned int cpu, tmigr_init_root(hier, group, activate); - trace_tmigr_connect_cpu_parent(tmc); + trace_tmigr_connect_cpu_parent(hier, tmc); /* There are no children that need to be connected */ continue; -- 2.53.0