[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100825.005929.15250658.davem@davemloft.net>
Date: Wed, 25 Aug 2010 00:59:29 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: anton@...ba.org
Cc: netdev@...r.kernel.org, miltonm@....com
Subject: Re: Spurious "TCP: too many of orphaned sockets", unable to
allocate sockets
From: Anton Blanchard <anton@...ba.org>
Date: Wed, 25 Aug 2010 17:16:26 +1000
> We have a machine running a network test that regularly hits:
>
> TCP: too many of orphaned sockets
>
> Which comes from:
>
> int orphan_count = percpu_counter_read_positive(
> sk->sk_prot->orphan_count);
>
> sk_mem_reclaim(sk);
> if (tcp_too_many_orphans(sk, orphan_count)) {
...
> 2. Even with this fixed we could hit the original issue. We have been known to
> test on 1024 thread boxes and we would have the possibility of 32 * 1024
> = 32k slack in the percpu counters. On this box tcp_max_orphans will be
> 64k after the fix which is a bit close for comfort. Should we do anything here?
Solution seems simple, if the too many orphan check triggers, simply
redo the check using the expensive but more accurate per-cpu counter
read (which avoids the skew) to make sure.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists