1. 20 10月, 2011 4 次提交
    • E
      net: Move rcu_barrier from rollback_registered_many to netdev_run_todo. · 850a545b
      Eric W. Biederman 提交于
      This patch moves the rcu_barrier from rollback_registered_many
      (inside the rtnl_lock) into netdev_run_todo (just outside the rtnl_lock).
      This allows us to gain the full benefit of sychronize_net calling
      synchronize_rcu_expedited when the rtnl_lock is held.
      
      The rcu_barrier in rollback_registered_many was originally a synchronize_net
      but was promoted to be a rcu_barrier() when it was found that people were
      unnecessarily hitting the 250ms wait in netdev_wait_allrefs().  Changing
      the rcu_barrier back to a synchronize_net is therefore safe.
      
      Since we only care about waiting for the rcu callbacks before we get
      to netdev_wait_allrefs() it is also safe to move the wait into
      netdev_run_todo.
      
      This was tested by creating and destroying 1000 tap devices and observing
      /proc/lock_stat.  /proc/lock_stat reports this change reduces the hold
      times of the rtnl_lock by a factor of 10.  There was no observable
      difference in the amount of time it takes to destroy a network device.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      850a545b
    • E
      tcp: use TCP_INIT_CWND in tcp_fixup_sndbuf() · 06a59ecb
      Eric Dumazet 提交于
      Initial cwnd being 10 (TCP_INIT_CWND) instead of 3, change
      tcp_fixup_sndbuf() to get more than 16384 bytes (sysctl_tcp_wmem[1]) in
      initial sk_sndbuf
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06a59ecb
    • A
      phylib: Modify Vitesse RGMII skew settings · fddf86fc
      Andy Fleming 提交于
      The Vitesse driver was using the RGMII_ID interface type to determine if
      skew was necessary.  However, we want to move away from using that
      interface type, as it's really a property of the board's PHY connection.
      However, some boards depend on it, so we want to support it, while
      allowing new boards to use the more flexible "fixups" approach.  To do
      this, we extract the code which adds skew into its own function, and
      call that function when RGMII_ID has been selected.
      
      Another side-effect of this change is that if your PHY has skew set
      already, it doesn't clear it.  This way, the fixup code can modify the
      register without config_init then clearing it.
      Signed-off-by: NAndy Fleming <afleming@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fddf86fc
    • A
      net: Allow skb_recycle_check to be done in stages · 3d153a7c
      Andy Fleming 提交于
      skb_recycle_check resets the skb if it's eligible for recycling.
      However, there are times when a driver might want to optionally
      manipulate the skb data with the skb before resetting the skb,
      but after it has determined eligibility.  We do this by splitting the
      eligibility check from the skb reset, creating two inline functions to
      accomplish that task.
      Signed-off-by: NAndy Fleming <afleming@freescale.com>
      Acked-by: NDavid Daney <david.daney@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d153a7c
  2. 19 10月, 2011 24 次提交
  3. 18 10月, 2011 12 次提交