1. 17 6月, 2014 2 次提交
  2. 07 6月, 2014 1 次提交
    • T
      PM / sleep: trace events for suspend/resume · bb3632c6
      Todd E Brandt 提交于
      Adds trace events that give finer resolution into suspend/resume. These
      events are graphed in the timelines generated by the analyze_suspend.py
      script. They represent large areas of time consumed that are typical to
      suspend and resume.
      
      The event is triggered by calling the function "trace_suspend_resume"
      with three arguments: a string (the name of the event to be displayed
      in the timeline), an integer (case specific number, such as the power
      state or cpu number), and a boolean (where true is used to denote the start
      of the timeline event, and false to denote the end).
      
      The suspend_resume trace event reproduces the data that the machine_suspend
      trace event did, so the latter has been removed.
      Signed-off-by: NTodd Brandt <todd.e.brandt@intel.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      bb3632c6
  3. 17 5月, 2014 1 次提交
  4. 10 5月, 2014 1 次提交
  5. 01 5月, 2014 1 次提交
  6. 28 4月, 2014 1 次提交
  7. 01 3月, 2014 1 次提交
  8. 06 1月, 2014 1 次提交
    • B
      PM / hibernate: Call platform_leave() in suspend path too · 362e77d1
      Bjørn Mork 提交于
      Since create_image() only executes platform_leave() if in_suspend is
      not set, enable_nonboot_cpus() is run by it with EC transactions
      blocked (on ACPI systems) in the image creation code path (that is,
      for in_suspend set), which may cause CPU online to fail for the CPUs
      in question.  In particular, this causes the acpi_cpufreq driver's
      initialization to fail for those CPUs on some systems with the
      following dmesg:
      
       cpufreq: adding CPU 1
       acpi_cpufreq_cpu_init
       cpufreq: FREQ: 1401000 - CPU: 0
       ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for [EmbeddedControl] (20130725/evregion-287)
       ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPC_.EC__.LPMD] (Node ffff88023249ab28), AE_BAD_PARAMETER (20130725/psparse-536)
       ACPI Error: Method parse/execution failed [\_PR_.CPU0._PPC] (Node ffff88023270e3f8), AE_BAD_PARAMETER (20130725/psparse-536)
       ACPI Error: Method parse/execution failed [\_PR_.CPU1._PPC] (Node ffff88023270e290), AE_BAD_PARAMETER (20130725/psparse-536)
       ACPI Exception: AE_BAD_PARAMETER, Evaluating _PPC (20130725/processor_perflib-140)
       cpufreq: initialization failed
       CPU1 is up
      
      To fix this problem, modify create_image() to execute platform_leave()
      unconditionally.  [rjw: This shouldn't lead to any significant side
      effects on ACPI systems.]
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      [rjw: Changelog]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      362e77d1
  9. 30 11月, 2013 1 次提交
  10. 25 10月, 2013 1 次提交
  11. 31 8月, 2013 2 次提交
    • R
      PM / hibernate / memory hotplug: Rework mutual exclusion · 942f4015
      Rafael J. Wysocki 提交于
      Since all of the memory hotplug operations have to be carried out
      under device_hotplug_lock, they won't need to acquire pm_mutex if
      device_hotplug_lock is held around hibernation.
      
      For this reason, make the hibernation code acquire
      device_hotplug_lock after freezing user space processes and
      release it before thawing them.  At the same tim drop the
      lock_system_sleep() and unlock_system_sleep() calls from
      lock_memory_hotplug() and unlock_memory_hotplug(), respectively.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NToshi Kani <toshi.kani@hp.com>
      942f4015
    • R
      PM / hibernate: Create memory bitmaps after freezing user space · 8fd37a4c
      Rafael J. Wysocki 提交于
      The hibernation core uses special memory bitmaps during image
      creation and restoration and traditionally those bitmaps are
      allocated before freezing tasks, because in the past GFP_KERNEL
      allocations might not work after all tasks had been frozen.
      
      However, this is an anachronism, because hibernation_snapshot()
      now calls hibernate_preallocate_memory() which allocates memory
      for the image upfront anyway, so the memory bitmaps may be
      allocated after freezing user space safely.
      
      For this reason, move all of the create_basic_memory_bitmaps()
      calls after freeze_processes() and all of the corresponding
      free_basic_memory_bitmaps() calls before thaw_processes().
      
      This will allow us to hold device_hotplug_lock around hibernation
      without the need to worry about freezing issues with user space
      processes attempting to acquire it via sysfs attributes after the
      creation of memory bitmaps and before the freezing of tasks.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NToshi Kani <toshi.kani@hp.com>
      8fd37a4c
  12. 07 8月, 2013 1 次提交
  13. 19 7月, 2012 1 次提交
    • L
      Make wait_for_device_probe() also do scsi_complete_async_scans() · eea03c20
      Linus Torvalds 提交于
      Commit a7a20d10 ("sd: limit the scope of the async probe domain")
      make the SCSI device probing run device discovery in it's own async
      domain.
      
      However, as a result, the partition detection was no longer synchronized
      by async_synchronize_full() (which, despite the name, only synchronizes
      the global async space, not all of them).  Which in turn meant that
      "wait_for_device_probe()" would not wait for the SCSI partitions to be
      parsed.
      
      And "wait_for_device_probe()" was what the boot time init code relied on
      for mounting the root filesystem.
      
      Now, most people never noticed this, because not only is it
      timing-dependent, but modern distributions all use initrd.  So the root
      filesystem isn't actually on a disk at all.  And then before they
      actually mount the final disk filesystem, they will have loaded the
      scsi-wait-scan module, which not only does the expected
      wait_for_device_probe(), but also does scsi_complete_async_scans().
      
      [ Side note: scsi_complete_async_scans() had also been partially broken,
        but that was fixed in commit 43a8d39d ("fix async probe
        regression"), so that same commit a7a20d10 had actually broken
        setups even if you used scsi-wait-scan explicitly ]
      
      Solve this problem by just moving the scsi_complete_async_scans() call
      into wait_for_device_probe().  Everybody who wants to wait for device
      probing to finish really wants the SCSI probing to complete, so there's
      no reason not to do this.
      
      So now "wait_for_device_probe()" really does what the name implies, and
      properly waits for device probing to finish.  This also removes the now
      unnecessary extra calls to scsi_complete_async_scans().
      Reported-and-tested-by: NArtem S. Tashkinov <t.artem@mailcity.com>
      Cc: Dan Williams <dan.j.williams@gmail.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: James Bottomley <jbottomley@parallels.com>
      Cc: Borislav Petkov <bp@amd64.org>
      Cc: linux-scsi <linux-scsi@vger.kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      eea03c20
  14. 01 7月, 2012 2 次提交
  15. 19 5月, 2012 1 次提交
  16. 29 3月, 2012 2 次提交
  17. 05 3月, 2012 1 次提交
  18. 10 2月, 2012 2 次提交
  19. 30 1月, 2012 1 次提交
    • R
      PM / Sleep: Introduce "late suspend" and "early resume" of devices · cf579dfb
      Rafael J. Wysocki 提交于
      The current device suspend/resume phases during system-wide power
      transitions appear to be insufficient for some platforms that want
      to use the same callback routines for saving device states and
      related operations during runtime suspend/resume as well as during
      system suspend/resume.  In principle, they could point their
      .suspend_noirq() and .resume_noirq() to the same callback routines
      as their .runtime_suspend() and .runtime_resume(), respectively,
      but at least some of them require device interrupts to be enabled
      while the code in those routines is running.
      
      It also makes sense to have device suspend-resume callbacks that will
      be executed with runtime PM disabled and with device interrupts
      enabled in case someone needs to run some special code in that
      context during system-wide power transitions.
      
      Apart from this, .suspend_noirq() and .resume_noirq() were introduced
      as a workaround for drivers using shared interrupts and failing to
      prevent their interrupt handlers from accessing suspended hardware.
      It appears to be better not to use them for other porposes, or we may
      have to deal with some serious confusion (which seems to be happening
      already).
      
      For the above reasons, introduce new device suspend/resume phases,
      "late suspend" and "early resume" (and analogously for hibernation)
      whose callback will be executed with runtime PM disabled and with
      device interrupts enabled and whose callback pointers generally may
      point to runtime suspend/resume routines.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reviewed-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      cf579dfb
  20. 09 12月, 2011 1 次提交
  21. 07 12月, 2011 3 次提交
  22. 24 11月, 2011 2 次提交
  23. 22 11月, 2011 1 次提交
    • T
      freezer: clean up freeze_processes() failure path · 03afed8b
      Tejun Heo 提交于
      freeze_processes() failure path is rather messy.  Freezing is canceled
      for workqueues and tasks which aren't frozen yet but frozen tasks are
      left alone and should be thawed by the caller and of course some
      callers (xen and kexec) didn't do it.
      
      This patch updates __thaw_task() to handle cancelation correctly and
      makes freeze_processes() and freeze_kernel_threads() call
      thaw_processes() on failure instead so that the system is fully thawed
      on failure.  Unnecessary [suspend_]thaw_processes() calls are removed
      from kernel/power/hibernate.c, suspend.c and user.c.
      
      While at it, restructure error checking if clause in suspend_prepare()
      to be less weird.
      
      -v2: Srivatsa spotted missing removal of suspend_thaw_processes() in
           suspend_prepare() and error in commit message.  Updated.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      03afed8b
  24. 19 11月, 2011 1 次提交
    • S
      PM / Hibernate: Fix the early termination of test modes · aa9a7b11
      Srivatsa S. Bhat 提交于
      Commit 2aede851
      (PM / Hibernate: Freeze kernel threads after preallocating memory)
      postponed the freezing of kernel threads to after preallocating memory
      for hibernation. But while doing that, the hibernation test TEST_FREEZER
      and the test mode HIBERNATION_TESTPROC were not moved accordingly.
      
      As a result, when using these test modes, it only goes upto the freezing of
      userspace and exits, when in fact it should go till the complete end of task
      freezing stage, namely the freezing of kernel threads as well.
      
      So, move these points of exit to appropriate places so that freezing of
      kernel threads is also tested while using these test harnesses.
      Signed-off-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      aa9a7b11
  25. 01 11月, 2011 1 次提交
  26. 17 10月, 2011 6 次提交
  27. 25 5月, 2011 1 次提交