1. 28 Apr, 2010 1 commit
  2. 27 Apr, 2010 15 commits
  3. 26 Apr, 2010 8 commits
  4. 25 Apr, 2010 7 commits
  5. 24 Apr, 2010 9 commits
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq · ddc9b34c
      Linus Torvalds authored
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
        [CPUFREQ] use max load in conservative governor
        [CPUFREQ] fix a lockdep warning
      ddc9b34c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 8e500ff8
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (22 commits)
        gianfar: Fix potential oops during OF address translation
        fsl_pq_mdio: Fix kernel oops during OF address translation
        tcp: bind() fix when many ports are bound
        rdma: potential ERR_PTR dereference
        rtnetlink: potential ERR_PTR dereference
        net: ipv6 bind to device issue
        ipv6: allow to send packet after receiving ICMPv6 Too Big message with MTU field less than IPV6_MIN_MTU
        drivers/net/usb: Add new driver ipheth
        cxgb3: fix linkup issue
        X25 fix dead unaccepted sockets
        KS8851: NULL pointer dereference if list is empty
        net: 3c574_cs fix stats.tx_bytes counter
        xfrm6: ensure to use the same dev when building a bundle
        can: Fix possible NULL pointer dereference in ems_usb.c
        net: Fix an RCU warning in dev_pick_tx()
        ipv6: Fix tcp_v6_send_response transport header setting.
        bridge: add a missing ntohs()
        8139too: Fix a typo in the function name.
        mac80211: pass HT changes to driver when off channel
        mac80211: remove bogus TX agg state assignment
        ...
      8e500ff8
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 · 383bee6b
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
        PCI: Ensure we re-enable devices on resume
        x86/PCI: parse additional host bridge window resource types
        PCI: revert broken device warning
        PCI aerdrv: use correct bit defines and add 2ms delay to aer_root_reset
        x86/PCI: ignore Consumer/Producer bit in ACPI window descriptions
      383bee6b
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of... · b39c8be6
      Linus Torvalds authored
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86
      
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
        eeepc-laptop: add missing sparse_keymap_free
        eeepc-wmi: Build fix
        asus: don't modify bluetooth/wlan on boot
        dell-wmi: Fix memory leak
        eeepc-wmi: add backlight support
        eeepc-wmi: use a platform device as parent device of all sub-devices
        eeepc-wmi: add an eeepc_wmi context structure
      b39c8be6
    • Phillip Lougher's avatar
      initramfs: handle unrecognised decompressor when unpacking · df37bd15
      Phillip Lougher authored
      The unpack routine fails to handle the decompress_method() returning
      unrecognised decompressor (compress_name == NULL).  This results in the
      routine looping eventually oopsing on an out of bounds memory access.
      
      Note this bug is usually hidden, only triggering on trailing junk after
      one or more correct compressed blocks.  The case of the compressed archive
      being complete junk is (by accident?) caught by the if (state != Reset)
      check because state is initialised to Start, but not updated due to the
      decompressor not having been called.  Obviously if the junk is trailing a
      correctly decompressed buffer, state == Reset from the previous call to
      the decompressor.
      Signed-off-by: default avatarPhillip Lougher <phillip@lougher.demon.co.uk>
      Reported-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      df37bd15
    • Dan Carpenter's avatar
      ksm: check for ERR_PTR from follow_page() · 22eccdd7
      Dan Carpenter authored
      The follow_page() function can potentially return -EFAULT so I added
      checks for this.
      
      Also I silenced an uninitialized variable warning on my version of gcc
      (version 4.3.2).
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Acked-by: default avatarRik van Riel <riel@redhat.com>
      Acked-by: default avatarIzik Eidus <ieidus@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      22eccdd7
    • Dmitry Torokhov's avatar
      VMware Balloon driver · 453dc659
      Dmitry Torokhov authored
      This is a standalone version of VMware Balloon driver.  Ballooning is a
      technique that allows hypervisor dynamically limit the amount of memory
      available to the guest (with guest cooperation).  In the overcommit
      scenario, when hypervisor set detects that it needs to shuffle some
      memory, it instructs the driver to allocate certain number of pages, and
      the underlying memory gets returned to the hypervisor.  Later hypervisor
      may return memory to the guest by reattaching memory to the pageframes and
      instructing the driver to "deflate" balloon.
      
      We are submitting a standalone driver because KVM maintainer (Avi Kivity)
      expressed opinion (rightly) that our transport does not fit well into
      virtqueue paradigm and thus it does not make much sense to integrate with
      virtio.
      
      There were also some concerns whether current ballooning technique is the
      right thing.  If there appears a better framework to achieve this we are
      prepared to evaluate and switch to using it, but in the meantime we'd like
      to get this driver upstream.
      
      We want to get the driver accepted in distributions so that users do not
      have to deal with an out-of-tree module and many distributions have
      "upstream first" requirement.
      
      The driver has been shipping for a number of years and users running on
      VMware platform will have it installed as part of VMware Tools even if it
      will not come from a distribution, thus there should not be additional
      risk in pulling the driver into mainline.  The driver will only activate
      if host is VMware so everyone else should not be affected at all.
      Signed-off-by: default avatarDmitry Torokhov <dtor@vmware.com>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      453dc659
    • Anton Blanchard's avatar
      fs/block_dev.c: fix performance regression in O_DIRECT|O_SYNC writes to block devices · b8af67e2
      Anton Blanchard authored
      We are seeing a large regression in database performance on recent
      kernels.  The database opens a block device with O_DIRECT|O_SYNC and a
      number of threads write to different regions of the file at the same time.
      
      A simple test case is below.  I haven't defined DEVICE since getting it
      wrong will destroy your data :) On an 3 disk LVM with a 64k chunk size we
      see about 17MB/sec and only a few threads in IO wait:
      
      procs  -----io---- -system-- -----cpu------
       r  b     bi    bo   in   cs us sy id wa st
       0  3      0 16170  656 2259  0  0 86 14  0
       0  2      0 16704  695 2408  0  0 92  8  0
       0  2      0 17308  744 2653  0  0 86 14  0
       0  2      0 17933  759 2777  0  0 89 10  0
      
      Most threads are blocking in vfs_fsync_range, which has:
      
              mutex_lock(&mapping->host->i_mutex);
              err = fop->fsync(file, dentry, datasync);
              if (!ret)
                      ret = err;
              mutex_unlock(&mapping->host->i_mutex);
      
      commit 148f948b (vfs: Introduce new
      helpers for syncing after writing to O_SYNC file or IS_SYNC inode) offers
      some explanation of what is going on:
      
          Use these new helpers for syncing from generic VFS functions. This makes
          O_SYNC writes to block devices acquire i_mutex for syncing. If we really
          care about this, we can make block_fsync() drop the i_mutex and reacquire
          it before it returns.
      
      Thanks Jan for such a good commit message!  As well as dropping i_mutex,
      Christoph suggests we should remove the call to sync_blockdev():
      
      > sync_blockdev is an overcomplicated alias for filemap_write_and_wait on
      > the block device inode, which is exactly what we did just before calling
      > into ->fsync
      
      The patch below incorporates both suggestions. With it the testcase improves
      from 17MB/s to 68M/sec:
      
      procs  -----io---- -system-- -----cpu------
       r  b     bi    bo   in   cs us sy id wa st
       0  7      0 65536 1000 3878  0  0 70 30  0
       0 34      0 69632 1016 3921  0  1 46 53  0
       0 57      0 69632 1000 3921  0  0 55 45  0
       0 53      0 69640  754 4111  0  0 81 19  0
      
      Testcase:
      
      #define _GNU_SOURCE
      #include <stdio.h>
      #include <pthread.h>
      #include <unistd.h>
      #include <stdlib.h>
      #include <string.h>
      #include <sys/types.h>
      #include <sys/stat.h>
      #include <fcntl.h>
      
      #define NR_THREADS 64
      #define BUFSIZE (64 * 1024)
      
      #define DEVICE "/dev/mapper/XXXXXX"
      
      #define ALIGN(VAL, SIZE) (((VAL)+(SIZE)-1) & ~((SIZE)-1))
      
      static int fd;
      
      static void *doit(void *arg)
      {
      	unsigned long offset = (long)arg;
      	char *b, *buf;
      
      	b = malloc(BUFSIZE + 1024);
      	buf = (char *)ALIGN((unsigned long)b, 1024);
      	memset(buf, 0, BUFSIZE);
      
      	while (1)
      		pwrite(fd, buf, BUFSIZE, offset);
      }
      
      int main(int argc, char *argv[])
      {
      	int flags = O_RDWR|O_DIRECT;
      	int i;
      	unsigned long offset = 0;
      
      	if (argc > 1 && !strcmp(argv[1], "O_SYNC"))
      		flags |= O_SYNC;
      
      	fd = open(DEVICE, flags);
      	if (fd == -1) {
      		perror("open");
      		exit(1);
      	}
      
      	for (i = 0; i < NR_THREADS-1; i++) {
      		pthread_t tid;
      		pthread_create(&tid, NULL, doit, (void *)offset);
      		offset += BUFSIZE;
      	}
      	doit((void *)offset);
      
      	return 0;
      }
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Acked-by: default avatarJan Kara <jack@suse.cz>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b8af67e2
    • Hans Verkuil's avatar
      lib/vsprintf.c: add missing EXPORT_SYMBOL(simple_strtoll) · 98d5ce0d
      Hans Verkuil authored
      Add a missing EXPORT_SYMBOL.
      
      I must be the first person that wants to use this function :-)
      Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      98d5ce0d