Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5000946rdb; Tue, 12 Dec 2023 16:16:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IFU54k8dynpATscHo6NE1kpadGJ1Mqc84em+o4Ccy9cCSmKZOvqT8w9CafIl6M/eyQoD9g7 X-Received: by 2002:a05:6359:4123:b0:170:c1a7:254 with SMTP id kh35-20020a056359412300b00170c1a70254mr6310136rwc.2.1702426603502; Tue, 12 Dec 2023 16:16:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702426603; cv=none; d=google.com; s=arc-20160816; b=GRrzK7JqZUIB+UTaA/qDnrtDn/zxIsy/PMB6Y7+vqT7oLWNsw7WzBpMuds5EVWi+KD Jxt7jPv5W4Pwa453EKPk06coqAsbLU0hWntPYG0HzDbkBDVOcMRc7f5b4kA9uB3ZHPDg MWw05VHGIEtYT6tvRM5qMFlJNSqQx+Qi+cCYfo+ltYPfPXL89UVJNORDdRAn4zwdsXki WYW2mi6uIOO234+ytgv0yqOh8itfV9u89OXttoS0mKZ4145+734Xdx0BQZLRNI4UyNls 6qy1/B/fF/WdtvKb7Y+XeGJ4ZspImhRhso0zT11YvqUc2dFBN+cadVar6vYIcgxxB3TX zBmQ== 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:subject:cc:to:from:date; bh=7HCj4GPL3G0/6AcWfsWYLwBIGOCWIo02YBoYrkdn1XE=; fh=/hhORBAM0lb7M1gVyvX/fEu96XaRvUs0WH6EpZMFYIk=; b=f6FUkDHsXjccBnuaTHlvQSyTaRkdtt5t0EnPJ6U2TquewTitZdMi9aP04Vrx0TJENu KN35DoBNwvRKTschBMY0WSBxAA2ASpBpIVlLJTEG4/Bwvw7Ee7YWdQFGwR3TD6uv45rB 5fFBzk1RC/mgWoBYoE+qFDv+wU4aJWkMN/RbiRQ+Y4Y2fWn/G3b4888MNPSQVQox2dyD RyG2BCtXSfueoNWe1cLPB167sa7iW6HxN8mE3eKApi73ngHN4Z8ciXd5vRdhwZ+upqkd qevkzUQ+u5RPRoEP9sLLgYDuhoInHu2S8oeO/1TZlHcU35GnMkoW++7zzDqvKKIV/3MS odPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id y13-20020a17090abd0d00b0028753b91d75si1081119pjr.149.2023.12.12.16.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 16:16:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 9C423804A636; Tue, 12 Dec 2023 16:16:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378068AbjLMAQN (ORCPT + 99 others); Tue, 12 Dec 2023 19:16:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378194AbjLMAPx (ORCPT ); Tue, 12 Dec 2023 19:15:53 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7768268D for ; Tue, 12 Dec 2023 16:15:06 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 724A5C433C8; Wed, 13 Dec 2023 00:15:03 +0000 (UTC) Date: Tue, 12 Dec 2023 19:15:46 -0500 From: Steven Rostedt To: Alexander Graf Cc: , , , , , , , , Eric Biederman , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , "Rob Herring" , "Andrew Morton" , Mark Rutland , "Tom Lendacky" , Ashish Kalra , James Gowans , Stanislav Kinsburskii , , , , Anthony Yznaga , Usama Arif , David Woodhouse , Benjamin Herrenschmidt Subject: Re: [PATCH 08/15] tracing: Introduce names for ring buffers Message-ID: <20231212191546.603c0703@gandalf.local.home> In-Reply-To: <20231213000452.88295-9-graf@amazon.com> References: <20231213000452.88295-1-graf@amazon.com> <20231213000452.88295-9-graf@amazon.com> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Tue, 12 Dec 2023 16:16:39 -0800 (PST) On Wed, 13 Dec 2023 00:04:45 +0000 Alexander Graf wrote: > With KHO (Kexec HandOver), we want to preserve trace buffers across > kexec. To carry over their state between kernels, the kernel needs a > common handle for them that exists on both sides. As handle we introduce > names for ring buffers. In a follow-up patch, the kernel can then use > these names to recover buffer contents for specific ring buffers. > Is there a way to use the trace_array name instead? The trace_array is the structure that represents each tracing instance. And it already has a name field. And if you can get the associated ring buffer from that too. struct trace_array *tr; tr->array_buffer.buffer tr->name When you do: mkdir /sys/kernel/tracing/instance/foo You create a new trace_array instance where tr->name = "foo" and allocates the buffer for it as well. -- Steve