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 X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 586F5C433ED for ; Mon, 17 May 2021 19:56:43 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CEF2360FF1 for ; Mon, 17 May 2021 19:56:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CEF2360FF1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hICP/al+/2Fg3R32/JqaTRYrZsej4dT5Bt+r3oTLZxA=; b=gZtEaWeC8ePu2Yirrq59eZlGY z5w08JYFhLIr12CiGlIknnQuAjGteVChVyZQ1xwMedCHIJF2lse0ktAfiNTXpS7U2iljcUxi+Us8B gfYw30+3AnA+a6w/KDt9hif1FPROUrhuWgZf8ddxq+eUwynzrA8k9ae6yaMWVEBvBBPPHYasjn6Yu wCL+RLdUXxYGsZFnjyToQTFBd999ejfQFfzcycDTEpRHdDm4kk9d047fucfB236SzrigEw4UftTtn IIGC3H+chALP8FL9FF6+gKba5hkNG5GX3x4CBCjjL893hMRJXiHJGSq2yFp3wKCWfgGeIBjPyWv1k J1b8io9VQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lijJg-00FzG6-Tr; Mon, 17 May 2021 19:54:17 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lijJc-00FzFi-Rj for linux-arm-kernel@desiato.infradead.org; Mon, 17 May 2021 19:54:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=R/csVDDllSt3emYyHrP2ssqRcgt8VzW5pyN/WluRGw8=; b=bHCO8rVSxFPxvqEQ1Uu1Q1hJE+ j+wDKnlwdktHTjDkN5UlkaImyLgqklECsJUz1L1wuSNYHquFNCmFDsW4GZDMhkuu0PNrfYNC8vv8R 66qlFYbnFPlkUk0CM+wmV/8lXJRQYOrd3fJk33z3BUKDmZ+4MvHR7OYCUZNTM4E2czzG5RgX7z6aE wJRkXP4K532iKFsglfQiikbPICE9Jqti6IJ22CifIU4pR7IPbO3DbXw+WHihDenSV/qU4QXi2fz9a xXZnEA6A0jj2bmU2hJq3AX25K9n/xmxjEKaEQPytBWpzw/3Sa35nM1EOlNfxIVNgRKVGx+kOfZiEe dnxrScqw==; Received: from mail-ot1-f46.google.com ([209.85.210.46]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lijJa-00E6Yq-Aa for linux-arm-kernel@lists.infradead.org; Mon, 17 May 2021 19:54:11 +0000 Received: by mail-ot1-f46.google.com with SMTP id t10-20020a05683022eab0290304ed8bc759so6589556otc.12 for ; Mon, 17 May 2021 12:54:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R/csVDDllSt3emYyHrP2ssqRcgt8VzW5pyN/WluRGw8=; b=QmAGUCcCwfbVh1T/w+NhAJdG/ONy4xZGdYJwScuHDn/BLbBe0ZSka1t+xUVsLCkJv4 /6Cnt02VPhJnhHaiyFS2J2+d9b+TTN4n1vl3QEQpPtTAzeHqruOGyojM1lBQ0qXt9W2t Bqia9A3A1LjUOHjuDp7fthq2nMIF4drFrrDzN4mp06orY67Th5mqz5Qi/EQ9ku8QghFF YlT8UuU4sa7eXd7vIG/bArCbIZnNStxltirnTzhkiVncv4gUAtGh8ZN6qH5XxaImbXW1 jZynle/wsKaIDDuhUq4qfpz5Ix6PhbC8TlRYzjblHuIk7bayhNNMstfklpjXCKu5zbGF e/OQ== X-Gm-Message-State: AOAM530i4lTU6ID8/I2oK2esGk2X8P1LTR/PuXuWrYRwwBjC+2DlR8p8 cWuyPw0sO9VMHiw8SUfRfg== X-Google-Smtp-Source: ABdhPJxh6jQjL6XmPIMt25DCnayEdf+Py+/iq0NzU1Co90JjmoA1HWjiwZq/KDDW1BPXkVBt9fHD/A== X-Received: by 2002:a9d:4101:: with SMTP id o1mr1037986ote.281.1621281249787; Mon, 17 May 2021 12:54:09 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id m81sm2920758oig.43.2021.05.17.12.54.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 12:54:09 -0700 (PDT) From: Rob Herring To: Will Deacon , Catalin Marinas , Peter Zijlstra , Ingo Molnar , Mark Rutland Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Kan Liang , Ian Rogers , Alexander Shishkin , honnappa.nagarahalli@arm.com, Zachary.Leaf@arm.com, Raphael Gault , Jonathan Cameron , Namhyung Kim , Itaru Kitayama , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v8 1/5] perf: Add a counter for number of user access events in context Date: Mon, 17 May 2021 14:54:01 -0500 Message-Id: <20210517195405.3079458-2-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210517195405.3079458-1-robh@kernel.org> References: <20210517195405.3079458-1-robh@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_125410_390419_2EF03E5A X-CRM114-Status: GOOD ( 14.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When scheduling a task's context, we need to know if the task has any user accessible events in order to enable or disable user access. Walking the context's list of events would be slow, so add a counter to track this. Signed-off-by: Rob Herring --- include/linux/perf_event.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index f5a6a2f069ed..4cf081e22b76 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -822,6 +822,7 @@ struct perf_event_context { int nr_stat; int nr_freq; int rotate_disable; + atomic_t nr_user; /* * Set when nr_events != nr_active, except tolerant to events not * necessary to be active due to scheduling constraints, such as cgroups. -- 2.27.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel