From patchwork Fri Dec 22 19:51:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 13503777 Received: from smtp-fw-9102.amazon.com (smtp-fw-9102.amazon.com [207.171.184.29]) (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 CE9BB2F871; Fri, 22 Dec 2023 19:53:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="ffvmpwd1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1703274827; x=1734810827; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=K22H13Upw8ZJvq6V1e5pgkkFku3zAKlZ1ZPbskJJqpo=; b=ffvmpwd1M7SDcdEuEljSQ6ZARCFu61n/QUZnA6XI8QASz/bbYdSOIxUi KiY+Cz88lAAMyiTEk+cNSItipT7GmqGNDrBvCHLquNwTOfS/raKYt2uCN nc30UVQDR+EelDuvctW5hCrRrqJHL035/8AUOsIDTRkKkF1hoxbpgTJMl 4=; X-IronPort-AV: E=Sophos;i="6.04,297,1695686400"; d="scan'208";a="385308754" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-iad-1a-m6i4x-bbc6e425.us-east-1.amazon.com) ([10.25.36.214]) by smtp-border-fw-9102.sea19.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:53:45 +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 3C35E80CB5; Fri, 22 Dec 2023 19:53:34 +0000 (UTC) Received: from EX19MTAUWC002.ant.amazon.com [10.0.7.35:50263] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.56.23:2525] with esmtp (Farcaster) id d873e908-4dd5-450d-9721-5ebc91d6108f; Fri, 22 Dec 2023 19:53:34 +0000 (UTC) X-Farcaster-Flow-ID: d873e908-4dd5-450d-9721-5ebc91d6108f Received: from EX19D020UWC004.ant.amazon.com (10.13.138.149) by EX19MTAUWC002.ant.amazon.com (10.250.64.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 22 Dec 2023 19:53:34 +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; Fri, 22 Dec 2023 19:53:30 +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 v2 16/17] tracing: Add config option for kexec handover Date: Fri, 22 Dec 2023 19:51:43 +0000 Message-ID: <20231222195144.24532-11-graf@amazon.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231222195144.24532-1-graf@amazon.com> References: <20231222193607.15474-1-graf@amazon.com> <20231222195144.24532-1-graf@amazon.com> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: EX19D035UWB003.ant.amazon.com (10.13.138.85) To EX19D020UWC004.ant.amazon.com (10.13.138.149) 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 --- v1 -> v2: - Select crc32 --- kernel/trace/Kconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 61c541c36596..418a5ae11aac 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -1169,6 +1169,20 @@ config HIST_TRIGGERS_DEBUG If unsure, say N. +config FTRACE_KHO + bool "Ftrace Kexec handover support" + depends on KEXEC_KHO + select CRC32 + 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