public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Simon Kirby <sim@netnation.com>
Cc: linux-kernel@vger.kernel.org, linux-net@vger.kernel.org,
	davem@redhat.com
Subject: Re: Longstanding networking / SMP issue? (duplextest)
Date: 20 Feb 2003 08:52:46 +0100	[thread overview]
Message-ID: <p73r8a3xub5.fsf@amdsimf.suse.de> (raw)
In-Reply-To: Simon Kirby's message of "19 Feb 2003 18:49:49 +0100"

Simon Kirby <sim@netnation.com> writes:
> 
> Baffled by this, I did a bunch of testing and tried to narrow down which
> servers were experiencing this problem.  A sweep of some of our server
> blocks showed that only SMP boxes were having the problem; however, not
> all SMP boxes were affected.

That's probably because of the lazy ICMP socket locking used for the
ICMP socket. When an ICMP is already in process the next ICMP triggered
from a softirq (e.g. ECHO-REQUEST) is dropped  
(see net/ipv4/icmp_xmit_lock_bh())

There is also a similar problem with ICMPs getting passed to an TCP socket.
When the socket is already locked it is dropped. You can check for 
the later by looking at the LockDroppedIcmps counter in netstat -s

I guess it would be useful to cover the first drop case in that counter
too, try this untested patch and then check the counter in netstat -s.

--- linux-2.4.20/net/ipv4/icmp.c-o	2002-08-03 02:39:46.000000000 +0200
+++ linux-2.4.20/net/ipv4/icmp.c	2003-02-20 08:51:21.000000000 +0100
@@ -196,8 +196,10 @@
 static int icmp_xmit_lock_bh(void)
 {
 	if (!spin_trylock(&icmp_socket->sk->lock.slock)) {
-		if (icmp_xmit_holder == smp_processor_id())
+		if (icmp_xmit_holder == smp_processor_id()) {
+			NET_INC_STATS_BH(LockDroppedIcmps)
 			return -EAGAIN;
+		}
 		spin_lock(&icmp_socket->sk->lock.slock);
 	}
 	icmp_xmit_holder = smp_processor_id();



-Andi


       reply	other threads:[~2003-02-20  7:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030219174757.GA5373@netnation.com.suse.lists.linux.kernel>
2003-02-20  7:52 ` Andi Kleen [this message]
2003-02-20  7:38   ` Longstanding networking / SMP issue? (duplextest) David S. Miller
2003-02-20  9:20   ` Simon Kirby
2003-02-20  9:34     ` Andi Kleen
2003-02-20 10:12       ` dada1
2003-02-20 10:54         ` Andi Kleen
2003-02-20 11:03           ` dada1
2003-02-21  4:24       ` David S. Miller
2003-02-21  7:27         ` Andi Kleen
2003-02-21  9:43           ` David S. Miller
2003-02-21 10:22             ` Andi Kleen
2003-02-21 10:11               ` David S. Miller
2003-02-21 10:45                 ` Andi Kleen
2003-02-23  9:12                   ` David S. Miller
2003-02-23 10:02                     ` Christoph Hellwig
2003-02-23  9:55                       ` David S. Miller
2003-02-23 10:30                         ` Andi Kleen
2003-02-23 10:23                           ` David S. Miller
2003-02-23 10:37                           ` Christoph Hellwig
2003-02-23  9:58                       ` David S. Miller
2003-02-21 15:15       ` Bill Davidsen
2003-02-19 17:47 Simon Kirby
2003-02-19 21:17 ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=p73r8a3xub5.fsf@amdsimf.suse.de \
    --to=ak@suse.de \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    --cc=sim@netnation.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox