1. 23 Oct, 2014 13 commits
  2. 22 Oct, 2014 1 commit
  3. 21 Oct, 2014 6 commits
    • Michal Hocko's avatar
      PM: convert do_each_thread to for_each_process_thread · a28e785a
      Michal Hocko authored
      as per 0c740d0a (introduce for_each_thread() to replace the buggy
      while_each_thread()) get rid of do_each_thread { } while_each_thread()
      construct and replace it by a more error prone for_each_thread.
      
      This patch doesn't introduce any user visible change.
      Suggested-by: default avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarMichal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a28e785a
    • Michal Hocko's avatar
      OOM, PM: OOM killed task shouldn't escape PM suspend · 5695be14
      Michal Hocko authored
      PM freezer relies on having all tasks frozen by the time devices are
      getting frozen so that no task will touch them while they are getting
      frozen. But OOM killer is allowed to kill an already frozen task in
      order to handle OOM situtation. In order to protect from late wake ups
      OOM killer is disabled after all tasks are frozen. This, however, still
      keeps a window open when a killed task didn't manage to die by the time
      freeze_processes finishes.
      
      Reduce the race window by checking all tasks after OOM killer has been
      disabled. This is still not race free completely unfortunately because
      oom_killer_disable cannot stop an already ongoing OOM killer so a task
      might still wake up from the fridge and get killed without
      freeze_processes noticing. Full synchronization of OOM and freezer is,
      however, too heavy weight for this highly unlikely case.
      
      Introduce and check oom_kills counter which gets incremented early when
      the allocator enters __alloc_pages_may_oom path and only check all the
      tasks if the counter changes during the freezing attempt. The counter
      is updated so early to reduce the race window since allocator checked
      oom_killer_disabled which is set by PM-freezing code. A false positive
      will push the PM-freezer into a slow path but that is not a big deal.
      
      Changes since v1
      - push the re-check loop out of freeze_processes into
        check_frozen_processes and invert the condition to make the code more
        readable as per Rafael
      
      Fixes: f660daac (oom: thaw threads if oom killed thread is frozen before deferring)
      Cc: 3.2+ <stable@vger.kernel.org> # 3.2+
      Signed-off-by: default avatarMichal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5695be14
    • Cong Wang's avatar
      freezer: remove obsolete comments in __thaw_task() · c05eb32f
      Cong Wang authored
      __thaw_task() no longer clears frozen flag since commit a3201227
      (freezer: make freezing() test freeze conditions in effect instead of TIF_FREEZE).
      Reviewed-by: default avatarMichal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c05eb32f
    • Cong Wang's avatar
      freezer: Do not freeze tasks killed by OOM killer · 51fae6da
      Cong Wang authored
      Since f660daac (oom: thaw threads if oom killed thread is frozen
      before deferring) OOM killer relies on being able to thaw a frozen task
      to handle OOM situation but a3201227 (freezer: make freezing() test
      freeze conditions in effect instead of TIF_FREEZE) has reorganized the
      code and stopped clearing freeze flag in __thaw_task. This means that
      the target task only wakes up and goes into the fridge again because the
      freezing condition hasn't changed for it. This reintroduces the bug
      fixed by f660daac.
      
      Fix the issue by checking for TIF_MEMDIE thread flag in
      freezing_slow_path and exclude the task from freezing completely. If a
      task was already frozen it would get woken by __thaw_task from OOM killer
      and get out of freezer after rechecking freezing().
      
      Changes since v1
      - put TIF_MEMDIE check into freezing_slowpath rather than in __refrigerator
        as per Oleg
      - return __thaw_task into oom_scan_process_thread because
        oom_kill_process will not wake task in the fridge because it is
        sleeping uninterruptible
      
      [mhocko@suse.cz: rewrote the changelog]
      Fixes: a3201227 (freezer: make freezing() test freeze conditions in effect instead of TIF_FREEZE)
      Cc: 3.3+ <stable@vger.kernel.org> # 3.3+
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarMichal Hocko <mhocko@suse.cz>
      Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      51fae6da
    • Heikki Krogerus's avatar
      ACPI / platform: provide default DMA mask · 8a2f38dd
      Heikki Krogerus authored
      Most devices are configured for 32-bit DMA addresses.
      Setting the mask to 32-bit here removes the need for the
      drivers to do it separately.
      Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8a2f38dd
    • Rafael J. Wysocki's avatar
      Merge branch 'acpica' · 082c119d
      Rafael J. Wysocki authored
      * acpica:
        ACPICA: Update version to 20140926.
        ACPICA: acpiexec: Do not put STDIN into raw mode unless it is a terminal.
        ACPICA: iASL/Disassembler: Add support for hardware summary mapfiles.
        ACPICA: Events: Reduce source code difference for the ACPI_EVENT_FLAG_HANDLE renaming.
        ACPICA: Events: Reduce source code difference for the ACPI_EVENT_FLAG_HANDLE support.
        ACPICA: Events: Update GPE handler removal, match behavior of handler install.
        ACPICA: Events: Reduce source code difference in acpi_install_gpe_handler().
        ACPICA: Events: Reduce indent divergences of events files.
        ACPICA: acpidump: Add ACPI 1.0 RSDP support.
        ACPICA: Add string for _DDN method name.
      082c119d
  4. 20 Oct, 2014 20 commits