1. 11 6月, 2010 2 次提交
  2. 10 6月, 2010 1 次提交
  3. 08 6月, 2010 2 次提交
  4. 07 6月, 2010 1 次提交
    • T
      tcp: Fix slowness in read /proc/net/tcp · a8b690f9
      Tom Herbert 提交于
      This patch address a serious performance issue in reading the
      TCP sockets table (/proc/net/tcp).
      
      Reading the full table is done by a number of sequential read
      operations.  At each read operation, a seek is done to find the
      last socket that was previously read.  This seek operation requires
      that the sockets in the table need to be counted up to the current
      file position, and to count each of these requires taking a lock for
      each non-empty bucket.  The whole algorithm is O(n^2).
      
      The fix is to cache the last bucket value, offset within the bucket,
      and the file position returned by the last read operation.   On the
      next sequential read, the bucket and offset are used to find the
      last read socket immediately without needing ot scan the previous
      buckets  the table.  This algorithm t read the whole table is O(n).
      
      The improvement offered by this patch is easily show by performing
      cat'ing /proc/net/tcp on a machine with a lot of connections.  With
      about 182K connections in the table, I see the following:
      
      - Without patch
      time cat /proc/net/tcp > /dev/null
      
      real	1m56.729s
      user	0m0.214s
      sys	1m56.344s
      
      - With patch
      time cat /proc/net/tcp > /dev/null
      
      real	0m0.894s
      user	0m0.290s
      sys	0m0.594s
      Signed-off-by: NTom Herbert <therbert@google.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a8b690f9
  5. 05 6月, 2010 3 次提交
  6. 03 6月, 2010 2 次提交
  7. 02 6月, 2010 7 次提交
  8. 01 6月, 2010 1 次提交
  9. 31 5月, 2010 5 次提交
    • E
      netfilter: xtables: stackptr should be percpu · 7489aec8
      Eric Dumazet 提交于
      commit f3c5c1bf (netfilter: xtables: make ip_tables reentrant)
      introduced a performance regression, because stackptr array is shared by
      all cpus, adding cache line ping pongs. (16 cpus share a 64 bytes cache
      line)
      
      Fix this using alloc_percpu()
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Acked-By: NJan Engelhardt <jengelh@medozas.de>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      7489aec8
    • D
    • I
      arp_notify: allow drivers to explicitly request a notification event. · 06c4648d
      Ian Campbell 提交于
      Currently such notifications are only generated when the device comes up or the
      address changes. However one use case for these notifications is to enable
      faster network recovery after a virtual machine migration (by causing switches
      to relearn their MAC tables). A migration appears to the network stack as a
      temporary loss of carrier and therefore does not trigger either of the current
      conditions. Rather than adding carrier up as a trigger (which can cause issues
      when interfaces a flapping) simply add an interface which the driver can use
      to explicitly trigger the notification.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Cc: Stephen Hemminger <shemminger@linux-foundation.org>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Cc: stable@kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06c4648d
    • R
      rapidio: fix new kernel-doc warnings · 97ef6f74
      Randy Dunlap 提交于
      Fix a bunch of new rapidio kernel-doc warnings:
      
      Warning(include/linux/rio.h:123): No description found for parameter 'comp_tag'
      Warning(include/linux/rio.h:123): No description found for parameter 'phys_efptr'
      Warning(include/linux/rio.h:123): No description found for parameter 'em_efptr'
      Warning(include/linux/rio.h:123): No description found for parameter 'pwcback'
      Warning(include/linux/rio.h:247): No description found for parameter 'set_domain'
      Warning(include/linux/rio.h:247): No description found for parameter 'get_domain'
      Warning(drivers/rapidio/rio-scan.c:1133): No description found for parameter 'rdev'
      Warning(drivers/rapidio/rio-scan.c:1133): Excess function parameter 'port' description in 'rio_init_em'
      Warning(drivers/rapidio/rio.c:349): No description found for parameter 'rdev'
      Warning(drivers/rapidio/rio.c:349): Excess function parameter 'mport' description in 'rio_request_inb_pwrite'
      Warning(drivers/rapidio/rio.c:393): No description found for parameter 'port'
      Warning(drivers/rapidio/rio.c:393): No description found for parameter 'local'
      Warning(drivers/rapidio/rio.c:393): No description found for parameter 'destid'
      Warning(drivers/rapidio/rio.c:393): No description found for parameter 'hopcount'
      Warning(drivers/rapidio/rio.c:393): Excess function parameter 'rdev' description in 'rio_mport_get_physefb'
      Warning(drivers/rapidio/rio.c:845): Excess function parameter 'local' description in 'rio_std_route_clr_table'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Alexandre Bounine <alexandre.bounine@idt.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      97ef6f74
    • L
      Revert "cpusets: randomize node rotor used in cpuset_mem_spread_node()" · 35926ff5
      Linus Torvalds 提交于
      This reverts commit 0ac0c0d0, which
      caused cross-architecture build problems for all the wrong reasons.
      IA64 already added its own version of __node_random(), but the fact is,
      there is nothing architectural about the function, and the original
      commit was just badly done. Revert it, since no fix is forthcoming.
      Requested-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      35926ff5
  10. 30 5月, 2010 2 次提交
  11. 29 5月, 2010 1 次提交
  12. 28 5月, 2010 13 次提交
    • N
      fs: introduce new truncate sequence · 7bb46a67
      npiggin@suse.de 提交于
      Introduce a new truncate calling sequence into fs/mm subsystems. Rather than
      setattr > vmtruncate > truncate, have filesystems call their truncate sequence
      from ->setattr if filesystem specific operations are required. vmtruncate is
      deprecated, and truncate_pagecache and inode_newsize_ok helpers introduced
      previously should be used.
      
      simple_setattr is introduced for simple in-ram filesystems to implement
      the new truncate sequence. Eventually all filesystems should be converted
      to implement a setattr, and the default code in notify_change should go
      away.
      
      simple_setsize is also introduced to perform just the ATTR_SIZE portion
      of simple_setattr (ie. changing i_size and trimming pagecache).
      
      To implement the new truncate sequence:
      - filesystem specific manipulations (eg freeing blocks) must be done in
        the setattr method rather than ->truncate.
      - vmtruncate can not be used by core code to trim blocks past i_size in
        the event of write failure after allocation, so this must be performed
        in the fs code.
      - convert usage of helpers block_write_begin, nobh_write_begin,
        cont_write_begin, and *blockdev_direct_IO* to use _newtrunc postfixed
        variants. These avoid calling vmtruncate to trim blocks (see previous).
      - inode_setattr should not be used. generic_setattr is a new function
        to be used to copy simple attributes into the generic inode.
      - make use of the better opportunity to handle errors with the new sequence.
      
      Big problem with the previous calling sequence: the filesystem is not called
      until i_size has already changed.  This means it is not allowed to fail the
      call, and also it does not know what the previous i_size was. Also, generic
      code calling vmtruncate to truncate allocated blocks in case of error had
      no good way to return a meaningful error (or, for example, atomically handle
      block deallocation).
      
      Cc: Christoph Hellwig <hch@lst.de>
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      7bb46a67
    • C
      rename the generic fsync implementations · 1b061d92
      Christoph Hellwig 提交于
      We don't name our generic fsync implementations very well currently.
      The no-op implementation for in-memory filesystems currently is called
      simple_sync_file which doesn't make too much sense to start with,
      the the generic one for simple filesystems is called simple_fsync
      which can lead to some confusion.
      
      This patch renames the generic file fsync method to generic_file_fsync
      to match the other generic_file_* routines it is supposed to be used
      with, and the no-op implementation to noop_fsync to make it obvious
      what to expect.  In addition add some documentation for both methods.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1b061d92
    • C
      drop unused dentry argument to ->fsync · 7ea80859
      Christoph Hellwig 提交于
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      7ea80859
    • A
      get rid of the magic around f_count in aio · d7065da0
      Al Viro 提交于
      __aio_put_req() plays sick games with file refcount.  What
      it wants is fput() from atomic context; it's almost always
      done with f_count > 1, so they only have to deal with delayed
      work in rare cases when their reference happens to be the
      last one.  Current code decrements f_count and if it hasn't
      hit 0, everything is fine.  Otherwise it keeps a pointer
      to struct file (with zero f_count!) around and has delayed
      work do __fput() on it.
      
      Better way to do it: use atomic_long_add_unless( , -1, 1)
      instead of !atomic_long_dec_and_test().  IOW, decrement it
      only if it's not the last reference, leave refcount alone
      if it was.  And use normal fput() in delayed work.
      
      I've made that atomic_long_add_unless call a new helper -
      fput_atomic().  Drops a reference to file if it's safe to
      do in atomic (i.e. if that's not the last one), tells if
      it had been able to do that.  aio.c converted to it, __fput()
      use is gone.  req->ki_file *always* contributes to refcount
      now.  And __fput() became static.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      d7065da0
    • L
      cpuidle: make cpuidle_curr_driver static · 752138df
      Len Brown 提交于
      cpuidle_register_driver() sets cpuidle_curr_driver
      cpuidle_unregister_driver() clears cpuidle_curr_driver
      
      We should't expose cpuidle_curr_driver to
      potential modification except via these interfaces.
      So make it static and create cpuidle_get_driver() to observe it.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      752138df
    • R
      mfd: New AB8500 driver · 62579266
      Rabin Vincent 提交于
      Add a new driver to support the AB8500 Power Management chip, replacing
      the current AB4500.  The new driver replaces the old one, instead of an
      incremental modification, because this is a substantial overhaul
      including:
      
       - Split of the driver into -core and -spi portions, to allow another
         interface layer to be added
      
       - Addition of interrupt support
      
       - Switch to MFD core API for handling subdevices
      
       - Simplification of the APIs to remove a redundant block parameter
      
       - Rename of the APIs and macros from ab4500_* to ab8500_*
      
       - Rename of the files from ab4500* to ab8500*
      
       - Change of the driver name from ab4500 to ab8500
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Acked-by: NSrinidhi Kasagar <srinidhi.kasagar@stericsson.com>
      Signed-off-by: NRabin Vincent <rabin.vincent@stericsson.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      62579266
    • M
      mfd: AB3100 register access change to abx500 API · fa661258
      Mattias Wallin 提交于
      The interface for the AB3100 is changed to make way for the
      ABX500 family of chips: AB3550, AB5500 and future ST-Ericsson
      Analog Baseband chips. The register access functions are moved
      out to a separate struct abx500_ops. In this way the interface
      is moved from the implementation and the sub functionality drivers
      can keep their interface intact when chip infrastructure and
      communication mechanisms changes. We also define the AB3550
      device IDs and the AB3550 platform data struct and convert
      the catenated 32bit event to an array of 3 x 8bits.
      Signed-off-by: NMattias Wallin <mattias.wallin@stericsson.com>
      Signed-off-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      fa661258
    • L
      mfd: Renamed ab3100.h to abx500.h · 812f9e9d
      Linus Walleij 提交于
      The goal here is to make way for a more general interface for the
      analog baseband chips ab3100 ab3550 ab550 and future chips.
      
      This patch have been divided into two parts since both changing name
      and content of a file is not recommended in git.
      Signed-off-by: NMattias Wallin <mattias.wallin@stericsson.com>
      Signed-off-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      812f9e9d
    • R
      mfd: Add Toshiba's TC35892 MFD core · b4ecd326
      Rabin Vincent 提交于
      The TC35892 I/O Expander provides 24 GPIOs, a keypad controller, timers,
      and a rotator wheel interface.  This patch adds the MFD core.
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NRabin Vincent <rabin.vincent@stericsson.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      b4ecd326
    • M
      mfd: Ensure WM831x charger interrupts are acknowledged when suspending · b03b4d7c
      Mark Brown 提交于
      The charger interrupts on the WM831x are unconditionally a wake source
      for the system. If the power driver is not able to monitor them (for
      example, due to the IRQ line not having been wired up on the system)
      then any charger interrupt will prevent the system suspending for any
      meaningful amount of time since nothing will ack them.
      
      Avoid this issue by manually acknowledging these interrupts when we
      suspend the WM831x core device if they are masked. If software is
      actually using the interrupts then they will be unmasked and this
      change will have no effect.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      b03b4d7c
    • T
      input: Touchscreen driver for TPS6507x · 75259966
      Todd Fischer 提交于
      Add touch screen input driver for TPS6507x family of multi-function
      chips.  Uses the TPS6507x MFD driver.  No interrupt support due to
      testing limitations of current hardware.
      Signed-off-by: NTodd Fischer <todd.fischer@ridgerun.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      75259966
    • T
      mfd: Add TPS6507x support · 31dd6a26
      Todd Fischer 提交于
      TPS6507x are multi function (PM, touchscreen) chipsets from TI.
      This commit also changes the corresponding regulator driver from being
      standalone to an MFD subdevice.
      Signed-off-by: NTodd Fischer <todd.fischer@ridgerun.com>
      Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      31dd6a26
    • T
      mfd: Add tps6507x board data structure · 0bc20bba
      Todd Fischer 提交于
      Add mfd structure which refrences sub-driver initialization data. For example,
      for a giving hardware implementation, the voltage regulator sub-driver
      initialization data provides the mapping betten a voltage regulator and what
      the output voltage is being used for.
      Signed-off-by: NTodd Fischer <todd.fischer@ridgerun.com>
      Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      0bc20bba