1. 12 Jun, 2009 40 commits
    • Rafael J. Wysocki's avatar
      PM/Hibernate: Move memory shrinking to snapshot.c (rev. 2) · fe419535
      Rafael J. Wysocki authored
      A future patch is going to modify the memory shrinking code so that
      it will make memory allocations to free memory instead of using an
      artificial memory shrinking mechanism for that.  For this purpose it
      is convenient to move swsusp_shrink_memory() from
      kernel/power/swsusp.c to kernel/power/snapshot.c, because the new
      memory-shrinking code is going to use things that are local to
      kernel/power/snapshot.c .
      
      [rev. 2: Make some functions static and remove their headers from
       kernel/power/power.h]
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Acked-by: default avatarWu Fengguang <fengguang.wu@intel.com>
      fe419535
    • Rafael J. Wysocki's avatar
      PM/Suspend: Do not shrink memory before suspend · c6f37f12
      Rafael J. Wysocki authored
      Remove the shrinking of memory from the suspend-to-RAM code, where
      it is not really necessary.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarNigel Cunningham <nigel@tuxonice.net>
      Acked-by: default avatarWu Fengguang <fengguang.wu@intel.com>
      c6f37f12
    • Magnus Damm's avatar
      PM: Remove bus_type suspend_late()/resume_early() V2 · e240b58c
      Magnus Damm authored
      Remove the ->suspend_late() and ->resume_early() callbacks
      from struct bus_type V2. These callbacks are legacy stuff
      at this point and since there seem to be no in-tree users
      we may as well remove them. New users should use dev_pm_ops.
      Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      e240b58c
    • Alan Stern's avatar
      PM core: rename suspend and resume functions · d1616302
      Alan Stern authored
      This patch (as1241) renames a bunch of functions in the PM core.
      Rather than go through a boring list of name changes, suffice it to
      say that in the end we have a bunch of pairs of functions:
      
      	device_resume_noirq	dpm_resume_noirq
      	device_resume		dpm_resume
      	device_complete		dpm_complete
      	device_suspend_noirq	dpm_suspend_noirq
      	device_suspend		dpm_suspend
      	device_prepare		dpm_prepare
      
      in which device_X does the X operation on a single device and dpm_X
      invokes device_X for all devices in the dpm_list.
      
      In addition, the old dpm_power_up and device_resume_noirq have been
      combined into a single function (dpm_resume_noirq).
      
      Lastly, dpm_suspend_start and dpm_resume_end are the renamed versions
      of the former top-level device_suspend and device_resume routines.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Acked-by: default avatarMagnus Damm <damm@igel.co.jp>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      d1616302
    • Magnus Damm's avatar
      PM: Rename device_power_down/up() · e39a71ef
      Magnus Damm authored
      Rename the functions performing "_noirq" dev_pm_ops
      operations from device_power_down() and device_power_up()
      to device_suspend_noirq() and device_resume_noirq().
      
      The new function names are chosen to show that the functions
      are responsible for calling the _noirq() versions to finalize
      the suspend/resume operation. The current function names do
      not perform power down/up anymore so the names may be misleading.
      
      Global function renames:
      - device_power_down() -> device_suspend_noirq()
      - device_power_up() -> device_resume_noirq()
      
      Static function renames:
      - suspend_device_noirq() -> __device_suspend_noirq()
      - resume_device_noirq() -> __device_resume_noirq()
      Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      Acked-by: default avatarLen Brown <lenb@kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      e39a71ef
    • Magnus Damm's avatar
      PM: Remove unused asm/suspend.h · 1380a37e
      Magnus Damm authored
      This patch removes unused asm/suspend.h files for
      the following architectures:
      
       alpha, arm, ia64, m68k, mips, s390, um
      Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      1380a37e
    • Sergio Luis's avatar
      x86: unify power/cpu_(32|64).c · 08687aec
      Sergio Luis authored
      This is the last unification step. Here we do remove one of the files
      and rename the left one as cpu.c, as both are now the same.
      Also update power/Makefile, telling it to build cpu.o, instead of
      cpu_(32|64).o
      Signed-off-by: default avatarSergio Luis <sergio@larces.uece.br>
      Signed-off-by: default avatarLauro Salmito <laurosalmito@gmail.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      08687aec
    • Sergio Luis's avatar
      x86: unify power/cpu_(32|64) copyright notes · 6d48becd
      Sergio Luis authored
      In this step, we do unify the copyright notes for both files
      cpu_32.c and cpu_64.c, making such files exactly the same.
      It's the last step before the actual unification, that will
      rename one of them to cpu.c and remove the other one.
      Signed-off-by: default avatarSergio Luis <sergio@larces.uece.br>
      Signed-off-by: default avatarLauro Salmito <laurosalmito@gmail.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      6d48becd
    • Sergio Luis's avatar
      x86: unify power/cpu_(32|64) regarding restoring processor state · 3134d04b
      Sergio Luis authored
      In this step we do unify cpu_32.c and cpu_64.c functions that
      work on restoring the saved processor state. Also, we do
      eliminate the forward declaration of fix_processor_context()
      for X86_64, as it's not needed anymore.
      Signed-off-by: default avatarSergio Luis <sergio@larces.uece.br>
      Signed-off-by: default avatarLauro Salmito <laurosalmito@gmail.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      3134d04b
    • Sergio Luis's avatar
      x86: unify power/cpu_(32|64) regarding saving processor state · f9ebbe53
      Sergio Luis authored
      In this step we do unify cpu_32.c and cpu_64.c functions that
      work on saving the processor state.
      Signed-off-by: default avatarSergio Luis <sergio@larces.uece.br>
      Signed-off-by: default avatarLauro Salmito <laurosalmito@gmail.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      f9ebbe53
    • Sergio Luis's avatar
      x86: unify power/cpu_(32|64) global variables · 833b2ca0
      Sergio Luis authored
      Aiming total unification of cpu_32.c and cpu_64.c, in this step
      we do unify the global variables and existing forward declarations
      for such files.
      Signed-off-by: default avatarSergio Luis <sergio@larces.uece.br>
      Signed-off-by: default avatarLauro Salmito <laurosalmito@gmail.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      833b2ca0
    • Sergio Luis's avatar
      x86: unify power/cpu_(32|64) headers · f6783d20
      Sergio Luis authored
      First step towards the unification of cpu_32.c and cpu_64.c.
      This commit unifies the headers of such files, making both
      of them use the same header files. It also remove the uneeded
      <module.h>.
      Signed-off-by: default avatarSergio Luis <sergio@larces.uece.br>
      Signed-off-by: default avatarLauro Salmito <laurosalmito@gmail.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      f6783d20
    • Rafael J. Wysocki's avatar
      PM: Warn if interrupts are enabled during suspend-resume of sysdevs · 62b01247
      Rafael J. Wysocki authored
      Sysdevs have to be suspended and resumed with interrupts disabled and
      things usually break in a way that's difficult to debug if one of
      sysdev drivers enables interrupts by mistake during suspend or
      resume.  Add extra checks that will generate warnings in such cases.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      62b01247
    • Jaswinder Singh Rajput's avatar
      PM/ACPI/x86: Fix sparse warning in arch/x86/kernel/acpi/sleep.c · ce4b3c55
      Jaswinder Singh Rajput authored
      One of the numbers in arch/x86/kernel/acpi/sleep.c is long, but it is
      not annotated appropriately, so sparese warns about it.  Fix that.
      
      [rjw: added the changelog.]
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      ce4b3c55
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 · e349792a
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (290 commits)
        ALSA: pcm - Update document about xrun_debug proc file
        ALSA: lx6464es - support standard alsa module parameters
        ALSA: snd_usb_caiaq: set mixername
        ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205)
        ALSA: use card device as parent for jack input-devices
        ALSA: sound/ps3: Correct existing and add missing annotations
        ALSA: sound/ps3: Restructure driver source
        ALSA: sound/ps3: Fix checkpatch issues
        ASoC: Fix lm4857 control
        ALSA: ctxfi - Clear PCM resources at hw_params and hw_free
        ALSA: ctxfi - Check the presence of SRC instance in PCM pointer callbacks
        ALSA: ctxfi - Add missing start check in atc_pcm_playback_start()
        ALSA: ctxfi - Add use_system_timer module option
        ALSA: usb - Add boot quirk for C-Media 6206 USB Audio
        ALSA: ctxfi - Fix wrong model id for UAA
        ALSA: ctxfi - Clean up probe routines
        ALSA: hda - Fix the previous tagra-8ch patch
        ALSA: hda - Add 7.1 support for MSI GX620
        ALSA: pcm - A helper function to compose PCM stream name for debug prints
        ALSA: emu10k1 - Fix minimum periods for efx playback
        ...
      e349792a
    • Takashi Iwai's avatar
      Merge branch 'topic/ps3' into for-linus · e3f86d3d
      Takashi Iwai authored
      * topic/ps3:
        ALSA: sound/ps3: Correct existing and add missing annotations
        ALSA: sound/ps3: Restructure driver source
        ALSA: sound/ps3: Fix checkpatch issues
      e3f86d3d
    • Takashi Iwai's avatar
      Merge branch 'topic/pcm-jiffies-check' into for-linus · 056c1ebf
      Takashi Iwai authored
      * topic/pcm-jiffies-check:
        ALSA: pcm - Update document about xrun_debug proc file
      056c1ebf
    • Takashi Iwai's avatar
      Merge branch 'topic/misc' into for-linus · be914cf9
      Takashi Iwai authored
      * topic/misc:
        ALSA: use card device as parent for jack input-devices
      be914cf9
    • Takashi Iwai's avatar
      Merge branch 'topic/lx6464es' into for-linus · 31d496aa
      Takashi Iwai authored
      * topic/lx6464es:
        ALSA: lx6464es - support standard alsa module parameters
      31d496aa
    • Takashi Iwai's avatar
      Merge branch 'topic/hda' into for-linus · f8be792d
      Takashi Iwai authored
      * topic/hda:
        ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205)
      f8be792d
    • Takashi Iwai's avatar
      Merge branch 'topic/caiaq' into for-linus · 80986be4
      Takashi Iwai authored
      * topic/caiaq:
        ALSA: snd_usb_caiaq: set mixername
      80986be4
    • Takashi Iwai's avatar
      Merge branch 'topic/asoc' into for-linus · a6093a24
      Takashi Iwai authored
      * topic/asoc:
        ASoC: Fix lm4857 control
      a6093a24
    • Linus Torvalds's avatar
      Merge branch 'topic/slab/earlyboot-v2' of... · 6d214918
      Linus Torvalds authored
      Merge branch 'topic/slab/earlyboot-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
      
      * 'topic/slab/earlyboot-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
        slab: setup cpu caches later on when interrupts are enabled
        slab,slub: don't enable interrupts during early boot
        slab: fix gfp flag in setup_cpu_cache()
        x86: make zap_low_mapping could be used early
        irq: slab alloc for default irq_affinity
        memcg: fix page_cgroup fatal error in FLATMEM
      6d214918
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 · c9b8af00
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (154 commits)
        [SCSI] osd: Remove out-of-tree left overs
        [SCSI] libosd: Use REQ_QUIET requests.
        [SCSI] osduld: use filp_open() when looking up an osd-device
        [SCSI] libosd: Define an osd_dev wrapper to retrieve the request_queue
        [SCSI] libosd: osd_req_{read,write} takes a length parameter
        [SCSI] libosd: Let _osd_req_finalize_data_integrity receive number of out_bytes
        [SCSI] libosd: osd_req_{read,write}_kern new API
        [SCSI] libosd: Better printout of OSD target system information
        [SCSI] libosd: OSD2r05: Attribute definitions
        [SCSI] libosd: OSD2r05: Additional command enums
        [SCSI] mpt fusion: fix up doc book comments
        [SCSI] mpt fusion: Added support for Broadcast primitives Event handling
        [SCSI] mpt fusion: Queue full event handling
        [SCSI] mpt fusion: RAID device handling and Dual port Raid support is added
        [SCSI] mpt fusion: Put IOC into ready state if it not already in ready state
        [SCSI] mpt fusion: Code Cleanup patch
        [SCSI] mpt fusion: Rescan SAS topology added
        [SCSI] mpt fusion: SAS topology scan changes, expander events
        [SCSI] mpt fusion: Firmware event implementation using seperate WorkQueue
        [SCSI] mpt fusion: rewrite of ioctl_cmds internal generated function
        ...
      c9b8af00
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/~dwmw2/firmware-2.6 · c59a264c
      Linus Torvalds authored
      * git://git.infradead.org/~dwmw2/firmware-2.6:
        firmware: speed up request_firmware(), v3
      c59a264c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw · 6cb8a911
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw:
        GFS2: Remove lock_kernel from gfs2_put_super()
        GFS2: Add tracepoints
      6cb8a911
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest · 7f3591cf
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest: (31 commits)
        lguest: add support for indirect ring entries
        lguest: suppress notifications in example Launcher
        lguest: try to batch interrupts on network receive
        lguest: avoid sending interrupts to Guest when no activity occurs.
        lguest: implement deferred interrupts in example Launcher
        lguest: remove obsolete LHREQ_BREAK call
        lguest: have example Launcher service all devices in separate threads
        lguest: use eventfds for device notification
        eventfd: export eventfd_signal and eventfd_fget for lguest
        lguest: allow any process to send interrupts
        lguest: PAE fixes
        lguest: PAE support
        lguest: Add support for kvm_hypercall4()
        lguest: replace hypercall name LHCALL_SET_PMD with LHCALL_SET_PGD
        lguest: use native_set_* macros, which properly handle 64-bit entries when PAE is activated
        lguest: map switcher with executable page table entries
        lguest: fix writev returning short on console output
        lguest: clean up length-used value in example launcher
        lguest: Segment selectors are 16-bit long. Fix lg_cpu.ss1 definition.
        lguest: beyond ARRAY_SIZE of cpu->arch.gdt
        ...
      7f3591cf
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-virtio · 16ffc3ee
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-virtio:
        virtio: enhance id_matching for virtio drivers
        virtio: fix id_matching for virtio drivers
        virtio: handle short buffers in virtio_rng.
        virtio_blk: add missing __dev{init,exit} markings
        virtio: indirect ring entries (VIRTIO_RING_F_INDIRECT_DESC)
        virtio: teach virtio_has_feature() about transport features
        virtio: expose features in sysfs
        virtio_pci: optional MSI-X support
        virtio_pci: split up vp_interrupt
        virtio: find_vqs/del_vqs virtio operations
        virtio: add names to virtqueue struct, mapping from devices to queues.
        virtio: meet virtio spec by finalizing features before using device
        virtio: fix obsolete documentation on probe function
      16ffc3ee
    • Linus Torvalds's avatar
      Merge branch 'cuse' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · c34752bc
      Linus Torvalds authored
      * 'cuse' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        CUSE: implement CUSE - Character device in Userspace
        fuse: export symbols to be used by CUSE
        fuse: update fuse_conn_init() and separate out fuse_conn_kill()
        fuse: don't use inode in fuse_file_poll
        fuse: don't use inode in fuse_do_ioctl() helper
        fuse: don't use inode in fuse_sync_release()
        fuse: create fuse_do_open() helper for CUSE
        fuse: clean up args in fuse_finish_open() and fuse_release_fill()
        fuse: don't use inode in helpers called by fuse_direct_io()
        fuse: add members to struct fuse_file
        fuse: prepare fuse_direct_io() for CUSE
        fuse: clean up fuse_write_fill()
        fuse: use struct path in release structure
        fuse: misc cleanups
      c34752bc
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-module-and-param · 65d52cc9
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-module-and-param:
        module: cleanup FIXME comments about trimming exception table entries.
        module: trim exception table on init free.
        module: merge module_alloc() finally
        uml module: fix uml build process due to this merge
        x86 module: merge the rest functions with macros
        x86 module: merge the same functions in module_32.c and module_64.c
        uvesafb: improve parameter handling.
        module_param: allow 'bool' module_params to be bool, not just int.
        module_param: add __same_type convenience wrapper for __builtin_types_compatible_p
        module_param: split perm field into flags and perm
        module_param: invbool should take a 'bool', not an 'int'
        cyber2000fb.c: use proper method for stopping unload if CONFIG_ARCH_SHARK
      65d52cc9
    • Linus Torvalds's avatar
      Merge branch 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 · d614aec4
      Linus Torvalds authored
      * 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (29 commits)
        ide: re-implement ide_pci_init_one() on top of ide_pci_init_two()
        ide: unexport ide_find_dma_mode()
        ide: fix PowerMac bootup oops
        ide: skip probe if there are no devices on the port (v2)
        sl82c105: add printk() logging facility
        ide-tape: fix proc warning
        ide: add IDE_DFLAG_NIEN_QUIRK device flag
        ide: respect quirk_drives[] list on all controllers
        hpt366: enable all quirks for devices on quirk_drives[] list
        hpt366: sync quirk_drives[] list with pdc202xx_{new,old}.c
        ide: remove superfluous SELECT_MASK() call from do_rw_taskfile()
        ide: remove superfluous SELECT_MASK() call from ide_driveid_update()
        icside: remove superfluous ->maskproc method
        ide-tape: fix IDE_AFLAG_* atomic accesses
        ide-tape: change IDE_AFLAG_IGNORE_DSC non-atomically
        pdc202xx_old: kill resetproc() method
        pdc202xx_old: don't call pdc202xx_reset() on IRQ timeout
        pdc202xx_old: use ide_dma_test_irq()
        ide: preserve Host Protected Area by default (v2)
        ide-gd: implement block device ->set_capacity method (v2)
        ...
      d614aec4
    • Linus Torvalds's avatar
      Merge branch 'x86-fixes-for-linus' of... · db8e7f10
      Linus Torvalds authored
      Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86: Provide _sdata in the vmlinux.lds.S file
        x86: handle initrd that extends into unusable memory
      db8e7f10
    • Pekka Enberg's avatar
      slab: setup cpu caches later on when interrupts are enabled · 8429db5c
      Pekka Enberg authored
      Fixes the following boot-time warning:
      
        [    0.000000] ------------[ cut here ]------------
        [    0.000000] WARNING: at kernel/smp.c:369 smp_call_function_many+0x56/0x1bc()
        [    0.000000] Hardware name:
        [    0.000000] Modules linked in:
        [    0.000000] Pid: 0, comm: swapper Not tainted 2.6.30 #492
        [    0.000000] Call Trace:
        [    0.000000]  [<ffffffff8149e021>] ? _spin_unlock+0x4f/0x5c
        [    0.000000]  [<ffffffff8108f11b>] ? smp_call_function_many+0x56/0x1bc
        [    0.000000]  [<ffffffff81061764>] warn_slowpath_common+0x7c/0xa9
        [    0.000000]  [<ffffffff810617a5>] warn_slowpath_null+0x14/0x16
        [    0.000000]  [<ffffffff8108f11b>] smp_call_function_many+0x56/0x1bc
        [    0.000000]  [<ffffffff810f3e00>] ? do_ccupdate_local+0x0/0x54
        [    0.000000]  [<ffffffff810f3e00>] ? do_ccupdate_local+0x0/0x54
        [    0.000000]  [<ffffffff8108f2be>] smp_call_function+0x3d/0x68
        [    0.000000]  [<ffffffff810f3e00>] ? do_ccupdate_local+0x0/0x54
        [    0.000000]  [<ffffffff81066fd8>] on_each_cpu+0x31/0x7c
        [    0.000000]  [<ffffffff810f64f5>] do_tune_cpucache+0x119/0x454
        [    0.000000]  [<ffffffff81087080>] ? lockdep_init_map+0x94/0x10b
        [    0.000000]  [<ffffffff818133b0>] ? kmem_cache_init+0x421/0x593
        [    0.000000]  [<ffffffff810f69cf>] enable_cpucache+0x68/0xad
        [    0.000000]  [<ffffffff818133c3>] kmem_cache_init+0x434/0x593
        [    0.000000]  [<ffffffff8180987c>] ? mem_init+0x156/0x161
        [    0.000000]  [<ffffffff817f8aae>] start_kernel+0x1cc/0x3b9
        [    0.000000]  [<ffffffff817f829a>] x86_64_start_reservations+0xaa/0xae
        [    0.000000]  [<ffffffff817f837f>] x86_64_start_kernel+0xe1/0xe8
        [    0.000000] ---[ end trace 4eaa2a86a8e2da22 ]---
      
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Nick Piggin <npiggin@suse.de>
      Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      8429db5c
    • Pekka Enberg's avatar
      slab,slub: don't enable interrupts during early boot · 7e85ee0c
      Pekka Enberg authored
      As explained by Benjamin Herrenschmidt:
      
        Oh and btw, your patch alone doesn't fix powerpc, because it's missing
        a whole bunch of GFP_KERNEL's in the arch code... You would have to
        grep the entire kernel for things that check slab_is_available() and
        even then you'll be missing some.
      
        For example, slab_is_available() didn't always exist, and so in the
        early days on powerpc, we used a mem_init_done global that is set form
        mem_init() (not perfect but works in practice). And we still have code
        using that to do the test.
      
      Therefore, mask out __GFP_WAIT, __GFP_IO, and __GFP_FS in the slab allocators
      in early boot code to avoid enabling interrupts.
      Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      7e85ee0c
    • Pekka Enberg's avatar
      slab: fix gfp flag in setup_cpu_cache() · eb91f1d0
      Pekka Enberg authored
      Fixes the following warning during bootup when compiling with CONFIG_SLAB:
      
        [    0.000000] ------------[ cut here ]------------
        [    0.000000] WARNING: at kernel/lockdep.c:2282 lockdep_trace_alloc+0x91/0xb9()
        [    0.000000] Hardware name:
        [    0.000000] Modules linked in:
        [    0.000000] Pid: 0, comm: swapper Not tainted 2.6.30 #491
        [    0.000000] Call Trace:
        [    0.000000]  [<ffffffff81087d84>] ? lockdep_trace_alloc+0x91/0xb9
        [    0.000000]  [<ffffffff81061764>] warn_slowpath_common+0x7c/0xa9
        [    0.000000]  [<ffffffff810617a5>] warn_slowpath_null+0x14/0x16
        [    0.000000]  [<ffffffff81087d84>] lockdep_trace_alloc+0x91/0xb9
        [    0.000000]  [<ffffffff810f5b03>] kmem_cache_alloc_node_notrace+0x26/0xdf
        [    0.000000]  [<ffffffff81487f4e>] ? setup_cpu_cache+0x7e/0x210
        [    0.000000]  [<ffffffff81487fe3>] setup_cpu_cache+0x113/0x210
        [    0.000000]  [<ffffffff810f73ff>] kmem_cache_create+0x409/0x486
        [    0.000000]  [<ffffffff818131c1>] kmem_cache_init+0x232/0x593
        [    0.000000]  [<ffffffff8180987c>] ? mem_init+0x156/0x161
        [    0.000000]  [<ffffffff817f8aae>] start_kernel+0x1cc/0x3b9
        [    0.000000]  [<ffffffff817f829a>] x86_64_start_reservations+0xaa/0xae
        [    0.000000]  [<ffffffff817f837f>] x86_64_start_kernel+0xe1/0xe8
        [    0.000000] ---[ end trace 4eaa2a86a8e2da22 ]---
      Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      eb91f1d0
    • James Bottomley's avatar
      [SCSI] Merge branch 'linus' · 82681a31
      James Bottomley authored
      Conflicts:
      	drivers/message/fusion/mptsas.c
      
      fixed up conflict between req->data_len accessors and mptsas driver updates.
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
      82681a31
    • Mark McLoughlin's avatar
      lguest: add support for indirect ring entries · d1f0132e
      Mark McLoughlin authored
      Support the VIRTIO_RING_F_INDIRECT_DESC feature.
      
      This is a simple matter of changing the descriptor walking
      code to operate on a struct vring_desc* and supplying it
      with an indirect table if detected.
      Signed-off-by: default avatarMark McLoughlin <markmc@redhat.com>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      d1f0132e
    • Rusty Russell's avatar
      lguest: suppress notifications in example Launcher · b60da13f
      Rusty Russell authored
      The Guest only really needs to tell us about activity when we're going
      to listen to the eventfd: normally, we don't want to know.
      
      So if there are no available buffers, turn on notifications, re-check,
      then wait for the Guest to notify us via the eventfd, then turn
      notifications off again.
      
      There's enough else going on that the differences are in the noise.
      
      Before:				Secs	RxKicks	TxKicks
       1G TCP Guest->Host:		3.94	  4686	  32815
       1M normal pings:		104	142862	1000010
       1M 1k pings (-l 120):		57	142026	1000007
      
      After:
       1G TCP Guest->Host:		3.76	  4691	  32811
       1M normal pings:		111	142859	 997467
       1M 1k pings (-l 120):		55	 19648	 501549
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      b60da13f
    • Rusty Russell's avatar
      lguest: try to batch interrupts on network receive · 4a8962e2
      Rusty Russell authored
      Rather than triggering an interrupt every time, we only trigger an
      interrupt when there are no more incoming packets (or the recv queue
      is full).
      
      However, the overhead of doing the select to figure this out is
      measurable: 1M pings goes from 98 to 104 seconds, and 1G Guest->Host
      TCP goes from 3.69 to 3.94 seconds.  It's close to the noise though.
      
      I tested various timeouts, including reducing it as the number of
      pending packets increased, timing a 1 gigabyte TCP send from Guest ->
      Host and Host -> Guest (GSO disabled, to increase packet rate).
      
      // time tcpblast -o -s 65536 -c 16k 192.168.2.1:9999 > /dev/null
      
      Timeout		Guest->Host	Pkts/irq	Host->Guest	Pkts/irq
      Before		11.3s		1.0		6.3s		1.0
      0		11.7s		1.0		6.6s		23.5
      1		17.1s		8.8		8.6s		26.0
      1/pending	13.4s		1.9		6.6s		23.8
      2/pending	13.6s		2.8		6.6s		24.1
      5/pending	14.1s		5.0		6.6s		24.4
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      4a8962e2
    • Rusty Russell's avatar
      lguest: avoid sending interrupts to Guest when no activity occurs. · 95c517c0
      Rusty Russell authored
      If we track how many buffers we've used, we can tell whether we really
      need to interrupt the Guest.  This happens as a side effect of
      spurious notifications.
      
      Spurious notifications happen because it can take a while before the
      Host thread wakes up and sets the VRING_USED_F_NO_NOTIFY flag, and
      meanwhile the Guest can more notifications.
      
      A real fix would be to use wake counts, rather than a suppression
      flag, but the practical difference is generally in the noise: the
      interrupt is usually coalesced into a pending one anyway so we just
      save a system call which isn't clearly measurable.
      
      				Secs	Spurious IRQS
      1G TCP Guest->Host:		3.93	58
      1M normal pings:		100	72
      1M 1k pings (-l 120):		57	492904
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      95c517c0