Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2738056rwo; Thu, 3 Aug 2023 14:15:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlGvYxQs8mxpP+RgMsV74Nqbn9YPe5sVmLS5sHzGi7qf2t6kROjXPY3di+1PhV/Gu9knk+PG X-Received: by 2002:a17:906:2212:b0:99c:1dac:5af0 with SMTP id s18-20020a170906221200b0099c1dac5af0mr8714877ejs.70.1691097346711; Thu, 03 Aug 2023 14:15:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691097346; cv=none; d=google.com; s=arc-20160816; b=FXCTum7tsnppm6xujmDrWnSK4De/XLpGo/b97M2JYX034ycAZw++D2cG2hIqp8zHJY dpPv93U+dF2ROovvbiR308p4UlnwkWOvi020Krx92daDIpzyLQJM0gpDH896t1vjy0c3 5DpqG25E1VOHIQ42uvzvky65inX+rwax+G/VVPkMUOOuiefbPovFsTF9G2fWCu5YSKKN Qqgr+DpXJkerSl/6Je343PQmYiyy2CQ2A2CXWuGX+hMQ2GiTQ/cYCr32Hv/wzCg9ltrO 0VXAn7R+ELtZjivVtjft/Hn1L3QPEiwqnRgHiUQMl/oHHbgtmHcntZbJyXaphnBOK+pF Me4w== 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:dkim-signature; bh=cDCv6IPxnfrNqHjzXmrdFupkD08oRsmw24TTYLOtBBE=; fh=vvGdVqbvrBcR9o8QkjBPAkOEx7dT0rI0xjBldkp/1yI=; b=SWQhnBr+dbUHR8B6L+elocONS/5Bpgsw4ul/bF2A+zdTLewClVKRl9kA/ls2teLTf/ lgjYWeQ1MOttX5HIlMMLUaFFAXwp0wKOvrFLjfsT17x3WuUMPv3AFbBxh4uGBBrqfUty u/u0E+4CXWJ0oVGhY6Py22Lbb+lNECzJh8w69E5pb+ddvPwzzNUHYjCYKnMh9K17sWs0 PFlO3+2sKBuzHK4hVnv8JukBauF8NjDhoZLnCg5XbK9XdzfJFpATRDetQBpUV5WrXZnB maciu0p+p4l/X8imKOP4KuHWgQhQ1xVgcw4GIcYXlijO0cjLsiUhA+xj1bjY0A8S5HXu NCfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fCat80oZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lz25-20020a170906fb1900b0099b56bacec3si100802ejb.955.2023.08.03.14.15.21; Thu, 03 Aug 2023 14:15:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fCat80oZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230481AbjHCUxy (ORCPT + 99 others); Thu, 3 Aug 2023 16:53:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232305AbjHCUxu (ORCPT ); Thu, 3 Aug 2023 16:53:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DABF421A; Thu, 3 Aug 2023 13:53:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BA61C61EA8; Thu, 3 Aug 2023 20:53:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5DDBC433C8; Thu, 3 Aug 2023 20:53:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691096013; bh=gnY0icLGx3OFl0vDnCwwzG6CyKZI5b2IVmGBpNdxe6s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fCat80oZbGRxutrrlcy6605LCCFL9dLpHI6nEbLIMs03mnvudOhQhlRJpca1SD8rt 1SnZRGVEeAme+AX+M0Cl4ppHY6YMWlq0b9MRK7Er8f2GdxNphGPQZctnXqGChYvcAv SL74YtEoQWIoj8zFz+5rTyr2R8/hqVpLr3YNtbtrcXQdFXyi1BAsh5MN1Eog2+5PPD 0+BLBCf52PtOFRUgVZhhc752f9ezDczJdhbbQzMavKCU4QbaI1o3OV9aepr1cj19NA kWSvpa4aUh1kMsPNKPMdH+Ioe7QlRlb01WhZsNJM4H8y00rvwTNoNe60roQZUgcnEE Q9+pLKiyFhRNQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 8D2D8404DF; Thu, 3 Aug 2023 17:53:29 -0300 (-03) Date: Thu, 3 Aug 2023 17:53:29 -0300 From: Arnaldo Carvalho de Melo To: Leo Yan Cc: Jonathan Corbet , 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 Subject: Re: [PATCH v2] perf doc: Document ring buffer mechanism Message-ID: References: <20230803035037.1750340-1-leo.yan@linaro.org> <87v8dw6vp1.fsf@meer.lwn.net> <20230803165636.GB1783639@leoy-huanghe.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230803165636.GB1783639@leoy-huanghe.lan> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Em Fri, Aug 04, 2023 at 12:56:36AM +0800, Leo Yan escreveu: > Hi Jon, > > On Thu, Aug 03, 2023 at 08:34:50AM -0600, Jonathan Corbet wrote: > > 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? > > This documentation is Perf related topic, so my instinct is to place > it into the folder tools/perf/Documentation/. > > Strictly to say, the doc doesn't give formal introduction for the > user-space APIs. Given perf ring buffer is a mechanism for exchanging > data between the kernel and user space, I am open for placing it in the > folder Documentation/userspace-api/. > > I would like get opinions from the perf maintainers if possible, if we > have agreenment I am glad to convert it to RST format. Yeah, I agree with Jon. - Arnaldo