Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6276314rwp; Mon, 17 Jul 2023 19:15:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlE9AxShYhGWN7GMNiE0MGiOI577CoG1pkngMnnrLV3uNTYqi2xJ7BiFr7dw0rYlMpZf7hcx X-Received: by 2002:a17:906:224a:b0:994:3037:c1f with SMTP id 10-20020a170906224a00b0099430370c1fmr12038268ejr.24.1689646537581; Mon, 17 Jul 2023 19:15:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689646537; cv=none; d=google.com; s=arc-20160816; b=YE81CzL8aEhqJs2qt9AYzsMtveBaj+xtpXNGeielz7ULW7ZSy0arGYMBDyGW6teTtA tKQ8c4w97VWzUYyqeJfngtGoWyWMZsN6m2DGhL2tx2n/XcqS9mUjGEDbknzgrvl+1PzF wQlN3ok3xa/LTT2Gfhg6Xa8E4XGjttIXTr1fJwqe85XMAT/x/xw1DzoSipTPmIMjLZ65 fxbUBkpjq7rCXdIYs4YzX2knV6Sd6Zdg8ckcuTtM/QQsidyBsaosW9GTfcIZpnvmXaec 6rbijer2QoE5jQhD18St08jVeYRFvpNGI/fBkTMFHZE6TsBf2TH4g0TRdJ4x37l0qlur huhw== 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; bh=n+BUsiXI9YWGa/y3k2cjGm4AnSvBHyQpAwjNTdzZkzA=; fh=vegRaPlEVvaZptAChs1GU9YYmgEn4mcubbIPQ1Omm8s=; b=XgQXJ/1MB2zsm7eazeCxNtug9itUM/9IRnZwPKwgMjqMChNnEMqCFdPFI0V6gMZZ1n BnYUwlVNzv1yQ4zRTOCG8Pls5GsuYRutzyE+3zcAEDAgBvK93HG/6yw9RAzunoiLVFtj aSXP00n6LTpOPN94vvFGl94nE5ngD2r1zmsp2lL2ZhT4xrhg8oAFagpd2RBstYUZB94Y HWbHDFgwLd6hXy30vg7zhkoR1a09W6jH2IId2AwCFfkNibP412ccm2rWN8cFVMrF45RB 5U5/X89OfHaX4SC9HaLLtpmqlB7JxObxCi7tR4CDn7gGUbkknDxBGWX8d+Wr3J65fERt S3Lg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw13-20020a170906c78d00b0098888ba2920si415356ejb.818.2023.07.17.19.15.14; Mon, 17 Jul 2023 19:15:37 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229725AbjGRBmy (ORCPT + 99 others); Mon, 17 Jul 2023 21:42:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbjGRBmt (ORCPT ); Mon, 17 Jul 2023 21:42:49 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E90B19B; Mon, 17 Jul 2023 18:42:48 -0700 (PDT) Received: from kwepemi500013.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4R4hWv6Cq7z18Lfx; Tue, 18 Jul 2023 09:42:03 +0800 (CST) Received: from M910t (10.110.54.157) by kwepemi500013.china.huawei.com (7.221.188.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 18 Jul 2023 09:42:44 +0800 Date: Tue, 18 Jul 2023 09:42:27 +0800 From: Changbin Du To: Changbin Du CC: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , , , Subject: Re: [PATCH] perf/doc: revise the description about PR_TASK_PERF_EVENTS_{ENABLE,DISABLE} Message-ID: <20230718014227.r5kmib2nqo3soyik@M910t> References: <20230612023523.3918618-1-changbin.du@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230612023523.3918618-1-changbin.du@huawei.com> X-Originating-IP: [10.110.54.157] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500013.china.huawei.com (7.221.188.120) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, 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 Hi Arnaldo, Could you pick this? So I can update the prctl man pages as well. On Mon, Jun 12, 2023 at 10:35:23AM +0800, Changbin Du wrote: > The behavior of PR_TASK_PERF_EVENTS_{ENABLE,DISABLE} has been changed > since v2.6.30, commit 082ff5a2767a ("perf_counter: Change pctrl() > behaviour"). > > This patch revises the documentation about these two prctl options to match > the real behavior. The linux man pages should also be updated. > > Cc: Ingo Molnar > Cc: Peter Zijlstra > Signed-off-by: Changbin Du > --- > tools/perf/design.txt | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/tools/perf/design.txt b/tools/perf/design.txt > index aa8cfeabb743..cc9a2716d5ec 100644 > --- a/tools/perf/design.txt > +++ b/tools/perf/design.txt > @@ -439,16 +439,15 @@ Additionally, non-inherited overflow counters can use > > to enable a counter for 'nr' events, after which it gets disabled again. > > -A process can enable or disable all the counter groups that are > -attached to it, using prctl: > +A thread can enable or disable all the counter groups that are > +created by itself, using prctl: > > prctl(PR_TASK_PERF_EVENTS_ENABLE); > > prctl(PR_TASK_PERF_EVENTS_DISABLE); > > -This applies to all counters on the current process, whether created > -by this process or by another, and doesn't affect any counters that > -this process has created on other processes. It only enables or > +This applies to all counters created by this thread, and doesn't affect any > +counters that created by other processes or threads. It only enables or > disables the group leaders, not any other members in the groups. > > > -- > 2.25.1 > -- Cheers, Changbin Du