Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4183624ybg; Mon, 8 Jun 2020 00:55:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpp5YIia8BIRf2mthJ77cKsJQpgwS+nR76PfpOVCkqIJTYRb5yPbHlSe2rqfAXhZQOSdgi X-Received: by 2002:a17:907:212b:: with SMTP id qo11mr20384264ejb.235.1591602946260; Mon, 08 Jun 2020 00:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591602946; cv=none; d=google.com; s=arc-20160816; b=MeGu0z8jwufpCAuC2LLMohWILa4VMZx/GUTb07QfKQrKG1ws07MLrY4y1CkH2gNZbK vQpv7MQCiXBDb8Qerd/twfZpqEX1cnanl2UWyVPPEMPvdHRUdqs37D6aqu6jRLzV7+RA YenxX62X8KP+CgYtVHWYTbCmLI+LX224q0CVFduKzPbCyKaegcLRmjgScttd6WnSOfPL t1wH6qrTh/ERGMH5pWckFzDcqEZaXak6AHUiwTsdQulEzuNDzQLKafpb1LOxe8zCN/hW d729c8aZ8D/R2Wl4E0aLcpORYV4hwr51rSx6yL2MXcVmCA5bDjZOTUUQ4MBizSE8xjRf cHUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oifOmq+ant3FOG9DSnx+qFeUcpRAEer8FxJtugstrRM=; b=eH/WEPyPXrxtbXCtVvUKd+E+kj/1OqlNYPUejDLszi13Hrwc9Cy/3nNn8gou76E4vI k2mfI2nENiNlMP/NnaP2fUpmCAkyYtUEMKEFJo8CLPiWq6VOA/6ugBay//ERxb8xpukn DIsUSnyDegwHkN7AcjuBT9+b6YNC16vssQfFcCZ9pF4+XJl9aR6rgt8pqniHqVU7d6Bt VWFwtp7gmH4+NfCORsp7uxZsVRDE6QzEHocaimZ39SJZvdmjJ9s/V5b+H7lZHEFKQHJt BjTC8trrUKGJgMXu3eHN07g2bYy0qNKzn+D+6SlOM190myfO5Ov7r+vZE1NpstK1G5dd ma6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=lu9kB5gh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch25si8234487ejb.62.2020.06.08.00.55.24; Mon, 08 Jun 2020 00:55:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=lu9kB5gh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729179AbgFHHuq (ORCPT + 99 others); Mon, 8 Jun 2020 03:50:46 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:53931 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729014AbgFHHum (ORCPT ); Mon, 8 Jun 2020 03:50:42 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 49gQR427lLz2d; Mon, 8 Jun 2020 09:50:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1591602640; bh=1E5TLFv0Qix6OuC8g563KyHdAer+hGy3zGxRZ3URGDs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lu9kB5ghtQ+L+JZed3mX4EQCmuQ1enh5MasGPi2Xm9/SRiSVO9GJtM/hhVdqmGbRQ y4orwsM+PhC1jpt5YQxyTpe2zH+FTKYZTd9gBi9Ph3lgWcvJwtazj1GY0oFRgDApbr rtqEasRwT0tGXXsP9GguvquX9/yHU4O/nRUJX+NwC1ox/TPsq+rRF9k+VFBVRHVI4d MNW3LwUgYs7mWSwiOkNpeLwTMPkmpj3xeuOLQojm7sup22PE6KyARhn6XQx77azo+X ot+kl5M/01i/6D8xDo5FjokwKazFSSja9k+YDGXSqa+i4H8dINzKHMylei7vy2Jdjq aa8mMQ0y9a35A== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at mail Date: Mon, 8 Jun 2020 09:50:39 +0200 From: Michal Miroslaw To: Chen Yu Cc: "Rafael J. Wysocki" , Len Brown , Greg Kroah-Hartman , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2][RFC v2] PM-runtime: change the tracepoints to cover all usage_count Message-ID: <20200608075038.GB1124@qmqm.qmqm.pl> References: <0a3ae7be4c467912327005995b1defb4fefd8101.1591600914.git.yu.c.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0a3ae7be4c467912327005995b1defb4fefd8101.1591600914.git.yu.c.chen@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 08, 2020 at 03:42:15PM +0800, Chen Yu wrote: > Commit d229290689ae ("PM-runtime: add tracepoints for usage_count changes") > has added some tracepoints to monitor the change of runtime usage, and > there is something to improve: > 1. There are some places that adjust the usage count have not > been traced yet. For example, pm_runtime_get_noresume() and > pm_runtime_put_noidle() > 2. The change of the usage count will not be tracked if decreased > from 1 to 0. > > This patch intends to adjust the logic to be consistent with the > change of usage_counter, that is to say, only after the counter has > been possibly modified, we record it. Besides, all usage changes will > be shown using rpm_usage even if included by other trace points. > And these changes has helped track down the e1000e runtime issue. > > Signed-off-by: Chen Yu > --- > v2: According to Michal's suggestion, adjust the commit log > to better describe the meaning of this patch. > -- > drivers/base/power/runtime.c | 38 +++++++++++++++++++++++------------- > 1 file changed, 24 insertions(+), 14 deletions(-) [...] Reviewed-by: Micha? Miros?aw