14 Jan, 2011

3 commits

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (59 commits)
    ACPI / PM: Fix build problems for !CONFIG_ACPI related to NVS rework
    ACPI: fix resource check message
    ACPI / Battery: Update information on info notification and resume
    ACPI: Drop device flag wake_capable
    ACPI: Always check if _PRW is present before trying to evaluate it
    ACPI / PM: Check status of power resources under mutexes
    ACPI / PM: Rename acpi_power_off_device()
    ACPI / PM: Drop acpi_power_nocheck
    ACPI / PM: Drop acpi_bus_get_power()
    Platform / x86: Make fujitsu_laptop use acpi_bus_update_power()
    ACPI / Fan: Rework the handling of power resources
    ACPI / PM: Register power resource devices as soon as they are needed
    ACPI / PM: Register acpi_power_driver early
    ACPI / PM: Add function for updating device power state consistently
    ACPI / PM: Add function for device power state initialization
    ACPI / PM: Introduce __acpi_bus_get_power()
    ACPI / PM: Introduce function for refcounting device power resources
    ACPI / PM: Add functions for manipulating lists of power resources
    ACPI / PM: Prevent acpi_power_get_inferred_state() from making changes
    ACPICA: Update version to 20101209
    ...

    Linus Torvalds
     
  • * 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block: (43 commits)
    block: ensure that completion error gets properly traced
    blktrace: add missing probe argument to block_bio_complete
    block cfq: don't use atomic_t for cfq_group
    block cfq: don't use atomic_t for cfq_queue
    block: trace event block fix unassigned field
    block: add internal hd part table references
    block: fix accounting bug on cross partition merges
    kref: add kref_test_and_get
    bio-integrity: mark kintegrityd_wq highpri and CPU intensive
    block: make kblockd_workqueue smarter
    Revert "sd: implement sd_check_events()"
    block: Clean up exit_io_context() source code.
    Fix compile warnings due to missing removal of a 'ret' variable
    fs/block: type signature of major_to_index(int) to major_to_index(unsigned)
    block: convert !IS_ERR(p) && p to !IS_ERR_NOR_NULL(p)
    cfq-iosched: don't check cfqg in choose_service_tree()
    fs/splice: Pull buf->ops->confirm() from splice_from_pipe actors
    cdrom: export cdrom_check_events()
    sd: implement sd_check_events()
    sr: implement sr_check_events()
    ...

    Linus Torvalds
     
  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    Documentation/trace/events.txt: Remove obsolete sched_signal_send.
    writeback: fix global_dirty_limits comment runtime -> real-time
    ppc: fix comment typo singal -> signal
    drivers: fix comment typo diable -> disable.
    m68k: fix comment typo diable -> disable.
    wireless: comment typo fix diable -> disable.
    media: comment typo fix diable -> disable.
    remove doc for obsolete dynamic-printk kernel-parameter
    remove extraneous 'is' from Documentation/iostats.txt
    Fix spelling milisec -> ms in snd_ps3 module parameter description
    Fix spelling mistakes in comments
    Revert conflicting V4L changes
    i7core_edac: fix typos in comments
    mm/rmap.c: fix comment
    sound, ca0106: Fix assignment to 'channel'.
    hrtimer: fix a typo in comment
    init/Kconfig: fix typo
    anon_inodes: fix wrong function name in comment
    fix comment typos concerning "consistent"
    poll: fix a typo in comment
    ...

    Fix up trivial conflicts in:
    - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
    - fs/ext4/ext4.h

    Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.

    Linus Torvalds
     

