Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78760
b: refs/heads/master
c: 9993e7d
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jan 28, 2008
1 parent 267db22 commit db1101b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e186932b3d26bd975022a1e254407e95dddceae7
refs/heads/master: 9993e7d313e80bdc005d09c7def91903e0068f07
8 changes: 8 additions & 0 deletions trunk/include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,14 @@ static inline void sk_mem_reclaim(struct sock *sk)
__sk_mem_reclaim(sk);
}

static inline void sk_mem_reclaim_partial(struct sock *sk)
{
if (!sk_has_account(sk))
return;
if (sk->sk_forward_alloc > SK_MEM_QUANTUM)
__sk_mem_reclaim(sk);
}

static inline void sk_mem_charge(struct sock *sk, int size)
{
if (!sk_has_account(sk))
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/tcp_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static void tcp_delack_timer(unsigned long data)
goto out_unlock;
}

sk_mem_reclaim(sk);
sk_mem_reclaim_partial(sk);

if (sk->sk_state == TCP_CLOSE || !(icsk->icsk_ack.pending & ICSK_ACK_TIMER))
goto out;
Expand Down

0 comments on commit db1101b

Please sign in to comment.