Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp428653rdb; Fri, 5 Jan 2024 15:12:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9OlBjwC1ne6oxuPVH2at1hRJ559GyW1An6xxYgLdgsJyzitvTimnc4x4qdDDZ0ArlSI0u X-Received: by 2002:a05:620a:4593:b0:781:df45:4852 with SMTP id bp19-20020a05620a459300b00781df454852mr156397qkb.101.1704496363969; Fri, 05 Jan 2024 15:12:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704496363; cv=none; d=google.com; s=arc-20160816; b=bU0yjGQhRZvIWgAHB+pPP+F1dxlLTmFF02uR+U5znYE9YW9Mq5RU1WtjdrW+13FL2G s71ZSG053olpZfNiozSJupc12PblpCzGllXab6BApkLOTPy5GGqB4AKPJlRdzCqWBAbm CmBxgw1BGoi3tQgta3VxCx0CugXzU94PLmwZZVBvT+tpXuUwE0sdVcwvbKFOmrEMfPqn EOCWUN7hPb2983we74EbBx++fOR9HSaovuvkgbJ3DugfUz3FjiwU3F32tS9bW17swIGW RnZOtK2zb3HeFb4Z+SLKPLnatG51JoLvIK3HRmb+bfxu0Ul4iYnc5TtxXjKjTnpOpeTj Ghzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=dUAhNqUpdKmg+sUIUDMYqgFuBhU5t8vIbGzf07x8V/w=; fh=gxFCcU+zqVwb+QH6c+FXaGm2unq4LZDCB+NuMAy4T2o=; b=d9hCVJTedyl+O5htl24EUGDJwXiip/Ipfvx+zMFsG+wFMqHiWO4X+pB5EBlF90vZXj TpYPT4qkstQ7lQzGbWhiChh/PgZ6ICdjs1zYqvDunXiMN5ArxRNh47rNQe3fWAnu66XB YX2a3/pZ8z05aSBIMOmfJWCXCEiwNnxGyx5Ylo2Acsn4TytMfq72CBMjrrMxnfTEd9MV wgplrHKIKaXENYl18JJ6fyEAXnOeV/8NHUpPYJihCsI/lYosxU8MWpB02C0whw5OSLOH tpti7QqJZFFysqROWPUgS32u5l0i2fQN9pNjIhMFxV1pMGW1vftQoiWpQGUfEABEf/IM Y7bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-18410-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18410-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pa41-20020a05620a832900b007813026ca37si2650259qkn.502.2024.01.05.15.12.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 15:12:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18410-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-18410-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18410-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B25A31C232BF for ; Fri, 5 Jan 2024 23:12:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 332FE360B7; Fri, 5 Jan 2024 23:12:34 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64D37360A3; Fri, 5 Jan 2024 23:12:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-28c075ad8e7so94806a91.2; Fri, 05 Jan 2024 15:12:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704496351; x=1705101151; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dUAhNqUpdKmg+sUIUDMYqgFuBhU5t8vIbGzf07x8V/w=; b=XZHvOfwQfZ3I4/5wHv1X2j/Po6Z50wGyIEVN0kxPmjoDVpd0phlcHehr2+q4fPrr2r aot5S2EBSl03w0GvN6z3oDn23X2/rF71J4n8qqdW8zrYU0JpjCReBZMxiNHG6PitU3CM b+7erP9wsuduVi/zL/DpVOYWjbOmQUSsnt/+2jj77pkyFVeI+hwQHiidk+6cDMny8zjH yk4cXGArHolG1I1bqXLebmkLdd3N+4FGEYS2xhGumcUc7XxMkk6xatQrE5VXZhfmF363 6WpXeUXYJXjlstWL4UVjczL3TihNdphdv2iVDGWfSgiSByOOGKBm4gZ41IuEgfs+6E7k Twsg== X-Gm-Message-State: AOJu0YxSfZkBCiZDhiHFuWKSp2vtVW7kTDEtQ7KAh1MTtknC5JLuf2Oe rjgOYP2phsZAI+kDbWaURwit2NkZE/YmZAvsw0tLGoBF X-Received: by 2002:a17:90b:4b81:b0:28c:c667:450c with SMTP id lr1-20020a17090b4b8100b0028cc667450cmr170349pjb.66.1704496351484; Fri, 05 Jan 2024 15:12:31 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240102085001.228815-1-leo.yan@linaro.org> In-Reply-To: <20240102085001.228815-1-leo.yan@linaro.org> From: Namhyung Kim Date: Fri, 5 Jan 2024 15:12:20 -0800 Message-ID: Subject: Re: [PATCH v8] Documentation: userspace-api: Document perf ring buffer mechanism To: Leo Yan Cc: Jonathan Corbet , Arnaldo Carvalho de Melo , Ian Rogers , Thomas Richter , Peter Zijlstra , Adrian Hunter , Jiri Olsa , Ingo Molnar , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Leo, On Tue, Jan 2, 2024 at 12:50=E2=80=AFAM 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 explains > the implementation of both the regular 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 Thanks a lot for working on this! Reviewed-by: Namhyung Kim Thanks, Namhyung