1. 15 2月, 2009 2 次提交
  2. 10 2月, 2009 5 次提交
  3. 09 2月, 2009 3 次提交
  4. 07 2月, 2009 1 次提交
  5. 06 2月, 2009 2 次提交
    • G
      net: fix some trailing whitespaces · fe2918b0
      Graf Yang 提交于
      Signed-off-by: NGraf Yang <graf.yang@analog.com>
      Signed-off-by: NBryan Wu <cooloney@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe2918b0
    • H
      tun: Limit amount of queued packets per device · 33dccbb0
      Herbert Xu 提交于
      Unlike a normal socket path, the tuntap device send path does
      not have any accounting.  This means that the user-space sender
      may be able to pin down arbitrary amounts of kernel memory by
      continuing to send data to an end-point that is congested.
      
      Even when this isn't an issue because of limited queueing at
      most end points, this can also be a problem because its only
      response to congestion is packet loss.  That is, when those
      local queues at the end-point fills up, the tuntap device will
      start wasting system time because it will continue to send
      data there which simply gets dropped straight away.
      
      Of course one could argue that everybody should do congestion
      control end-to-end, unfortunately there are people in this world
      still hooked on UDP, and they don't appear to be going away
      anywhere fast.  In fact, we've always helped them by performing
      accounting in our UDP code, the sole purpose of which is to
      provide congestion feedback other than through packet loss.
      
      This patch attempts to apply the same bandaid to the tuntap device.
      It creates a pseudo-socket object which is used to account our
      packets just as a normal socket does for UDP.  Of course things
      are a little complex because we're actually reinjecting traffic
      back into the stack rather than out of the stack.
      
      The stack complexities however should have been resolved by preceding
      patches.  So this one can simply start using skb_set_owner_w.
      
      For now the accounting is essentially disabled by default for
      backwards compatibility.  In particular, we set the cap to INT_MAX.
      This is so that existing applications don't get confused by the
      sudden arrival EAGAIN errors.
      
      In future we may wish (or be forced to) do this by default.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      33dccbb0
  6. 05 2月, 2009 5 次提交
  7. 03 2月, 2009 6 次提交
    • F
      connector: create connector workqueue only while needed once · 1a5645bc
      Frederic Weisbecker 提交于
      The netlink connector uses its own workqueue to relay the datas sent
      from userspace to the appropriate callback.  If you launch the test
      from Documentation/connector and change it a bit to send a high flow
      of data, you will see thousands of events coming to the "cqueue"
      workqueue by looking at the workqueue tracer.
      
      This flow of events can be sent very quickly. So, to not encumber the
      kevent workqueue and delay other jobs, the "cqueue" workqueue should
      remain.
      
      But this workqueue is pointless most of the time, it will always be
      created (assuming you have built it of course) although only
      developpers with specific needs will use it.
      
      So avoid this "most of the time useless task", this patch proposes to
      create this workqueue only when needed once.  The first jobs to be
      sent to connector callbacks will be sent to kevent while the "cqueue"
      thread creation will be scheduled to kevent too.
      
      The following jobs will continue to be scheduled to keventd until the
      cqueue workqueue is created, and then the rest of the jobs will
      continue to perform as usual, through this dedicated workqueue.
      
      Each time I tested this patch, only the first event was sent to
      keventd, the rest has been sent to cqueue which have been created
      quickly.
      
      Also, this patch fixes some trailing whitespaces on the connector files.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a5645bc
    • T
      libata: implement HORKAGE_1_5_GBPS and apply it to WD My Book · 9062712f
      Tejun Heo 提交于
      3Gbps is often much more prone to transmission failures.  It's usually
      okay to let EH handle speed down after transmission failures but some
      WD My Book drives completely shutdown after certain transmission
      failures and after it only power cycling can revive them.  Combined
      with the fact that external drives often end up with cable assembly
      which is longer than usual and more likely to have intervening gender,
      this makes these drives very likely to shutdown under certain
      configurations virtually rendering them unusable.
      
      This patch implements HOARKGE_1_5_GBPS and applies it to WD My Book
      such that 1.5Gbps is forced once the device is identified.
      
      Please take a look at the following bz for related reports.
      
        http://bugzilla.kernel.org/show_bug.cgi?id=9913Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      9062712f
    • T
      libata: clear dev->ering in smarter way · 99cf610a
      Tejun Heo 提交于
      dev->ering used to be cleared together with the rest of ata_device in
      ata_dev_init() which is called whenever a probing event occurs.
      dev->ering is about to be used to track probing failures so it needs
      to remain persistent over multiple porbing events.  This patch
      achieves this by doing the following.
      
      * Instead of CLEAR_OFFSET, define CLEAR_BEGIN and CLEAR_END and only
        clear between BEGIN and END.  ering is moved after END.  The split
        of persistent area is to allow hotter items remain at the head.
      
      * ering is explicitly cleared on ata_dev_disable() and when device
        attach succeeds.  So, ering is persistent throug a device's life
        time (unless explicitly cleared of course) and also through periods
        inbetween disablement of an attached device and successful detection
        of the next one.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      99cf610a
    • S
      ide/libata: fix ata_id_is_cfa() (take 4) · 2999b58b
      Sergei Shtylyov 提交于
      When checking for the CFA feature set support, ata_id_is_cfa() tests bit 2 in
      word 82 of the identify data instead the word 83;  it also checks the ATA/PI
      version support in the word 80 (which the CompactFlash specifications have as
      reserved), this having no slightest chance to work on the modern CF cards that
      don't have 0x848A in the word 0...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      2999b58b
    • E
      modules: Use a better scheme for refcounting · 720eba31
      Eric Dumazet 提交于
      Current refcounting for modules (done if CONFIG_MODULE_UNLOAD=y) is
      using a lot of memory.
      
      Each 'struct module' contains an [NR_CPUS] array of full cache lines.
      
      This patch uses existing infrastructure (percpu_modalloc() &
      percpu_modfree()) to allocate percpu space for the refcount storage.
      
      Instead of wasting NR_CPUS*128 bytes (on i386), we now use
      nr_cpu_ids*sizeof(local_t) bytes.
      
      On a typical distro, where NR_CPUS=8, shiping 2000 modules, we reduce
      size of module files by about 2 Mbytes. (1Kb per module)
      
      Instead of having all refcounters in the same memory node - with TLB misses
      because of vmalloc() - this new implementation permits to have better
      NUMA properties, since each  CPU will use storage on its preferred node,
      thanks to percpu storage.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      720eba31
    • D
      net: Fix userland breakage wrt. linux/if_tunnel.h · 0afd4a21
      David S. Miller 提交于
      Reported by Andrew Walrond <andrew@walrond.org>
      
      Changeset c19e654d
      ("gre: Add netlink interface") added an include
      of linux/ip.h to linux/if_tunnel.h
      
      We can't really let that get exposed to userspace
      because this conflicts with types defined in netinet/ip.h
      which userland is almost certainly going to have included
      either explicitly or implicitly.
      
      So guard this include with a __KERNEL__ ifdef.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0afd4a21
  8. 02 2月, 2009 4 次提交
  9. 01 2月, 2009 4 次提交
  10. 31 1月, 2009 8 次提交