Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1020871rdb; Fri, 22 Dec 2023 11:55:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFsScXzSVPajY7V1w4pNAIaBD8boTFaBHgFSRWRGP7+gMkXiHRiJGKR1b4j1jMoNpigIEhD X-Received: by 2002:a17:906:220b:b0:a23:5f0c:864a with SMTP id s11-20020a170906220b00b00a235f0c864amr746610ejs.97.1703274944066; Fri, 22 Dec 2023 11:55:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703274944; cv=none; d=google.com; s=arc-20160816; b=GYwXgSfKlk45xFlQAmI2PVQCpBl/sDGMR8FhRz/wYpp1g5MxYOQCdm6SsSGBPUcE/1 EaBp/4GdiE0OMBQ1cEOqg8cGG3Axjh94zwqCYBxbLIg8n2THJUdhJ58AVeeAlcG58Gmb PaNYLYMk/Bj9rRD7bXZhK0/oCkw64xo5hy8F4A6cBkje4LeI0Rxtn9ISmvp+Zw2eTe/a ZHTt58ATEIdiAVmmJgbE8EzBY7xrHBMAo3nrfqb/yAWeScNqJ/umYeo0d58Y59ySNqBr +hnSt7MWwfESwqcL94nEldUQ17y5kJvM/HbBkAU4qLd35hbnCYpo3CAONqAUUKTBxdlG DrTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=K22H13Upw8ZJvq6V1e5pgkkFku3zAKlZ1ZPbskJJqpo=; fh=xprWcyUKTLi4rhte7gFCvduD673j12awuFkCPnYDQVY=; b=NW0SZlW+rupM6+OEhIAOIAKabpBp2OorYrbpeBgyXLYMqNDR3kfkhXOCP8g0UYC/qr 6K3orlrQEXWM89aZzYRD5Klib3QMrMl7PIhBMV7n2dB6oww6BscjJSQE+zxT5KTq6eCt 7TIaw/ys0X8WyM7XBdqGfuscPvfO5vnO8LlQ3DHpmFL1X4V+nb1o7S9fGqBImUh8LWPj Fq0eayw89lS1uhvZdHE7uJfQWCKNRaIwti1+i/FDxk9ixBB3TgRa5UzMuhg/bq9Jz6DW Z7Hf+VGZbUejVSM1JzrqAOLWGqDXl9K+1ZatH3yMrpowD8X/JH8dTL41AIGNt09Zjpep XzRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=ffvmpwd1; spf=pass (google.com: domain of linux-kernel+bounces-10043-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10043-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bo16-20020a170906d05000b00a235761f481si2044491ejb.1019.2023.12.22.11.55.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 11:55:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10043-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=ffvmpwd1; spf=pass (google.com: domain of linux-kernel+bounces-10043-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10043-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CE8941F24016 for ; Fri, 22 Dec 2023 19:55:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01DBC33079; Fri, 22 Dec 2023 19:53:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="ffvmpwd1" X-Original-To: linux-kernel@vger.kernel.org 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 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-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) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 -- 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