1. 27 9月, 2006 30 次提交
  2. 26 9月, 2006 10 次提交
    • R
      [PATCH] PM: Add pm_trace switch · c5c6ba4e
      Rafael J. Wysocki 提交于
      Add the pm_trace attribute in /sys/power which has to be explicitly set to
      one to really enable the "PM tracing" code compiled in when CONFIG_PM_TRACE
      is set (which modifies the machine's CMOS clock in unpredictable ways).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c5c6ba4e
    • R
      [PATCH] PM: make it possible to disable console suspending · c8eb8b40
      Rafael J. Wysocki 提交于
      Change suspend_console() so that it waits for all consoles to flush the
      remaining messages and make it possible to switch the console suspending off
      with the help of a Kconfig option.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Stefan Seyfried <seife@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c8eb8b40
    • R
      [PATCH] swsusp: Use memory bitmaps during resume · 940864dd
      Rafael J. Wysocki 提交于
      Make swsusp use memory bitmaps to store its internal information during the
      resume phase of the suspend-resume cycle.
      
      If the pfns of saveable pages are saved during the suspend phase instead of
      the kernel virtual addresses of these pages, we can use them during the resume
      phase directly to set the corresponding bits in a memory bitmap.  Then, this
      bitmap is used to mark the page frames corresponding to the pages that were
      saveable before the suspend (aka "unsafe" page frames).
      
      Next, we allocate as many page frames as needed to store the entire suspend
      image and make sure that there will be some extra free "safe" page frames for
      the list of PBEs constructed later.  Subsequently, the image is loaded and, if
      possible, the data loaded from it are written into their "original" page
      frames (ie.  the ones they had occupied before the suspend).
      
      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 a list of PBEs.  Finally, the list of PBEs is used to copy the
      remaining image data into their "original" page frames (this is done
      atomically, by the architecture-dependent parts of swsusp).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      940864dd
    • R
      [PATCH] swsusp: clean up suspend header · dcbb5a54
      Rafael J. Wysocki 提交于
      Remove some things that are no longer used or defined elsewhere from suspend.h
      and make the inline version of software_suspend() return the right error code.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      dcbb5a54
    • R
      [PATCH] Disable CPU hotplug during suspend · e3920fb4
      Rafael J. Wysocki 提交于
      The current suspend code has to be run on one CPU, so we use the CPU
      hotplug to take the non-boot CPUs offline on SMP machines.  However, we
      should also make sure that these CPUs will not be enabled by someone else
      after we have disabled them.
      
      The functions disable_nonboot_cpus() and enable_nonboot_cpus() are moved to
      kernel/cpu.c, because they now refer to some stuff in there that should
      better be static.  Also it's better if disable_nonboot_cpus() returns an
      error instead of panicking if something goes wrong, and
      enable_nonboot_cpus() has no reason to panic(), because the CPUs may have
      been enabled by the userland before it tries to take them online.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e3920fb4
    • A
      [PATCH] swsusp: read speedup · 546e0d27
      Andrew Morton 提交于
      Implement async reads for swsusp resuming.
      
      Crufty old PIII testbox:
      	15.7 MB/s -> 20.3 MB/s
      
      Sony Vaio:
      	14.6 MB/s -> 33.3 MB/s
      
      I didn't implement the post-resume bio_set_pages_dirty().  I don't really
      understand why resume needs to run set_page_dirty() against these pages.
      
      It might be a worry that this code modifies PG_Uptodate, PG_Error and
      PG_Locked against the image pages.  Can this possibly affect the resumed-into
      kernel?  Hopefully not, if we're atomically restoring its mem_map?
      
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Jens Axboe <axboe@suse.de>
      Cc: Laurent Riffard <laurent.riffard@free.fr>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      546e0d27
    • A
      [PATCH] swsusp: write speedup · ab954160
      Andrew Morton 提交于
      Switch the swsusp writeout code from 4k-at-a-time to 4MB-at-a-time.
      
      Crufty old PIII testbox:
      	12.9 MB/s -> 20.9 MB/s
      
      Sony Vaio:
      	14.7 MB/s -> 26.5 MB/s
      
      The implementation is crude.  A better one would use larger BIOs, but wouldn't
      gain any performance.
      
      The memcpys will be mostly pipelined with the IO and basically come for free.
      
      The ENOMEM path has not been tested.  It should be.
      
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ab954160
    • S
      [PATCH] add DIV_ROUND_UP() · 930631ed
      Steven Whitehouse 提交于
      Add the DIV_ROUND_UP() helper macro: divide `n' by `d', rounding up.
      
      Stolen from the gfs2 tree(!) because the swsusp patches need it.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      930631ed
    • A
      [PATCH] smp_call_function_single() cleanup · a3bc0dbc
      Andrew Morton 提交于
      If we're going to implement smp_call_function_single() on three architecture
      with the same prototype then it should have a declaration in a
      non-arch-specific header file.
      
      Move it into <linux/smp.h>.
      
      Cc: Stephane Eranian <eranian@hpl.hp.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a3bc0dbc
    • I
      [PATCH] Translate asm version of ELFNOTE macro into preprocessor macro · 5091e746
      Ian Campbell 提交于
      I've come across some problems with the assembly version of the ELFNOTE
      macro currently in -mm. (in
      x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch)
      
      The first is that older gas does not support :varargs in .macro
      definitions (in my testing 2.17 does while 2.15 does not, I don't know
      when it became supported). The Changes file says binutils >= 2.12 so I
      think we need to avoid using it. There are no other uses in mainline or
      -mm. Old gas appears to just ignore it so you get "too many arguments"
      type errors.
      
      Secondly it seems that passing strings as arguments to assembler macros
      is broken without varargs. It looks like they get unquoted or each
      character is treated as a separate argument or something and this causes
      all manner of grief. I think this is because of the use of -traditional
      when compiling assembly files.
      
      Therefore I have translated the assembler macro into a pre-processor
      macro.
      
      I added the desctype as a separate argument instead of including it with
      the descdata as the previous version did since -traditional means the
      ELFNOTE definition after the #else needs to have the same number of
      arguments (I think so anyway, the -traditional CPP semantics are pretty
      fscking strange!).
      
      With this patch I am able to define elfnotes in assembly like this with
      both old and new assemblers.
      
      	ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS,       .asciz, "linux")
      	ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION,  .asciz, "2.6")
      	ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION,    .asciz, "xen-3.0")
      	ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE,      .long,  __PAGE_OFFSET)
      
      Which seems reasonable enough.
      Signed-off-by: NIan Campbell <ian.campbell@xensource.com>
      Acked-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5091e746