From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 892F6EB64DD for ; Thu, 3 Aug 2023 14:36:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235017AbjHCOg2 (ORCPT ); Thu, 3 Aug 2023 10:36:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236456AbjHCOf6 (ORCPT ); Thu, 3 Aug 2023 10:35:58 -0400 Received: from ms.lwn.net (ms.lwn.net [IPv6:2600:3c01:e000:3a1::42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63889421F; Thu, 3 Aug 2023 07:35:00 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:281:8300:73::5f6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id D981A31A; Thu, 3 Aug 2023 14:34:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net D981A31A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1691073291; bh=9FpXj138aLwSMechytCcdOziH9ecwbVXLIo416cCJSM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=OqmViMk8ildYMdSqsIn1qFF3QJMBez6U4ObHC76vmvX24eEC+yx8/+lpKG5VHhDYg gmIHTKk8XdXdVU3046ESQJOpMZBM6c8/vrKqETraoGzZx3+G5CtihQYk6mMdLGZ4HW UDfSWWZ9BQrHXcKFGieWTKGjujM6EsuzlMQS+cyBXWxAsCh/9FG8rIMsgl0GPzUzlF eZ72rcwhKRCfOj5mIi+O5QAQjQs2Yu/6hALnQH00151kqPLu6DXZjlwxt+DVWIRWWo vwlmaQqLm276AbaMksBITB/y0Frcx6humpWOLYquHNZOV72tf8rPrBu0AFLb0DX6bf XM3XLoZUKNPHA== From: Jonathan Corbet To: Leo Yan , Arnaldo Carvalho de Melo , Ian Rogers , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Cc: Leo Yan Subject: Re: [PATCH v2] perf doc: Document ring buffer mechanism In-Reply-To: <20230803035037.1750340-1-leo.yan@linaro.org> References: <20230803035037.1750340-1-leo.yan@linaro.org> Date: Thu, 03 Aug 2023 08:34:50 -0600 Message-ID: <87v8dw6vp1.fsf@meer.lwn.net> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Leo Yan writes: > 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 > --- So this seems like good material from a very brief scan. I do have to ask, though: why is it not in RST, and why not put it into the user-space API book? Thanks, jon