Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp741395imm; Sat, 7 Jul 2018 07:44:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpegV/I17V2a5G6kS4brpHRfDhOE81/toWYhDccVpN07oI7T9NIY4ti9RPOZLV6z4VTU/FnT X-Received: by 2002:a62:4f5b:: with SMTP id d88-v6mr14563029pfb.225.1530974683120; Sat, 07 Jul 2018 07:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530974683; cv=none; d=google.com; s=arc-20160816; b=cvyHAg00YcMT6AlWhGF0jKLFhxjXFNvqqV2LZa1IAerZDEuDcyuYPeFjf+sKfYx2QE XHTioxE7zynk7ix/QRXNIHK8juZbI2uccLuoXvQdyccpBMqzUkIzwtJawik+7Z4RCmZ5 v62FhfY+qp6oJuPqnM3VTGYJSbQp4KrD/curtc6tBJfL/QrFPQd7uOrSWqV20XsyUeMv IeVtkBPhk04DXQeYvmyEoyfoTNbrzsv/TKaocmmAlhlEgcHpS1B9iFx87yX11K6ESDhA LLu5N3HT6crlJIplJWwJ7SrsPTwRwVPsGKEcMoyMHUrqQsNC/i3VbE4f5/ig8xyKjSmx IzDA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=N39NoYH0BSTpGZIGexZXZv9nyHB7xLzYfso6TqJtsak=; b=d75ByGBYzJL/QQlV28tUynC70rGFjy91etqlAeppToBq1KHifcA+Hzb2M3Sgmny3DT by0V0Mr1WN4wAqWTaVpGss5w8O2Qrc4iws4Bg3fxgs0ou+bN0OQyDaYKB/UHOKDPxC/J /dPQ5JIoOuqj5ft+tA+uI885825MxSLKgBTLxO2gyGilD2pSz2Wz2BsPyFl1TI8nalLv fJW202ZSX5HiA4CJk4i0IE3mOm8hR7sDjMOWUUVdmEy4H736tb05blI1QdgFRTQ12rQA GZht8oDUcrmG8HF5+AGNANVpRXULUDkZW81iUK7TXrvaLrhM1/QB+PrryHCnNy0NfZgS 6EyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7-v6si6796749plr.137.2018.07.07.07.44.27; Sat, 07 Jul 2018 07:44:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753976AbeGGOnv (ORCPT + 99 others); Sat, 7 Jul 2018 10:43:51 -0400 Received: from bmailout1.hostsharing.net ([83.223.95.100]:39869 "EHLO bmailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753549AbeGGOnu (ORCPT ); Sat, 7 Jul 2018 10:43:50 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id 5566030000623; Sat, 7 Jul 2018 16:43:48 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 1F21236A1E; Sat, 7 Jul 2018 16:43:48 +0200 (CEST) Date: Sat, 7 Jul 2018 16:43:48 +0200 From: Lukas Wunner To: Mika Westerberg Cc: linux-kernel@vger.kernel.org, Andreas Noever , Michael Jamet , Yehezkel Bernat , "Rafael J. Wysocki" , Christian Kellner , Mario Limonciello Subject: Re: [PATCH 5/5] thunderbolt: Add support for runtime PM Message-ID: <20180707144348.GA28036@wunner.de> References: <20180618110731.57427-1-mika.westerberg@linux.intel.com> <20180618110731.57427-6-mika.westerberg@linux.intel.com> <20180707133815.GA6656@wunner.de> <20180707142553.GP2534@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180707142553.GP2534@lahna.fi.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 07, 2018 at 05:25:53PM +0300, Mika Westerberg wrote: > On Sat, Jul 07, 2018 at 03:38:15PM +0200, Lukas Wunner wrote: > > You're setting pm_runtime_no_callbacks() on the domain. A side effect of > > setting this flag is that whenever the domain's device is runtime resumed, > > it's parent (the NHI) is *not* runtime resumed, see this comment in > > rpm_resume(): > > > > /* > > * See if we can skip waking up the parent. This is safe only if > > * power.no_callbacks is set, because otherwise we don't know whether > > * the resume will actually succeed. > > */ > > > > Above, you're runtime resuming the domain in boot_acl_show(). So if the > > NHI is runtime suspended while that sysfs attribute is accessed, it won't > > be runtime resumed. Is that actually what you want? > > No, it should be runtime resumed when domain is. Looking at the code in > question bit more deeper: [snip] > So skipping waking the parent can only happen if any of the following > conditions are true: > > - Parent has runtime PM disabled > - Parent has ignore_children set > - Parent is already resumed > > As far I can tell there can't be situation you describe that the parent would > not be runtime resumed when the domain is. Okay, missed that. Then why aren't you using pm_runtime_no_callbacks() on switches as well? Wouldn't that obviate the need to declare those empty runtime PM callbacks? > > BTW, what's the purpose of nhi_enable_int_throttling()? > > It changes how fast interrupts get delivered and when to start throttling. > Mostly needed in P2P functionality (but should not do any harm for control > channel traffic). See also 8c6bba10fb92 ("thunderbolt: Configure interrupt > throttling for all interrupts"). Understood, thanks. Lukas