Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1843513rdb; Tue, 3 Oct 2023 02:48:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHHjXuLDfq9aijkO/JkugyhyIaEyIkBp5Yq4E3Pr8zIPyKgfr1N+YkjRGHEv59aZ9Y/WmfV X-Received: by 2002:a05:6870:e2d1:b0:1d0:fa7b:c3f9 with SMTP id w17-20020a056870e2d100b001d0fa7bc3f9mr17529904oad.30.1696326488211; Tue, 03 Oct 2023 02:48:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696326488; cv=none; d=google.com; s=arc-20160816; b=W9uCzaytphQrTIpc7hEFzbjdtTr8jLKSajrYVP+vsCE/0wPBFrC3BtYHh7Ji/z3MQ3 fW8lXGuADjgLG5NT3CQbKTq7eIOLyHy3qaoFK4KJt6r+9pXEI1PVknY/KHoAL7I6NfxH MdNn6qiNKsY/8SCEaQBxRPxefvIqLJSQC6byDcHjYYiFKBdRRvM7vCVAUd8VtAHjXtBq Kyf96v5WTBDWmtjpBBrQ+7Tuz/C6oG76GrkRQRlSoy1UdA9jdCnKL9aCEREXY6a2P3Nx Qnpdj0643ZcAxudneuNI57zl3w/qHwYZJS/CH+FdTqrnQH4u5pcjAA5qTiWAqIispJi6 Zumg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=fSO0bN4wxCWQoR1ffLDq1SwoPvsZiN1HuMrXKXx4kYs=; fh=+B/w+5pT7KbzbI48RjYy93vTmWciYR5bqb7QLS1Ygs4=; b=QwcdZqehw58YHpuBKLQamAnC+bt4vyvBRus+NB00cvhW9N2zss1T2is/gfz3VWoQ9+ aSQd3DOS2J8ACbiAFatTnUrcb8hk9UlJC42It8LkpBka1u8Af/7gJyH0xXQMzuu4sdvp WeXMCHpB08UBC+Vyx0GzQMBCUbLcoaEsjpV5F9pQYJYq8K/cFJxH/5dtdtt5+GzFSvEG Eqgk+z1dOq2/DLYVJ/Q43DnIZH3ylZtwvPYjER0BiCz8BGsfzaZGZjQ1PvC99Wssb4zI c+MDVoVRp3vUaJuBHL4w+j8aCvbTviQHWUuj+Hr4l9mno6dbV9xa1VVCye4BXj/CSHAK hXBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LPDrvq6L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id y184-20020a638ac1000000b005824bad8f83si1010183pgd.846.2023.10.03.02.48.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 02:48:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LPDrvq6L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id F282F802587B; Tue, 3 Oct 2023 02:48:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239772AbjJCJsF (ORCPT + 99 others); Tue, 3 Oct 2023 05:48:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231931AbjJCJsE (ORCPT ); Tue, 3 Oct 2023 05:48:04 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93C9EAB; Tue, 3 Oct 2023 02:48:01 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-9ae7383b7ecso906865966b.0; Tue, 03 Oct 2023 02:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696326480; x=1696931280; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=fSO0bN4wxCWQoR1ffLDq1SwoPvsZiN1HuMrXKXx4kYs=; b=LPDrvq6LQodPlTaidG9rx7MK6i4od4lNdtNHfW4s9uVnOjCOc1cQUbUHoR8BgR80Su uiznrVB3+OHWJuI2idrzKUciihKxpUuj0VQWz16L16+8YyUGe7EFcOCP0/3uGsvXQYC7 NSi+pEf2hUJgCLuX+wQbnaiDY/M9egHDa0UoAH09zr7G7l5kxs2Jn35M/voIFi11aqDS vFEcK9AJ84HYrO217bX6G3cbVN8gywpCn+yLZpOz55YK9UV4fNor3A69UfFOwuyUOlw2 6Itbf0r0+wn69d77iHWitXyPE7QDgu5bshzdAikW7GrpJ3WLf370sTIZ4BX/O10P+PyO 7vXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696326480; x=1696931280; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fSO0bN4wxCWQoR1ffLDq1SwoPvsZiN1HuMrXKXx4kYs=; b=EKJ3roTexaa313Hbtfoxy0HfJr1Cdn4XcBZF1erJUjFJrkEHC254E3r361WgsCyOth DUQY9bH5GQnpgnkLJhNcAUMGvl7WRtqYZB59hnSAGe/iDOlqY4+eIJBvkcec3fIET2uI DOAO/k+qyzB3yzHdrkz2QtjYtpxumdt1jJmxs1w35hm+CYmwkbUQK0o4Gjmq4T5+YZyt f8xFHavo/5zeeH/mfiSdqD1xTsfFQ+1LzsN/+Ms0WKCI1TJA4m2mERQ7dfMq3697i4eb T6VIsEp+HbdZWPg3IbusgxCnaIqQgj+E2A/kHCfUQMuxiAujTu6Kk9kZ6raEduzq7c1n fMEQ== X-Gm-Message-State: AOJu0YzEummC44M35bSnz1EE3Z/rgTwhPGxSrCGxG0T9tmKPAejRor1X andkhL0ynxeUJTihg6huTUc= X-Received: by 2002:a17:906:13:b0:9ad:8a9e:23ee with SMTP id 19-20020a170906001300b009ad8a9e23eemr2112990eja.13.1696326479613; Tue, 03 Oct 2023 02:47:59 -0700 (PDT) Received: from gmail.com (1F2EF530.nat.pool.telekom.hu. [31.46.245.48]) by smtp.gmail.com with ESMTPSA id rn4-20020a170906d92400b009b2cc87b8c3sm760511ejb.52.2023.10.03.02.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 02:47:59 -0700 (PDT) Sender: Ingo Molnar Date: Tue, 3 Oct 2023 11:47:57 +0200 From: Ingo Molnar To: Leo Yan Cc: Arnaldo Carvalho de Melo , Ian Rogers , Thomas Richter , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Peter Zijlstra Subject: Re: [PATCH v3] perf doc: Document ring buffer mechanism Message-ID: References: <20230803114613.1786849-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 02:48:07 -0700 (PDT) * Ingo Molnar wrote: > > * Leo Yan wrote: > > > In the Linux perf tool, the ring buffer serves not only as a medium for > > transferring PMU event data but also as a vital mechanism for hardware > > tracing using technologies like Intel PT and Arm CoreSight, etc. > > > > Consequently, the ring buffer mechanism plays a crucial role by ensuring > > high throughput for data transfer between the kernel and user space > > while avoiding excessive overhead caused by the ring buffer itself. > > > > This commit documents the ring buffer mechanism in detail. It provides > > an in-depth explanation of the implementation of both the generic ring > > buffer and the AUX ring buffer. Additionally, it covers how these ring > > buffers support various tracing modes and explains the synchronization > > with memory barriers. > > > > Signed-off-by: Leo Yan > > --- > > > > Changes from v2: > > - Refined doc for Thomas's suggestions (Thomas Richter). > > > > Changes from v1: > > - Addressed Ian's comments and suggestions (Ian Rogers). > > > > > > tools/perf/Documentation/perf-ring-buffer.txt | 762 ++++++++++++++++++ > > 1 file changed, 762 insertions(+) > > create mode 100644 tools/perf/Documentation/perf-ring-buffer.txt > > Nice addition! > > If it hasn't been picked up yet: > > Acked-by: Ingo Molnar Note that my ack is conditional on the conversion to RST and moving to Documentation/ - this documents an important aspect of the primary perf ABI, it deserves to be on the kernel side. Thanks, Ingo