Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4997105rdb; Tue, 12 Dec 2023 16:08:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+N1kqj+iXTmo2A72C4EMWZ4hbsiby8fHSuHcFzKl7OLByZRZHkrUOwNQ4oVzp7FPnHjK1 X-Received: by 2002:a05:6a00:139d:b0:6ce:643d:98c2 with SMTP id t29-20020a056a00139d00b006ce643d98c2mr4630781pfg.3.1702426124688; Tue, 12 Dec 2023 16:08:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702426124; cv=none; d=google.com; s=arc-20160816; b=dC/EFLacUJg/QQWk+DsZuSl+zm8RNmkyglZUp470OkoVp+6f9QoGkx69tR2ah6mzTw NCXMtzLGvPQdPNiEK2ug48mRLTjQpNlOomhUhU6T0vNNtc2SE7NHasOKcqAexkjnL3Qs ck3Zxi5D5YAzYC2d2xntzIR35Cph/F+WIFzJBQ+TzlfLG0TH9nvcJmQLNGK2hrxTK6zg TrXn7gfUGADCGQP7/kTdkUVZzm8Nao8j28B9/PpIpHMkasirxemvaAhbXhWKeeSs20E7 w/RuOiz1J9lPWqHJHfilIXh/G96hMb6kbAO0IIjaC8pPCVYIBtEiCao48VPBNBvi35S8 p6kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8E5gYeBn7LzFXeE9t3+WWJhfPWwonViYFj973oiYUIk=; fh=xprWcyUKTLi4rhte7gFCvduD673j12awuFkCPnYDQVY=; b=Ccs/Hw2QIUabXbSgM+At1RRS8CKGajWwZqdtufoRpMiIxC0S+NqR8XrhzHbS+BIsKB QFbvHdnJc+F/rV1CjYJF7NzNNC+hx9VRHfAn+RVnlV3N1+NybEglsIr4j2Aswd3cOgB0 7CNlno6s2od9Zq2GkZKdF/OhyVXgUs5TnQ/D0c0CNsrSquJ+J99bfoa2ko86F9yuVIL3 /ubL/I3GtsGKHuJom+RIOQtQUs9OTD8uL7v4E1PF1yG0VeZMP9ImaA96ASl4ltEB9wN9 x+9L4w4cdEoVXykPHAtdjoJJrAfqaweLWgWWpU8X6Ob+cOUC+VP2bLUmk4ssoBe+fB7J A0/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=a1vPSAn4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id 28-20020a63175c000000b005c6bab48f48si8355861pgx.111.2023.12.12.16.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 16:08:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=a1vPSAn4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 72BB080A8DB8; Tue, 12 Dec 2023 16:08:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377838AbjLMAI1 (ORCPT + 99 others); Tue, 12 Dec 2023 19:08:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377851AbjLMAIP (ORCPT ); Tue, 12 Dec 2023 19:08:15 -0500 Received: from smtp-fw-52005.amazon.com (smtp-fw-52005.amazon.com [52.119.213.156]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70463D4D; Tue, 12 Dec 2023 16:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1702426083; x=1733962083; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8E5gYeBn7LzFXeE9t3+WWJhfPWwonViYFj973oiYUIk=; b=a1vPSAn4RN5MYIpsd3DyyRCkJuBHnCOBZooVN6/fJapR6P9VnnkYiZDS 1vd8AU/P7+v6f0O8Dzt4xCJuMNWr6H27HNgYhSjG9x5NzAiItEAdByflx 5JxfSMdqz0mSchn+8natHOk8lS7fixALyrIXy89rim6IuNE5YAMbj/jnk 0=; X-IronPort-AV: E=Sophos;i="6.04,271,1695686400"; d="scan'208";a="621371857" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-iad-1a-m6i4x-bbc6e425.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-52005.iad7.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 00:08:01 +0000 Received: from smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev (iad7-ws-svc-p70-lb3-vlan3.iad.amazon.com [10.32.235.38]) by email-inbound-relay-iad-1a-m6i4x-bbc6e425.us-east-1.amazon.com (Postfix) with ESMTPS id EF61380632; Wed, 13 Dec 2023 00:07:52 +0000 (UTC) Received: from EX19MTAUWB001.ant.amazon.com [10.0.21.151:16104] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.43.236:2525] with esmtp (Farcaster) id 3bda4ab2-5ec6-4d32-90c9-2880fbf14c72; Wed, 13 Dec 2023 00:07:51 +0000 (UTC) X-Farcaster-Flow-ID: 3bda4ab2-5ec6-4d32-90c9-2880fbf14c72 Received: from EX19D020UWC004.ant.amazon.com (10.13.138.149) by EX19MTAUWB001.ant.amazon.com (10.250.64.248) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 13 Dec 2023 00:07:44 +0000 Received: from dev-dsk-graf-1a-5ce218e4.eu-west-1.amazon.com (10.253.83.51) by EX19D020UWC004.ant.amazon.com (10.13.138.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 13 Dec 2023 00:07:40 +0000 From: Alexander Graf To: CC: , , , , , , , Eric Biederman , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , "Rob Herring" , Steven Rostedt , "Andrew Morton" , Mark Rutland , "Tom Lendacky" , Ashish Kalra , James Gowans , Stanislav Kinsburskii , , , , Anthony Yznaga , Usama Arif , David Woodhouse , Benjamin Herrenschmidt Subject: [PATCH 15/15] tracing: Add config option for kexec handover Date: Wed, 13 Dec 2023 00:04:52 +0000 Message-ID: <20231213000452.88295-16-graf@amazon.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231213000452.88295-1-graf@amazon.com> References: <20231213000452.88295-1-graf@amazon.com> MIME-Version: 1.0 X-Originating-IP: [10.253.83.51] X-ClientProxiedBy: EX19D033UWA001.ant.amazon.com (10.13.139.103) To EX19D020UWC004.ant.amazon.com (10.13.138.149) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 12 Dec 2023 16:08:42 -0800 (PST) Now that all bits are in place to allow ftrace to pass its trace data into the next kernel on kexec, let's give users a kconfig option to enable the functionality. Signed-off-by: Alexander Graf --- kernel/trace/Kconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 61c541c36596..af83ee755b9e 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -1169,6 +1169,19 @@ config HIST_TRIGGERS_DEBUG If unsure, say N. +config FTRACE_KHO + bool "Ftrace Kexec handover support" + depends on KEXEC_KHO + help + Enable support for ftrace to pass metadata across kexec so the new + kernel continues to use the previous kernel's trace buffers. + + This can be useful when debugging kexec performance or correctness + issues: The new kernel can dump the old kernel's trace buffer which + contains all events until reboot. + + If unsure, say N. + source "kernel/trace/rv/Kconfig" endif # FTRACE -- 2.40.1 Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B Sitz: Berlin Ust-ID: DE 289 237 879