Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jan 2005 14:18:18 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-smp@FreeBSD.org
Cc:        kris@obsecurity.org
Subject:   Re: Lost interrupts on SMP systems
Message-ID:  <200501141418.18587.jhb@FreeBSD.org>
In-Reply-To: <E1CpVwy-0007cZ-00.pvtrifonov-mail-ru@mx1.mail.ru>
References:  <E1CpVwy-0007cZ-00.pvtrifonov-mail-ru@mx1.mail.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 14 January 2005 01:17 pm, Peter Trifonov wrote:
> Hello John,
>
> > > I have found two similar problem reports:
> > > http://www.freebsd.org/cgi/query-pr.cgi?pr=i386/40274
> > > http://www.freebsd.org/cgi/query-pr.cgi?pr=i386/43852
> > > Some other bug reports also mention "device timeout", but
> >
> > they seem to
> >
> > > differ considerably from my case.
> >
> > Those two bug reports tend to focus on fxp(4) though and you
> > have xl(4) cards.
>
> I had the same problem with fxp's.  Initially I though that it was fxp
> driver problem (because xl0 worked fine),
> so I have replaced Intel NICs with 3COM ones, but nothing has changed. From
> this I guess that the problem is not in the NIC drivers.

Ok.

> > I've gone ahead and committed the fix for the MPTable global
> > entries btw.  I don't think there is a routing or edge/level
> > problem though because the devices do work until you do a
> > ping flood.  One thing we can try is that Linux has a
>
> IMPORTANT: I can do flood ping over either of them without any problems (at
> least, if the system is booted with -p -v, I don't know why).
> They break down ONLY if flood ping is SIMULTANEOUSLY  performed over both
> of them.

More interrupt load that way, which would indicate maybe the bug Linux tries 
to work around except that your intpins are edge triggered. :(

> > workaround for an undocumented errata in at least some older
> > I/O APICs where a level triggered interrupt can accidentally
> > be delivered as edge triggered and end up not being properly
> > acknowledged.  However, you don't have any level triggered
> > interrupts, so I'm not sure that is applicable.
>
> Please let me know how can I help you with this problem.

I've included a little test program below that you can run as root to do 
arbitrary port reads (inb).  Please compile it and mail me the output of:

inb 0x4d0
inb 0x4d1

Thanks.

#include <err.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <vis.h>

#include <machine/cpufunc.h>

int
main(int ac, char **av)
{
	char repr[5];
	char *cp;
	int fd, port, value;

	if (ac != 2)
		errx(1, "A single argument is required.");
	port = strtoul(av[1], &cp, 0);
	if (*cp != '\0' || port < 0 || port > 65535)
		errx(1, "Invalid port number %s.", av[1]);
	fd = open("/dev/io", O_RDONLY);
	if (fd < 0)
		err(1, "Failed to open /dev/io");
	value = inb(port);
	close(fd);
	vis(repr, value, VIS_NL | VIS_NOSLASH, 0);
	printf("inb(%s) = 0x%x = %dd = '%s'\n", av[1], value, value, repr);
	return (0);
}

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501141418.18587.jhb>