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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 42FA5C433DF for ; Fri, 3 Jul 2020 13:46:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 0571D20826 for ; Fri, 3 Jul 2020 13:46:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="1kv6ZJ2L"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="jXGop+ok" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0571D20826 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=37Nc19PgXy/UG00LUH4RqTJ0qPdJdcZUxdWyhMeWVj8=; b=1kv6ZJ2LuaMw2K6uYG8leYfde n0JEwXOfdEnydiuKTW8prkEOIYEa0yP3L7zOVzMxgRGOz6COQDdubWOsls9vnX0Sozu0RqHJR9FJe oIgDmJMaFsP/65TUhPlmWZ0AHM29ilhN/pvhX3O/UDPjx/sim2FCm53juz3reKYPbqpZJT7R3zomq eD91KzIUzEOjMzWwkcwNp13t899y8fNNMwIsdyW+QlQ1hcoeG6GuZ3djR+QJ726Y0dCpdbgEVbbcj gizagDHIBtAKOT1k29/5Pr90fi4I6DTGH0Q6NFIJlVSOdI//e85xR+QkApAMxg6W0PZmWG8y+u39A NPZQxSGcQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrM0L-0004mW-Jp; Fri, 03 Jul 2020 13:45:25 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrM0I-0004lM-Fn for linux-arm-kernel@lists.infradead.org; Fri, 03 Jul 2020 13:45:23 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4F10320826; Fri, 3 Jul 2020 13:45:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593783921; bh=hm3Moh7xHMlFJvAAJ9OOz3vc20Ys5RgWmTwwcOCFC4M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jXGop+ok38hzk7QdHVtN0HtuYUcBxp395jqRjI6yYNHKdC+4CWmuGgM/jDbgpN9Jb W8jI0RaxPNXsAVQjw4meJCfSpmnZKWUDAz0s6BGZTviRf3Bj6gz9BVpSXym2hRmjxY wDg8LS8/YBKzPcDpvmj/ZuNSE3rC2tNhpPiJD9F0= Date: Fri, 3 Jul 2020 14:45:16 +0100 From: Will Deacon To: Stephen Boyd Subject: Re: [PATCH v5 3/7] arm64: perf: Remove PMU locking Message-ID: <20200703134515.GF18953@willie-the-truck> References: <20200617113851.607706-1-alexandru.elisei@arm.com> <20200617113851.607706-4-alexandru.elisei@arm.com> <159242503203.62212.1690942414916053920@swboyd.mtv.corp.google.com> <159255539947.62212.6059916295459835174@swboyd.mtv.corp.google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <159255539947.62212.6059916295459835174@swboyd.mtv.corp.google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200703_094522_595355_DBDA6BB0 X-CRM114-Status: GOOD ( 19.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, Julien Thierry , Peter Zijlstra , maz@kernel.org, Jiri Olsa , Will Deacon , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Alexander Shishkin , Ingo Molnar , catalin.marinas@arm.com, Namhyung Kim , Alexandru Elisei , linux-arm-kernel@lists.infradead.org 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 On Fri, Jun 19, 2020 at 01:29:59AM -0700, Stephen Boyd wrote: > Quoting Alexandru Elisei (2020-06-18 03:51:31) > > The armv8pmu_{start,stop}() functions are called from the irq handler, so we're > > safe from preemption in this case. They are also called via > > pmu->pmu_{enable,disable} callbacks, and I didn't find an explicit contract > > regarding preemption in include/linux/perf_event.h. I've checked the other call > > sites, and I didn't find any instances where they are called with preemption > > enabled, which makes sense as we don't want to disable the PMU on a another CPU by > > accident. > > If they're all callbacks then it's overkill to add this. Presumably it > is better to enforce this wherever the callbacks are called from so as > to not litter the callee with random cant_sleep() calls. Probably best > to ignore my suggestion. > > > > > I would be inclined to add cant_sleep() calls to armv8pmu_{start,stop}(). In the > > previous iteration, there were WARN_ONs in these functions, and Will said [1] they > > can be removed because they are per-CPU operations. Will, what do you think about > > adding the lockdep assertions? > > > > [1] https://www.spinics.net/lists/arm-kernel/msg745161.html > > > > If I read it correctly Will is saying the same thing in that thread. Right, in the cases where perf core already relies on things not being preemptible, we don't need to add extra checks. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel