LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux PCI <linux-pci@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Aaron Lu <aaron.lu@intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [RFC][PATCH] PCI / PM: Avoid resuming PCI devices during system suspend
Date: Thu, 15 Jan 2015 10:45:05 +0100	[thread overview]
Message-ID: <2648963.rfs1ehcxce@vostro.rjw.lan> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1501121134480.1707-100000@iolanthe.rowland.org>

On Monday, January 12, 2015 11:39:18 AM Alan Stern wrote:
> On Mon, 12 Jan 2015, Rafael J. Wysocki wrote:
> 
> > On Thursday, January 08, 2015 10:51:06 AM Alan Stern wrote:
> > > On Thu, 8 Jan 2015, Rafael J. Wysocki wrote:
> > > 
> > > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > > > 
> > > > Commit f25c0ae2b4c4 (ACPI / PM: Avoid resuming devices in ACPI PM
> > > > domain during system suspend) modified the ACPI PM domain's system
> > > > suspend callbacks to allow devices attached to it to be left in the
> > > > runtime-suspended state during system suspend so as to optimize
> > > > the suspend process.
> > > > 
> > > > This was based on the general mechanism introduced by commit
> > > > aae4518b3124 (PM / sleep: Mechanism to avoid resuming runtime-suspended
> > > > devices unnecessarily).
> > > > 
> > > > Extend that approach to PCI devices by modifying the PCI bus type's
> > > > ->prepare callback to return 1 for devices that are runtime-suspended
> > > > when it is being executed and that are in a suitable power state and
> > > > need not be resumed going forward.
> > > 
> > > Does this correctly handle PCI devices that aren't included in the ACPI
> > > tables?  For example, add-on PCI cards?
> > 
> > Well, it would if it took the case when a device was configured for remote
> > wakeup at run time but was not supposed to wakeup the system from sleep into
> > account.
> > 
> > That needs to be checked in pci_dev_keep_suspended() rather than in the platform
> > callback to cover all devices.
> > 
> > Updated patch follows.
> > 
> > Rafael
> 
> This looks better, thank you.

Well, it still has the problem that the current ACPI wakeup setting may not be
suitable depending on the PM_QOS_FLAG_REMOTE_WAKEUP value which I overlooked
before.

I need to restore the check against adev->wakeup.prepare_count in
acpi_pci_need_resume() to cover that I think.

Will post a v2 with that fixed.


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2015-01-15  9:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08  0:26 Rafael J. Wysocki
2015-01-08 15:51 ` Alan Stern
2015-01-12 10:02   ` Rafael J. Wysocki
2015-01-12 16:39     ` Alan Stern
2015-01-15  9:45       ` Rafael J. Wysocki [this message]
2015-01-18  0:57 ` [RFC][PATCH][v2] " Rafael J. Wysocki
2015-01-21  1:17   ` [PATCH][v3] " Rafael J. Wysocki
2015-01-23 20:55     ` Bjorn Helgaas
2015-01-24  0:40       ` Rafael J. Wysocki

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=2648963.rfs1ehcxce@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=aaron.lu@intel.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    --subject='Re: [RFC][PATCH] PCI / PM: Avoid resuming PCI devices during system suspend' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).