11 Jan, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
    spi / PM: Support dev_pm_ops
    PM: Prototype the pm_generic_ operations
    PM / Runtime: Generic resume shouldn't set RPM_ACTIVE unconditionally
    PM: Use dev_name() in core device suspend and resume routines
    PM: Permit registration of parentless devices during system suspend
    PM: Replace the device power.status field with a bit field
    PM: Remove redundant checks from core device resume routines
    PM: Use a different list of devices for each stage of device suspend
    PM: Avoid compiler warning in pm_noirq_op()
    PM: Use pm_wakeup_pending() in __device_suspend()
    PM / Wakeup: Replace pm_check_wakeup_events() with pm_wakeup_pending()
    PM: Prevent dpm_prepare() from returning errors unnecessarily
    PM: Fix references to basic-pm-debugging.txt in drivers-testing.txt
    PM / Runtime: Add synchronous runtime interface for interrupt handlers (v3)
    PM / Hibernate: When failed, in_suspend should be reset
    PM / Hibernate: hibernation_ops->leave should be checked too
    Freezer: Fix a race during freezing of TASK_STOPPED tasks
    PM: Use proper ccflag flag in kernel/power/Makefile
    PM / Runtime: Fix comments to match runtime callback code

    Linus Torvalds
     

07 Jan, 2011

2 commits


06 Jan, 2011

1 commit

  • Uses the machine_suspend trace point, called from the
    generic kernel suspend_devices_and_enter function.

    Signed-off-by: Jean Pihet
    Acked-by: Rafael J. Wysocki
    Cc: Arjan van de Ven
    CC: Thomas Renninger
    Cc: Len Brown
    Cc: Pavel Machek
    Cc: Steven Rostedt
    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: linux-pm@lists.linux-foundation.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Jean Pihet
     

24 Dec, 2010

