diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-11-08 15:28:05 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-11-08 15:28:05 -0500 |
commit | bad97817dece759dd6c0b24f862b7d0ed588edda (patch) | |
tree | fcabaa3ae3e2f17236135e60dc875f47e852cc6d /net/ipv4/tcp_output.c | |
parent | 6fe19278ffebdd57e5c5ec10275e6d423404364e (diff) | |
parent | 61e6cfa80de5760bbe406f4e815b7739205754d2 (diff) |
Merge tag 'v3.12-rc5' into stable/for-linus-3.13
Linux 3.12-rc5
Because the Stefano branch (for SWIOTLB ARM changes) is based on that.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* tag 'v3.12-rc5': (550 commits)
Linux 3.12-rc5
watchdog: sunxi: Fix section mismatch
watchdog: kempld_wdt: Fix bit mask definition
watchdog: ts72xx_wdt: locking bug in ioctl
ARM: exynos: dts: Update 5250 arch timer node with clock frequency
parisc: let probe_kernel_read() capture access to page zero
parisc: optimize variable initialization in do_page_fault
parisc: fix interruption handler to respect pagefault_disable()
parisc: mark parisc_terminate() noreturn and cold.
parisc: remove unused syscall_ipi() function.
parisc: kill SMP single function call interrupt
parisc: Export flush_cache_page() (needed by lustre)
vfs: allow O_PATH file descriptors for fstatfs()
ext4: fix memory leak in xattr
ARC: Ignore ptrace SETREGSET request for synthetic register "stop_pc"
ALSA: hda - Sony VAIO Pro 13 (haswell) now has a working headset jack
ALSA: hda - Add a headset mic model for ALC269 and friends
ALSA: hda - Fix microphone for Sony VAIO Pro 13 (Haswell model)
compiler/gcc4: Add quirk for 'asm goto' miscompilation bug
Revert "i915: Update VGA arbiter support for newer devices"
...
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 7c83cb8bf137..e6bb8256e59f 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -895,8 +895,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, | |||
895 | 895 | ||
896 | skb_orphan(skb); | 896 | skb_orphan(skb); |
897 | skb->sk = sk; | 897 | skb->sk = sk; |
898 | skb->destructor = (sysctl_tcp_limit_output_bytes > 0) ? | 898 | skb->destructor = tcp_wfree; |
899 | tcp_wfree : sock_wfree; | ||
900 | atomic_add(skb->truesize, &sk->sk_wmem_alloc); | 899 | atomic_add(skb->truesize, &sk->sk_wmem_alloc); |
901 | 900 | ||
902 | /* Build TCP header and checksum it. */ | 901 | /* Build TCP header and checksum it. */ |
@@ -1840,7 +1839,6 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, | |||
1840 | while ((skb = tcp_send_head(sk))) { | 1839 | while ((skb = tcp_send_head(sk))) { |
1841 | unsigned int limit; | 1840 | unsigned int limit; |
1842 | 1841 | ||
1843 | |||
1844 | tso_segs = tcp_init_tso_segs(sk, skb, mss_now); | 1842 | tso_segs = tcp_init_tso_segs(sk, skb, mss_now); |
1845 | BUG_ON(!tso_segs); | 1843 | BUG_ON(!tso_segs); |
1846 | 1844 | ||
@@ -1869,13 +1867,20 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, | |||
1869 | break; | 1867 | break; |
1870 | } | 1868 | } |
1871 | 1869 | ||
1872 | /* TSQ : sk_wmem_alloc accounts skb truesize, | 1870 | /* TCP Small Queues : |
1873 | * including skb overhead. But thats OK. | 1871 | * Control number of packets in qdisc/devices to two packets / or ~1 ms. |
1872 | * This allows for : | ||
1873 | * - better RTT estimation and ACK scheduling | ||
1874 | * - faster recovery | ||
1875 | * - high rates | ||
1874 | */ | 1876 | */ |
1875 | if (atomic_read(&sk->sk_wmem_alloc) >= sysctl_tcp_limit_output_bytes) { | 1877 | limit = max(skb->truesize, sk->sk_pacing_rate >> 10); |
1878 | |||
1879 | if (atomic_read(&sk->sk_wmem_alloc) > limit) { | ||
1876 | set_bit(TSQ_THROTTLED, &tp->tsq_flags); | 1880 | set_bit(TSQ_THROTTLED, &tp->tsq_flags); |
1877 | break; | 1881 | break; |
1878 | } | 1882 | } |
1883 | |||
1879 | limit = mss_now; | 1884 | limit = mss_now; |
1880 | if (tso_segs > 1 && !tcp_urg_mode(tp)) | 1885 | if (tso_segs > 1 && !tcp_urg_mode(tp)) |
1881 | limit = tcp_mss_split_point(sk, skb, mss_now, | 1886 | limit = tcp_mss_split_point(sk, skb, mss_now, |