Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3380023rwo; Fri, 4 Aug 2023 04:10:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGk5O5FyfAoX2VNCFnUfkJOCdgQ9Oqi7Lz2uHYSRsF8kD3m12qsyT7C6Ykj4aVfSnk7aiAT X-Received: by 2002:a17:902:7589:b0:1b9:e9f1:91e0 with SMTP id j9-20020a170902758900b001b9e9f191e0mr1053822pll.41.1691147408444; Fri, 04 Aug 2023 04:10:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691147408; cv=none; d=google.com; s=arc-20160816; b=cffJj+3pcVIDHDdMq4NPtXy1L0h5O+nm2MFt+OrdoJD/Y7ZNXK2C3pxf823dT7d7eI NYo1XBgFvMWN2ei7La0KRjAmINkKTBIuNd5ivYx+afu+MyjWCBvuSHjkgtYcAJy16NxV gh4mzp8D7UZB132fVljVJH8+FncysnLPeJwaWfJxQwAnw0kUfJkciHA+QdXwf+DK3401 H9Ewp90tBgscvIrPbyioGTZCagQY3F+72dsJ1XtWcgxtEHz3rOhqcpn9kfiGh1NM96Qq mR3ihXjgH8R8KaVLAGNa1dk/C3cdT0wVFdP3nPNSEahTDMX4Q+XODd7CsB6PSnI3BY8f Ly1Q== 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=fIgVcI/DAV+syZCzOifgnr1978K5ZgzsoAA4MZTsdr8=; fh=tnDeLYtJrEsjxFo562VJ7XarQWLVCo9rFAWr0IE6Ow0=; b=ICprvkR6Va2J8MHwCdXxZSrwDkKbml/7xN1pmQ3qKZXExvmY0Lr7mVRt+/6O7RiE1h 6UA2QgmQpCo4UDm+G3GXb6jOlcWrE8CF/Accte67aBKKx9PBA+nvfxMSbG6dEtEbhV7P wrByLXZExivys+qs9gCELBtohETsmiXhqKsk7kY3qFs11mOa7fcauXI6p0ZGVEny3Gq7 S91MKIuHCUQeb814coN0JRixSFnWGhrUzmMtp7e7g1PPB0oERtsk020ZfFhLmWA8ywPf a38ROD2iLs0yMKCsx8IFrpQNTpP7KOHb7B5CEHqJElAUqF7CSpMyqpKYoyqwErv3qiOm E/Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gfsJb+lP; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e14-20020a170902cf4e00b001b9736814b6si1515847plg.309.2023.08.04.04.09.53; Fri, 04 Aug 2023 04:10:08 -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=@linaro.org header.s=google header.b=gfsJb+lP; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230249AbjHDJOR (ORCPT + 99 others); Fri, 4 Aug 2023 05:14:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbjHDJNt (ORCPT ); Fri, 4 Aug 2023 05:13:49 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 906F36A7E for ; Fri, 4 Aug 2023 02:10:34 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-686b879f605so1330356b3a.1 for ; Fri, 04 Aug 2023 02:10:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691140233; x=1691745033; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fIgVcI/DAV+syZCzOifgnr1978K5ZgzsoAA4MZTsdr8=; b=gfsJb+lP9iAhBqFb5nmJR6SFpsVvn9z6Qoa51edQoEd6CqKZdUnmyFX+sXP7iaW0Wn aTqtp/hlkscVLQGHgh7Rou5pcYN3z9T1dJ8USTpCMhj1hSAKSiM2x1bFdiu9T90IiwHi a/8ABoUc/gyiOntvYldRd82s9cLH4+JwXGlce7bknV93L0ruhwipZLpRuA3W5AP02aj4 0FuH1qObKYzEc0IBBqas8YjEBr1BtU6+dc170qqINX5kJhlP5wggAjyDbggxK3b8gG/7 aUebgtHN7zEKzom7WkL45iuRRh//yiq6zJzjR+zg64QQB211uhgWG6Z1oC17YUkIwUBS 6AEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691140233; x=1691745033; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fIgVcI/DAV+syZCzOifgnr1978K5ZgzsoAA4MZTsdr8=; b=UeDYZ5OEVG4ougAzUaLvor2QShTCZOAE2tn6FYWSr9firrYOU3d9s2bQgcZabFrDk2 MqSBiIdD6iZ1JHa/n2cXGnWQ/iAAuS94Q0MsbBj66aQrPWr+5ryLynDPJohOaTafgDN3 m9IEuiGd4N+EUxRVCQQOmD3v4YDx246ULMdhBCQKQI68dMIyHuZ5SmZs/zlZLlSjJAIE xiV/04qT/DXJnjUsuTi6d+uxS8k5pd59mMdSFk877EBjXjSHbrU4cUTKqM0IU+ml2wVr IEKMgZI9HpVrGwLL1UEramhvda2k7OCneP6deSHaeBuG9MdQe10B0ePK7wX499lqSPsO JF6w== X-Gm-Message-State: AOJu0YwWuRyJbWqIfJBNKRuRP+5vbTPwKJLRMNwq9XqYK63+esP4IEMV efTp8a3sC+VFnAkvpg62h0FowQ== X-Received: by 2002:a05:6a20:3d82:b0:12b:1686:3012 with SMTP id s2-20020a056a203d8200b0012b16863012mr986031pzi.3.1691140233508; Fri, 04 Aug 2023 02:10:33 -0700 (PDT) Received: from leoy-yangtze.lan ([156.59.39.102]) by smtp.gmail.com with ESMTPSA id x19-20020a170902ea9300b001b1c4d875f5sm1254478plb.44.2023.08.04.02.10.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 02:10:33 -0700 (PDT) Date: Fri, 4 Aug 2023 17:10:27 +0800 From: Leo Yan To: Arnaldo Carvalho de Melo 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: <20230804091027.GC589820@leoy-yangtze.lan> 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: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 On Thu, Aug 03, 2023 at 05:53:29PM -0300, Arnaldo Carvalho de Melo wrote: > 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. Okay, I will spin a new patch based on this discussion. Thanks for confirmation. Leo