5 commits

  • To avoid confusion with the meaning and return value of
    pm_check_wakeup_events() replace it with pm_wakeup_pending() that
    will work the other way around (ie. return true when system-wide
    power transition should be aborted).

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • When hibernation failed due to an error in swsusp_write() called by
    hibernate(), it skips calling "power_down()" and returns. When
    hibernate() is called again (probably after fixing up so that
    swsusp_write() wouldn't fail again), before "in_suspend = 1" of
    create_image is called, in_suspend should be 0. However, because
    hibernate() did not reset "in_suspend" after a failure, it's already 1.

    This patch fixes such inconsistency of "in_suspend" value.

    Signed-off-by: MyungJoo Ham
    Signed-off-by: Kyungmin Park
    Signed-off-by: Rafael J. Wysocki

    MyungJoo Ham
     
  • Because hibernate calls hibernation_ops->leave() without checking
    whether hibernation_ops->leave is NULL or not, hiberantion_set_ops
    should WARN_ON if hibernation_ops->leave is NULL.

    This patch added one more condition to check hibernation_ops->leave.

    Signed-off-by: MyungJoo Ham
    Signed-off-by: Kyungmin Park
    Acked-by: Pavel Machek
    Signed-off-by: Rafael J. Wysocki

    MyungJoo Ham
     
  • After calling freeze_task(), try_to_freeze_tasks() see whether the
    task is stopped or traced and if so, considers it to be frozen;
    however, nothing guarantees that either the task being frozen sees
    TIF_FREEZE or the freezer sees TASK_STOPPED -> TASK_RUNNING
    transition. The task being frozen may wake up and not see TIF_FREEZE
    while the freezer fails to notice the transition and believes the task
    is still stopped.

    This patch fixes the race by making freeze_task() always go through
    fake_signal_wake_up() for applicable tasks. The function goes through
    the target task's scheduler lock and thus guarantees that either the
    target sees TIF_FREEZE or try_to_freeze_task() sees TASK_RUNNING.

    Signed-off-by: Tejun Heo
    Signed-off-by: Rafael J. Wysocki

    Tejun Heo
     
  • Use the ccflags-$ flag instead of EXTRA_CFLAGS because EXTRA_CFLAGS is
    deprecated and should now be switched. According to
    (documentation/kbuild/makefiles.txt).

    Signed-off-by: Tracey Dent
    Signed-off-by: Rafael J. Wysocki

    Tracey Dent
     

23 Dec, 2010

1 commit


17 Dec, 2010

2 commits

  • Commit 3624eb0 (PM / Hibernate: Modify signature used to mark swap)
    attempted to modify hibernate signature used to mark swap partitions
    containing hibernation images, so that old kernels don't try to
    handle compressed images. However, this change broke resume from
    hibernation on Fedora 14 that apparently doesn't pass the resume=
    argument to the kernel and tries to trigger resume from early user
    space. This doesn't work, because the signature is now different,
    so the old signature has to be restored to avoid the problem.

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=22732 .

    Reported-by: Dr. David Alan Gilbert
    Reported-by: Zhang Rui
    Reported-by: Pascal Chapperon
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • The user-space hibernation sends a wrong notification after the image
    restoration because of thinko for the file flag check. RDONLY
    corresponds to hibernation and WRONLY to restoration, confusingly.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Rafael J. Wysocki
    Cc: stable@kernel.org

    Takashi Iwai
     

07 Dec, 2010

2 commits

  • There is a problem that swap pages allocated before the creation of
    a hibernation image can be released and used for storing the contents
    of different memory pages while the image is being saved. Since the
    kernel stored in the image doesn't know of that, it causes memory
    corruption to occur after resume from hibernation, especially on
    systems with relatively small RAM that need to swap often.

    This issue can be addressed by keeping the GFP_IOFS bits clear
    in gfp_allowed_mask during the entire hibernation, including the
    saving of the image, until the system is finally turned off or
    the hibernation is aborted. Unfortunately, for this purpose
    it's necessary to rework the way in which the hibernate and
    suspend code manipulates gfp_allowed_mask.

    This change is based on an earlier patch from Hugh Dickins.

    Signed-off-by: Rafael J. Wysocki
    Reported-by: Ondrej Zary
    Acked-by: Hugh Dickins
    Reviewed-by: KAMEZAWA Hiroyuki
    Cc: stable@kernel.org

    Rafael J. Wysocki
     
  • This is a fix for reading LZO compressed image using async I/O.
    Essentially, instead of having just one page into which we keep
    reading blocks from swap, we allocate enough of them to cover the
    largest compressed size and then let block I/O pick them all up. Once
    we have them all (and here we wait), we decompress them, as usual.
    Obviously, the very first block we still pick up synchronously,
    because we need to know the size of the lot before we pick up the
    rest.

    Also fixed the copyright line, which I've forgotten before.

    Signed-off-by: Bojan Smojver
    Signed-off-by: Rafael J. Wysocki

    Bojan Smojver
     

16 Nov, 2010

2 commits

  • While at it, fix two checkpatch errors.
    Several non-const struct instances constified by this patch were added after
    the introduction of platform_suspend_ops in checkpatch.pl's list of "should
    be const" structs (79404849e90a41ea2109bd0e2f7c7164b0c4ce73).

    Patch against mainline.
    Inspired by hunks of the grsecurity patch, updated for newer kernels.

    Signed-off-by: Lionel Debroux
    Acked-by: Ingo Molnar
    Signed-off-by: Jiri Kosina

    Lionel Debroux
     
  • Patch against mainline.

    Changes since v1: added one hunk; no longer adding "const" qualifier to
    pointers in platform_hibernation_ops after seeing
    b4144e4f6e3b448d322095ca08af393682a69e33.

    Signed-off-by: Jiri Kosina

    Lionel Debroux
     

13 Nov, 2010

2 commits

  • After recent blkdev_get() modifications, open_by_devnum() and
    open_bdev_exclusive() are simple wrappers around blkdev_get().
    Replace them with blkdev_get_by_dev() and blkdev_get_by_path().

    blkdev_get_by_dev() is identical to open_by_devnum().
    blkdev_get_by_path() is slightly different in that it doesn't
    automatically add %FMODE_EXCL to @mode.

    All users are converted. Most conversions are mechanical and don't
    introduce any behavior difference. There are several exceptions.

    * btrfs now sets FMODE_EXCL in btrfs_device->mode, so there's no
    reason to OR it explicitly on blkdev_put().

    * gfs2, nilfs2 and the generic mount_bdev() now set FMODE_EXCL in
    sb->s_mode.

    * With the above changes, sb->s_mode now always should contain
    FMODE_EXCL. WARN_ON_ONCE() added to kill_block_super() to detect
    errors.

    The new blkdev_get_*() functions are with proper docbook comments.
    While at it, add function description to blkdev_get() too.

    Signed-off-by: Tejun Heo
    Cc: Philipp Reisner
    Cc: Neil Brown
    Cc: Mike Snitzer
    Cc: Joern Engel
    Cc: Chris Mason
    Cc: Jan Kara
    Cc: "Theodore Ts'o"
    Cc: KONISHI Ryusuke
    Cc: reiserfs-devel@vger.kernel.org
    Cc: xfs-masters@oss.sgi.com
    Cc: Alexander Viro

    Tejun Heo
     
  • Over time, block layer has accumulated a set of APIs dealing with bdev
    open, close, claim and release.

    * blkdev_get/put() are the primary open and close functions.

    * bd_claim/release() deal with exclusive open.

    * open/close_bdev_exclusive() are combination of open and claim and
    the other way around, respectively.

    * bd_link/unlink_disk_holder() to create and remove holder/slave
    symlinks.

    * open_by_devnum() wraps bdget() + blkdev_get().

    The interface is a bit confusing and the decoupling of open and claim
    makes it impossible to properly guarantee exclusive access as
    in-kernel open + claim sequence can disturb the existing exclusive
    open even before the block layer knows the current open if for another
    exclusive access. Reorganize the interface such that,

    * blkdev_get() is extended to include exclusive access management.
    @holder argument is added and, if is @FMODE_EXCL specified, it will
    gain exclusive access atomically w.r.t. other exclusive accesses.

    * blkdev_put() is similarly extended. It now takes @mode argument and
    if @FMODE_EXCL is set, it releases an exclusive access. Also, when
    the last exclusive claim is released, the holder/slave symlinks are
    removed automatically.

    * bd_claim/release() and close_bdev_exclusive() are no longer
    necessary and either made static or removed.

    * bd_link_disk_holder() remains the same but bd_unlink_disk_holder()
    is no longer necessary and removed.

    * open_bdev_exclusive() becomes a simple wrapper around lookup_bdev()
    and blkdev_get(). It also has an unexpected extra bdev_read_only()
    test which probably should be moved into blkdev_get().

    * open_by_devnum() is modified to take @holder argument and pass it to
    blkdev_get().

    Most of bdev open/close operations are unified into blkdev_get/put()
    and most exclusive accesses are tested atomically at the open time (as
    it should). This cleans up code and removes some, both valid and
    invalid, but unnecessary all the same, corner cases.

    open_bdev_exclusive() and open_by_devnum() can use further cleanup -
    rename to blkdev_get_by_path() and blkdev_get_by_devt() and drop
    special features. Well, let's leave them for another day.

    Most conversions are straight-forward. drbd conversion is a bit more
    involved as there was some reordering, but the logic should stay the
    same.

    Signed-off-by: Tejun Heo
    Acked-by: Neil Brown
    Acked-by: Ryusuke Konishi
    Acked-by: Mike Snitzer
    Acked-by: Philipp Reisner
    Cc: Peter Osterlund
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Jan Kara
    Cc: Andrew Morton
    Cc: Andreas Dilger
    Cc: "Theodore Ts'o"
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Alex Elder
    Cc: Christoph Hellwig
    Cc: dm-devel@redhat.com
    Cc: drbd-dev@lists.linbit.com
    Cc: Leo Chen
    Cc: Scott Branden
    Cc: Chris Mason
    Cc: Steven Whitehouse
    Cc: Dave Kleikamp
    Cc: Joern Engel
    Cc: reiserfs-devel@vger.kernel.org
    Cc: Alexander Viro

    Tejun Heo
     

11 Nov, 2010

1 commit


02 Nov, 2010

1 commit

  • "gadget", "through", "command", "maintain", "maintain", "controller", "address",
    "between", "initiali[zs]e", "instead", "function", "select", "already",
    "equal", "access", "management", "hierarchy", "registration", "interest",
    "relative", "memory", "offset", "already",

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Jiri Kosina

    Uwe Kleine-König
     

27 Oct, 2010

2 commits


17 Oct, 2010

11 commits

  • SoCs have a standard set of tuples consisting of frequency and
    voltage pairs that the device will support per voltage domain. These
    are called Operating Performance Points or OPPs. The actual
    definitions of OPP varies over silicon versions. For a specific domain,
    we can have a set of {frequency, voltage} pairs. As the kernel boots
    and more information is available, a default set of these are activated
    based on the precise nature of device. Further on operation, based on
    conditions prevailing in the system (such as temperature), some OPP
    availability may be temporarily controlled by the SoC frameworks.

    To implement an OPP, some sort of power management support is necessary
    hence this library depends on CONFIG_PM.

    Contributions include:
    Sanjeev Premi for the initial concept:
    http://patchwork.kernel.org/patch/50998/
    Kevin Hilman for converting original design to device-based.
    Kevin Hilman and Paul Walmsey for cleaning up many of the function
    abstractions, improvements and data structure handling.
    Romit Dasgupta for using enums instead of opp pointers.
    Thara Gopinath, Eduardo Valentin and Vishwanath BS for fixes and
    cleanups.
    Linus Walleij for recommending this layer be made generic for usage
    in other architectures beyond OMAP and ARM.
    Mark Brown, Andrew Morton, Rafael J. Wysocki, Paul E. McKenney for
    valuable improvements.

    Discussions and comments from:
    http://marc.info/?l=linux-omap&m=126033945313269&w=2
    http://marc.info/?l=linux-omap&m=125482970102327&w=2
    http://marc.info/?t=125809247500002&r=1&w=2
    http://marc.info/?l=linux-omap&m=126025973426007&w=2
    http://marc.info/?t=128152609200064&r=1&w=2
    http://marc.info/?t=128468723000002&r=1&w=2
    incorporated.

    v1: http://marc.info/?t=128468723000002&r=1&w=2

    Signed-off-by: Nishanth Menon
    Signed-off-by: Kevin Hilman
    Signed-off-by: Rafael J. Wysocki

    Nishanth Menon
     
  • If the device which fails to resume is part of a loadable kernel module
    it won't be checked at startup against the magic number stored in the
    RTC.

    Add a read-only sysfs attribute /sys/power/pm_trace_dev_match which
    contains a list of newline separated devices (usually just the one)
    which currently match the last magic number. This allows the device
    which is failing to resume to be found after the modules are loaded
    again.

    Signed-off-by: James Hogan
    Signed-off-by: Rafael J. Wysocki

    James Hogan
     
  • Since we are adding compression to the kernel's hibernate code,
    change signature used by it to mark swap spaces, so that earlier
    kernels don't attempt to restore compressed images they cannot
    handle.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek

    Rafael J. Wysocki
     
  • If there is a wakeup event during the freezing of tasks, suspend or
    hibernation will fail anyway. Since try_to_freeze_tasks() can take
    up to 20 seconds to complete or fail, aborting it as soon as a wakeup
    event is detected improves the worst case wakeup latency.

    Based on a patch from Arve Hjønnevåg.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek

    Rafael J. Wysocki
     
  • The hibernate resume code checks if there is an image to resume from
    on every boot and, if the kernel is built with CONFIG_PM_DEBUG set
    and the image is not present, it prints some scary messages
    suggesting there was a boot error of some sort. Apparently, some
    users are confused by them, so make them look less scary and adjust
    the other hibernate resume debug messages to match them.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • Introduce struct wakeup_source for representing system wakeup sources
    within the kernel and for collecting statistics related to them.
    Make the recently introduced helper functions pm_wakeup_event(),
    pm_stay_awake() and pm_relax() use struct wakeup_source objects
    internally, so that wakeup statistics associated with wakeup devices
    can be collected and reported in a consistent way (the definition of
    pm_relax() is changed, which is harmless, because this function is
    not called directly by anyone yet). Introduce new wakeup-related
    sysfs device attributes in /sys/devices/.../power for reporting the
    device wakeup statistics.

    Change the global wakeup events counters event_count and
    events_in_progress into atomic variables, so that it is not necessary
    to acquire a global spinlock in pm_wakeup_event(), pm_stay_awake()
    and pm_relax(), which should allow us to avoid lock contention in
    these functions on SMP systems with many wakeup devices.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     
  • The default hibernation image size is currently hard coded and euqal
    to 500 MB, which is not a reasonable default on many contemporary
    systems. Make it equal 2/5 of the total RAM size (this is slightly
    below the maximum, i.e. 1/2 of the total RAM size, and seems to be
    generally suitable).

    Signed-off-by: Rafael J. Wysocki
    Tested-by: M. Vefa Bicakci

    Rafael J. Wysocki
     
  • One comment in hibernate_preallocate_memory() is wrong, so fix it and
    add one more comment to clarify the meaning of the fixed one.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • Although we need the PM workqueue to be freezable, we don't need it
    to be singlethread. Also, the number of concurrent work items
    running on a single CPU need not be constrained. For these reasons
    use alloc_workqueue() directly, with suitable arguments, instead of
    create_freezeable_workqueue(), to create the runtime PM workqueue.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Tejun Heo

    Rafael J. Wysocki
     
  • Fix the following build warning:

    warning: (PM_SLEEP_SMP && SMP && (ARCH_SUSPEND_POSSIBLE || \
    ARCH_HIBERNATION_POSSIBLE) && PM_SLEEP) selects HOTPLUG_CPU which \
    has unmet direct dependencies (SMP && HOTPLUG)

    by selecting HOTPLUG along with CPU_HOTPLUG.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Randy Dunlap

    Rafael J. Wysocki
     
  • Compress hibernation image with LZO in order to save on I/O and
    therefore time to hibernate/thaw.

    [rjw: Added hibernate=nocompress command line option instead of just
    nocompress which would be confusing, fixed a couple of compiler
    warnings, fixed kerneldoc comments, minor cleanups.]

    Signed-off-by: Bojan Smojver
    Signed-off-by: Rafael J. Wysocki

    Bojan Smojver
     

12 Sep, 2010

2 commits

  • * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
    PM / Hibernate: Avoid hitting OOM during preallocation of memory
    PM QoS: Correct pr_debug() misuse and improve parameter checks
    PM: Prevent waiting forever on asynchronous resume after failing suspend

    Linus Torvalds
     
  • There is a problem in hibernate_preallocate_memory() that it calls
    preallocate_image_memory() with an argument that may be greater than
    the total number of available non-highmem memory pages. If that's
    the case, the OOM condition is guaranteed to trigger, which in turn
    can cause significant slowdown to occur during hibernation.

    To avoid that, make preallocate_image_memory() adjust its argument
    before calling preallocate_image_pages(), so that the total number of
    saveable non-highem pages left is not less than the minimum size of
    a hibernation image. Change hibernate_preallocate_memory() to try to
    allocate from highmem if the number of pages allocated by
    preallocate_image_memory() is too low.

    Modify free_unnecessary_pages() to take all possible memory
    allocation patterns into account.

    Reported-by: KOSAKI Motohiro
    Signed-off-by: Rafael J. Wysocki
    Tested-by: M. Vefa Bicakci

    Rafael J. Wysocki
     

10 Sep, 2010

1 commit

  • Please revert 2.6.36-rc commit d2997b1042ec150616c1963b5e5e919ffd0b0ebf
    "hibernation: freeze swap at hibernation". It complicated matters by
    adding a second swap allocation path, just for hibernation; without in any
    way fixing the issue that it was intended to address - page reclaim after
    fixing the hibernation image might free swap from a page already imaged as
    swapcache, letting its swap be reallocated to store a different page of
    the image: resulting in data corruption if the imaged page were freed as
    clean then swapped back in. Pages freed to si->swap_map were still in
    danger of being reallocated by the alternative allocation path.

    I guess it inadvertently fixed slow SSD swap allocation for hibernation,
    as reported by Nigel Cunningham: by missing out the discards that occur on
    the usual swap allocation path; but that was unintentional, and needs a
    separate fix.

    Signed-off-by: Hugh Dickins
    Cc: KAMEZAWA Hiroyuki
    Cc: KOSAKI Motohiro
    Cc: "Rafael J. Wysocki"
    Cc: Ondrej Zary
    Cc: Andrea Gelmini
    Cc: Balbir Singh
    Cc: Andrea Arcangeli
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

20 Aug, 2010

1 commit