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 EB836EB64DC for ; Tue, 18 Jul 2023 01:42:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231127AbjGRBmy (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@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