All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-kernel@vger.kernel.org,
	Andreas Noever <andreas.noever@gmail.com>,
	Michael Jamet <michael.jamet@intel.com>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Christian Kellner <christian@kellner.me>,
	Mario Limonciello <mario.limonciello@dell.com>
Subject: Re: [PATCH 5/5] thunderbolt: Add support for runtime PM
Date: Sat, 7 Jul 2018 16:43:48 +0200	[thread overview]
Message-ID: <20180707144348.GA28036@wunner.de> (raw)
In-Reply-To: <20180707142553.GP2534@lahna.fi.intel.com>

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

  reply	other threads:[~2018-07-07 14:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 11:07 [PATCH 0/5] thunderbolt: Add support for runtime PM Mika Westerberg
2018-06-18 11:07 ` [PATCH 1/5] thunderbolt: Use 64-bit DMA mask if supported by the platform Mika Westerberg
2018-06-18 11:07 ` [PATCH 2/5] thunderbolt: Do not unnecessarily call ICM get route Mika Westerberg
2018-06-18 11:07 ` [PATCH 3/5] thunderbolt: No need to take tb->lock in domain suspend/complete Mika Westerberg
2018-06-18 11:07 ` [PATCH 4/5] thunderbolt: Use correct ICM commands in system suspend Mika Westerberg
2018-06-18 11:07 ` [PATCH 5/5] thunderbolt: Add support for runtime PM Mika Westerberg
2018-07-07 13:38   ` Lukas Wunner
2018-07-07 14:25     ` Mika Westerberg
2018-07-07 14:43       ` Lukas Wunner [this message]
2018-07-07 15:54         ` Mika Westerberg
2018-07-07 21:14   ` Lukas Wunner
2018-07-08  7:31     ` Mika Westerberg
2018-07-08  9:56       ` Yehezkel Bernat
2018-07-09  4:20         ` Mario.Limonciello
2018-07-09  6:41           ` Mika Westerberg
2018-07-04  4:37 ` [PATCH 0/5] " Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180707144348.GA28036@wunner.de \
    --to=lukas@wunner.de \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=christian@kellner.me \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@dell.com \
    --cc=michael.jamet@intel.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.