Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-2.6-rcu into core/rcu

This commit is contained in:
Ingo Molnar 2010-10-07 09:43:11 +02:00
commit d4f8f217b8
730 changed files with 12282 additions and 12169 deletions

View file

@ -268,11 +268,21 @@ static inline int between(__u32 seq1, __u32 seq2, __u32 seq3)
return seq3 - seq2 >= seq1 - seq2;
}
static inline int tcp_too_many_orphans(struct sock *sk, int num)
static inline bool tcp_too_many_orphans(struct sock *sk, int shift)
{
return (num > sysctl_tcp_max_orphans) ||
(sk->sk_wmem_queued > SOCK_MIN_SNDBUF &&
atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2]);
struct percpu_counter *ocp = sk->sk_prot->orphan_count;
int orphans = percpu_counter_read_positive(ocp);
if (orphans << shift > sysctl_tcp_max_orphans) {
orphans = percpu_counter_sum_positive(ocp);
if (orphans << shift > sysctl_tcp_max_orphans)
return true;
}
if (sk->sk_wmem_queued > SOCK_MIN_SNDBUF &&
atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2])
return true;
return false;
}
/* syncookies: remember time of last synqueue overflow */