1. 04 Nov, 2009 27 commits
  2. 03 Nov, 2009 13 commits
    • Linus Torvalds's avatar
      Linux 2.6.32-rc6 · b419148e
      Linus Torvalds authored
      b419148e
    • JosephChan@via.com.tw's avatar
      sata_via: Remove redundant device ID for VIA VT8261 · f38e35b4
      JosephChan@via.com.tw authored
      Just remove redundant device ID for VIA VT8261.
      The device ID 0x9000 and 0x9040 are redundant (for VT8261).
      The 0x9040 is reserved for other usage.
      Signed-off-by: default avatarJoseph Chan <josephchan@via.com.tw>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      f38e35b4
    • Julia Lawall's avatar
      drivers/ata/libata: Move dereference after NULL test · a1104016
      Julia Lawall authored
      In each case, if the NULL test on qc is needed, then the derefernce
      should be after the NULL test.
      
      A simplified version of the semantic match that detects this problem is as
      follows (http://coccinelle.lip6.fr/):
      
      // <smpl>
      @match exists@
      expression x, E;
      identifier fld;
      @@
      
      * x->fld
        ... when != \(x = E\|&x\)
      * x == NULL
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      a1104016
    • Mark Nelson's avatar
      ahci: Enable SB600 64bit DMA on MSI K9A2 Platinum v2 · e65cc194
      Mark Nelson authored
      Like the Asus M2A-VM, MSI's K9A2 Platinum (MS-7376) can also support 64bit
      DMA. It is a new enough board that all the BIOS releases work correctly with
      64bit DMA enabled.
      Signed-off-by: default avatarMark Nelson <mdnelson8@gmail.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      e65cc194
    • Shaohua Li's avatar
      cfq-iosched: limit coop preemption · 4b27e1bb
      Shaohua Li authored
      CFQ has an optimization for cooperated applications. if several
      io-context have close requests, they will get boost. But the
      optimization get abused. Considering thread a, b, which work on one
      file. a reads sectors s, s+2, s+4, ...; b reads sectors s+1, s+3, s
      +5, ... Both a and b are sequential read, so they can open idle window.
      a reads a sector s and goes to idle window and wakeup b. b reads sector
      s+1, since in current implementation, cfq_should_preempt() thinks a and
      b are cooperators, b will preempt a. b then reads sector s+1 and goes to
      idle window and wakeup a. for the same reason, a will preempt b and
      reads s+2. a and b will continue the circle. The circle will be very
      long, and a and b will occupy whole disk queue. Other applications will
      nearly have no chance to run.
      
      Fix this limiting coop preempt until a queue is scheduled normally
      again.
      Signed-off-by: default avatarShaohua Li <shaohua.li@intel.com>
      Acked-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      4b27e1bb
    • Jens Axboe's avatar
      cfq-iosched: fix bad return value cfq_should_preempt() · e6ec4fe2
      Jens Axboe authored
      Commit a6151c3a inadvertently reversed
      a preempt condition check, potentially causing a performance regression.
      Make the meta check correct again.
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      e6ec4fe2
    • Jens Axboe's avatar
      backing-dev: bdi sb prune should be in the unregister path, not destroy · 8c4db335
      Jens Axboe authored
      Commit 592b09a4 was different from
      the tested path, in that it moved the bdi super_block prune from
      unregister to destroy context. This doesn't fully fix the sync hang
      bug on unexpected device removal, as need to prune the bdi cache
      pointer before killing flusher thread.
      Tested-by: default avatarArtur Skawina <art.08.09@gmail.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      8c4db335
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://github.com/at91linux/linux-2.6-at91 · 79051db9
      Linus Torvalds authored
      * 'for-linus' of git://github.com/at91linux/linux-2.6-at91:
        at91: at91sam9g45 family: identify several chip versions
        avr32: add two new at91 to cpu.h definition
      79051db9
    • Nicolas Ferre's avatar
      at91: at91sam9g45 family: identify several chip versions · d8951ade
      Nicolas Ferre authored
      cpu_is_xxx() macros are identifying generic at91sam9g45 chip. This patch adds
      the capacity to differentiate Engineering Samples and final lots through the
      inclusion of  at91_cpu_fully_identify() and the related chip IDs with chip
      version field preserved.
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Acked-by: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      Acked-by: default avatarHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
      d8951ade
    • Nicolas Ferre's avatar
      avr32: add two new at91 to cpu.h definition · 2f5d46d2
      Nicolas Ferre authored
      Somme common drivers will need those at91 cpu_is_xxx() definitions. As
      at91sam9g10 and at91sam9g45 are on the way to linus' tree, here is the patch
      that adds those chips to cpu.h in AVR32 architecture.
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      2f5d46d2
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus · 9ddfd929
      Linus Torvalds authored
      * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (38 commits)
        MIPS: O32: Fix ppoll
        MIPS: Oprofile: Rename cpu_type from godson2 to loongson2
        MIPS: Alchemy: Fix hang with high-frequency edge interrupts
        MIPS: TXx9: Fix spi-baseclk value
        MIPS: bcm63xx: Set the correct BCM3302 CPU name
        MIPS: Loongson 2: Set cpu_has_dc_aliases and cpu_icache_snoops_remote_store
        MIPS: Avoid potential hazard on Context register
        MIPS: Octeon: Use lockless interrupt controller operations when possible.
        MIPS: Octeon: Use write_{un,}lock_irq{restore,save} to set irq affinity
        MIPS: Set S-cache linesize to 64-bytes for MTI's S-cache
        MIPS: SMTC: Avoid queing multiple reschedule IPIs
        MIPS: GCMP: Avoid accessing registers when they are not present
        MIPS: GIC: Random fixes and enhancements.
        MIPS: CMP: Fix memory barriers for correct operation of amon_cpu_start
        MIPS: Fix abs.[sd] and neg.[sd] emulation for NaN operands
        MIPS: SPRAM: Clean up support code a little
        MIPS: 1004K: Enable SPRAM support.
        MIPS: Malta: Enable PCI 2.1 compatibility in PIIX4
        MIPS: Kconfig: Fix duplicate default value for MIPS_L1_CACHE_SHIFT.
        MIPS: MTI: Fix accesses to device registers on MIPS boards
        ...
      9ddfd929
    • Linus Torvalds's avatar
      Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 · 38dc6345
      Linus Torvalds authored
      * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
        PM: Remove some debug messages producing too much noise
        PM: Fix warning on suspend errors
        PM / Hibernate: Add newline to load_image() fail path
        PM / Hibernate: Fix error handling in save_image()
        PM / Hibernate: Fix blkdev refleaks
        PM / yenta: Split resume into early and late parts (rev. 4)
      38dc6345
    • Ian Campbell's avatar
      Correct nr_processes() when CPUs have been unplugged · 1d510750
      Ian Campbell authored
      nr_processes() returns the sum of the per cpu counter process_counts for
      all online CPUs. This counter is incremented for the current CPU on
      fork() and decremented for the current CPU on exit(). Since a process
      does not necessarily fork and exit on the same CPU the process_count for
      an individual CPU can be either positive or negative and effectively has
      no meaning in isolation.
      
      Therefore calculating the sum of process_counts over only the online
      CPUs omits the processes which were started or stopped on any CPU which
      has since been unplugged. Only the sum of process_counts across all
      possible CPUs has meaning.
      
      The only caller of nr_processes() is proc_root_getattr() which
      calculates the number of links to /proc as
              stat->nlink = proc_root.nlink + nr_processes();
      
      You don't have to be all that unlucky for the nr_processes() to return a
      negative value leading to a negative number of links (or rather, an
      apparently enormous number of links). If this happens then you can get
      failures where things like "ls /proc" start to fail because they got an
      -EOVERFLOW from some stat() call.
      
      Example with some debugging inserted to show what goes on:
              # ps haux|wc -l
              nr_processes: CPU0:     90
              nr_processes: CPU1:     1030
              nr_processes: CPU2:     -900
              nr_processes: CPU3:     -136
              nr_processes: TOTAL:    84
              proc_root_getattr. nlink 12 + nr_processes() 84 = 96
              84
              # echo 0 >/sys/devices/system/cpu/cpu1/online
              # ps haux|wc -l
              nr_processes: CPU0:     85
              nr_processes: CPU2:     -901
              nr_processes: CPU3:     -137
              nr_processes: TOTAL:    -953
              proc_root_getattr. nlink 12 + nr_processes() -953 = -941
              75
              # stat /proc/
              nr_processes: CPU0:     84
              nr_processes: CPU2:     -901
              nr_processes: CPU3:     -137
              nr_processes: TOTAL:    -954
              proc_root_getattr. nlink 12 + nr_processes() -954 = -942
                File: `/proc/'
                Size: 0               Blocks: 0          IO Block: 1024   directory
              Device: 3h/3d   Inode: 1           Links: 4294966354
              Access: (0555/dr-xr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
              Access: 2009-11-03 09:06:55.000000000 +0000
              Modify: 2009-11-03 09:06:55.000000000 +0000
              Change: 2009-11-03 09:06:55.000000000 +0000
      
      I'm not 100% convinced that the per_cpu regions remain valid for offline
      CPUs, although my testing suggests that they do. If not then I think the
      correct solution would be to aggregate the process_count for a given CPU
      into a global base value in cpu_down().
      
      This bug appears to pre-date the transition to git and it looks like it
      may even have been present in linux-2.6.0-test7-bk3 since it looks like
      the code Rusty patched in http://lwn.net/Articles/64773/ was already
      wrong.
      Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1d510750