08 Dec, 2006

40 commits

  • Add the support for a large number of logical volumes. We will soon have
    hardware that support up to 1024 logical volumes.

    Signed-off-by: Mike Miller
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller
     
  • Remove the no longer used revalidate_allvol function. It was replaced by
    rebuild_lun_table.

    Signed-off-by: Mike Miller
    Acked-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller
     
  • Change our open to test for drv->heads like we do in other places in the
    driver. Mostly for consistency.

    Signed-off-by: Mike Miller
    Acked-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller
     
  • Change the blk_queue_max_sectors from 512 to 2048. This helps increase
    performance.

    [akpm@osdl.org: s/sector_size/max_sectors/]
    Signed-off-by: Mike Miller
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller
     
  • Unconditionally disable DMA prefetch on the P600 controller. An ASIC bug may
    result in prefetching beyond the end of physical memory.

    Signed-off-by: Mike Miller
    Acked-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller
     
  • Change the SSID on the E500 as a workaround for a firmware bug. It looks like
    the original patch was backed out between rc2 and rc4.

    Signed-off-by: Mike Miller
    Acked-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller
     
  • Remove #define NR_CMDS and replace it w/hba[i]->nr_cmds. Most Smart Array
    controllers can support up to 1024 commands but the E200 family can only
    support 128. To prevent annoying "fifo full" messages we define nr_cmds on a
    per controller basis by adding it the product table.

    Signed-off-by: Mike Miller
    Acked-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller
     
  • Add the support to fire up on any HP RAID class device that has a valid cciss
    signature.

    Signed-off-by: Mike Miller
    Acked-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller
     
  • Change the cciss version number to 3.6.14 to reflect the following
    functionality changes added by the rest of the set. They include:

    - Support to fire up on any HP RAID class controller
    - Increase nr_cmds to 512 for most controllers by adding it to the product table
    - PCI subsystem ID fix fix was pulled
    - Disable DMA prefetch for the P600 on IPF platforms
    - Change from 512 to 2048 sector_size for performance
    - Fix in cciss_open for consistency
    - Remove the no longer used revalidate_allvol function
    - Bug fix for busy configuring
    - Support for more than 16 logical volumes
    - Cleanups in cciss_interrupt_mode
    - Fix for iostats, it's been broken for several kernel releases

    Signed-off-by: Mike Miller
    Acked-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller
     
  • More fallout of the post 2.6.19-rc1 IRQ changes...

    CC init/main.o
    In file included from
    /home/bunk/linux/kernel-2.6/linux-2.6.19-rc6-mm2/include/linux/rtc.h:102,
    from
    /home/bunk/linux/kernel-2.6/linux-2.6.19-rc6-mm2/include/linux/efi.h:19,
    from
    /home/bunk/linux/kernel-2.6/linux-2.6.19-rc6-mm2/init/main.c:43:
    /home/bunk/linux/kernel-2.6/linux-2.6.19-rc6-mm2/include/linux/interrupt.h:67:
    error: conflicting types for 'irq_handler_t'
    include2/asm/irq.h:49: error: previous declaration of 'irq_handler_t' was here

    Signed-off-by: Adrian Bunk
    Cc: Miles Bader
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • When the UML network driver generates random MACs for its devices, it was
    possible for a number of UMLs to get the same MACs because the ethernet
    initialization was done before the random pool was properly seeded.

    This patch moves the initialization later so that it gets better randomness.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • We were using the wrong symbol to size register files.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Include the proper header to get a definition of PAGE_SHIFT.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • We were not including stddef.h in files that used offsetof.

    One file was also including linux/stddef.h for no perciptible reason.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Replace kmalloc+memset with kzalloc

    Signed-off-by: Yan Burman
    Cc: Roman Zippel
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yan Burman
     
  • Make the workqueues used by XFS freezeable, so their worker threads don't
    submit any I/O after the suspend image has been created.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Nigel Cunningham
    Cc: David Chinner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Make it possible to create a workqueue the worker thread of which will be
    frozen during suspend, along with other kernel threads.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Nigel Cunningham
    Cc: David Chinner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Cleanup write-only variable, suggested by D Binderman.

    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • The 'testproc' swsusp debug mode thaws tasks twice in a row, which is _very_
    confusing. Fix that.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Linus posted quite nice TRACE_RESUME how-to, and I think it is too nice to
    be hidden in archives of mailing list, so I turned it into Documentation
    piece.

    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • Move all labels in the swsusp code to the second column, so that they won't
    fool diff -p.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Fix coding style in suspend.c.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Move the loop from freeze_processes() to a separate function and call it
    independently for user space processes and kernel threads so that the order
    of freezing tasks is clearly visible.

    Signed-off-by: Rafael J. Wysocki
    Cc: Pavel Machek
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Move the loop from thaw_processes() to a separate function and call it
    independently for kernel threads and user space processes so that the order
    of thawing tasks is clearly visible.

    Drop thaw_kernel_threads() which is never used.

    Signed-off-by: Rafael J. Wysocki
    Cc: Pavel Machek
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • The power management semaphore is only used as mutex, so convert it.

    [akpm@osdl.org: fix rotten bug]
    Signed-off-by: Stephen Hemminger
    Acked-by: Ingo Molnar
    Acked-by: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Hemminger
     
  • Fix http://bugzilla.kernel.org/show_bug.cgi?id=7534

    Fix the freezing of processes so that it won't fail if there is a traced
    process the parent of which has been stopped.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: maurice barnum
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Make swsusp measure and print the time needed to shrink memory during the
    suspend.

    Signed-off-by: Rafael J. Wysocki
    Cc: Pavel Machek
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Don't modify the cpus_allowed of the task initiating the suspend.
    _cpu_down() already makes sure that the task doing the suspend doesn't run
    on dying cpu.

    Signed-off-by: Suresh Siddha
    Cc: Venkatesh Pallipadi
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Siddha, Suresh B
     
  • Make swsusp support i386 systems with PAE or without PSE.

    This is done by creating temporary page tables located in resume-safe page
    frames before the suspend image is restored in the same way as x86_64 does
    it.

    Signed-off-by: Rafael J. Wysocki
    Cc: Andi Kleen
    Cc: Dave Jones
    Cc: Nigel Cunningham
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Modify process thawing so that we can thaw kernel space without thawing
    userspace, and thaw kernelspace first. This will be useful in later
    patches, where I intend to get swsusp thawing kernel threads only before
    seeking to free memory.

    Signed-off-by: Nigel Cunningham
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     
  • Minor whitespace and formatting modifications for the freezer.

    Signed-off-by: Nigel Cunningham
    Acked-by: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     
  • The freezer currently prints an '=' for every process that is frozen. This
    is pretty pointless, as the equals sign says nothing about which process is
    frozen, and makes logs look messier (especially if there were a large
    number of processes running). All we really need to know is that we
    started trying to freeze processes and what processes (if any) failed to
    freeze, or that we succeeded.

    Signed-off-by: Nigel Cunningham
    Acked-by: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     
  • Move process freezing functions from include/linux/sched.h to freezer.h, so
    that modifications to the freezer or the kernel configuration don't require
    recompiling just about everything.

    [akpm@osdl.org: fix ueagle driver]
    Signed-off-by: Nigel Cunningham
    Cc: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     
  • At some point after 2.6.13, in-kernel software suspend got "incomplete" for
    the so-called "platform" mode. pm_ops->prepare() is never called. A
    visible sign of this is the "moon" light on thinkpads not flashing during
    suspend. Fix by readding the pm_ops->prepare call during suspend.

    Signed-off-by: Stefan Seyfried
    Acked-by: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefan Seyfried
     
  • swsusp uses GFP_ATOMIC, but it can afford to use __GFP_WAIT, which will
    permit it to reclaim clean pagecache instead of emitting scary
    page-allocation-failure messages.

    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Currently swsusp saves the contents of highmem pages by copying them to the
    normal zone which is quite inefficient (eg. it requires two normal pages
    to be used for saving one highmem page). This may be improved by using
    highmem for saving the contents of saveable highmem pages.

    Namely, during the suspend phase of the suspend-resume cycle we try to
    allocate as many free highmem pages as there are saveable highmem pages.
    If there are not enough highmem image pages to store the contents of all of
    the saveable highmem pages, some of them will be stored in the "normal"
    memory. Next, we allocate as many free "normal" pages as needed to store
    the (remaining) image data. We use a memory bitmap to mark the allocated
    free pages (ie. highmem as well as "normal" image pages).

    Now, we use another memory bitmap to mark all of the saveable pages
    (highmem as well as "normal") and the contents of the saveable pages are
    copied into the image pages. Then, the second bitmap is used to save the
    pfns corresponding to the saveable pages and the first one is used to save
    their data.

    During the resume phase the pfns of the pages that were saveable during the
    suspend are loaded from the image and used to mark the "unsafe" page
    frames. Next, we try to allocate as many free highmem page frames as to
    load all of the image data that had been in the highmem before the suspend
    and we allocate so many free "normal" page frames that the total number of
    allocated free pages (highmem and "normal") is equal to the size of the
    image. While doing this we have to make sure that there will be some extra
    free "normal" and "safe" page frames for two lists of PBEs constructed
    later.

    Now, the image data are loaded, if possible, into their "original" page
    frames. The image data that cannot be written into their "original" page
    frames are loaded into "safe" page frames and their "original" kernel
    virtual addresses, as well as the addresses of the "safe" pages containing
    their copies, are stored in one of two lists of PBEs.

    One list of PBEs is for the copies of "normal" suspend pages (ie. "normal"
    pages that were saveable during the suspend) and it is used in the same way
    as previously (ie. by the architecture-dependent parts of swsusp). The
    other list of PBEs is for the copies of highmem suspend pages. The pages
    in this list are restored (in a reversible way) right before the
    arch-dependent code is called.

    Signed-off-by: Rafael J. Wysocki
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • The swsusp userland interface has recently changed for a couple of times, but
    the changes have not been documented. Fix this, and document the
    SNAPSHOT_SET_SWAP_AREA ioctl().

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • To be able to use swap files as suspend storage from the userland suspend
    tools we need an additional ioctl() that will allow us to provide the kernel
    with both the swap header's offset and the identification of the resume
    partition.

    The new ioctl() should be regarded as a replacement for the
    SNAPSHOT_SET_SWAP_FILE ioctl() that from now on will be considered as
    obsolete, but has to stay for backwards compatibility of the interface.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Document the "resume_offset=" command line parameter as well as the way in
    which swap files are supported by swsusp.

    Signed-off-by: Rafael J. Wysocki
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Add the kernel command line parameter "resume_offset=" allowing us to specify
    the offset, in units, from the beginning of the partition pointed
    to by the "resume=" parameter at which the swap header is located.

    This offset can be determined, for example, by an application using the FIBMAP
    ioctl to obtain the swap header's block number for given file.

    [akpm@osdl.org: we don't know what type sector_t is]
    Signed-off-by: Rafael J. Wysocki
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki