Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751548AbdIUEfA (ORCPT ); Thu, 21 Sep 2017 00:35:00 -0400 Received: from ozlabs.org ([103.22.144.67]:41619 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750795AbdIUEe7 (ORCPT ); Thu, 21 Sep 2017 00:34:59 -0400 From: Michael Ellerman To: Anju T Sudhakar Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, maddy@linux.vnet.ibm.com, hemant@linux.vnet.ibm.com, anju@linux.vnet.ibm.com Subject: Re: [PATCH] powerpc/perf: Fix for core/nest imc call trace on cpuhotplug In-Reply-To: <1505151134-26128-1-git-send-email-anju@linux.vnet.ibm.com> References: <1505151134-26128-1-git-send-email-anju@linux.vnet.ibm.com> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Thu, 21 Sep 2017 14:34:57 +1000 Message-ID: <87r2v0d5zi.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 665 Lines: 16 Anju T Sudhakar writes: > Nest/core pmu units are enabled only when it is used. A reference count is > maintained for the events which uses the nest/core pmu units. Currently in > *_imc_counters_release function a WARN() is used for notification of any > underflow of ref count. Replace WARN() with a pr_info since it is an overkill. As discussed elsewhere this is not the right solution. If it's OK for the reference count to be negative, then we shouldn't print anything when it is. But I don't understand how it can be OK for the refcount to be negative. That means someone has a negative number of references to something? cheers