Date: Fri, 09 Feb 2001 17:36:19 +0000 From: Brian Somers <brian@Awfulhak.org> To: John Baldwin <jhb@FreeBSD.ORG> Cc: Chuck Paterson <cp@bsdi.com>, freebsd-arch@FreeBSD.ORG, brian@Awfulhak.org Subject: Re: usb, clists, spltty, splbio Message-ID: <200102091736.f19HaJN01324@hak.lan.Awfulhak.org> In-Reply-To: Message from John Baldwin <jhb@FreeBSD.ORG> of "Thu, 08 Feb 2001 21:14:08 PST." <XFMail.010208211408.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> > On 09-Feb-01 Chuck Paterson wrote: > > > > I have been mucking with making moused talk to a usb joystick. > > This all turned out pretty straight forward, all user land code in > > moused talking to the hid device. The problem is that the kernel > > crashes randomly, more often as the system get more loaded. A couple > > of times I got a panic in the clist code, but it really didn't > > show anything direct. Oh yah, this is with stable, not current. > > > > Reading through the code I found what looks like a problem. > > The hid, and other usb code use clists. The various usb code is > > protected by splusb which is a defined as splbio. The function > > b_to_q() and all the other clist code use spltty. > > > > I changed the definition of spltty from > > > > GENSPL(spltty, |=, tty_imask, > 14) > > > > to > > > > GENSPL(spltty, |=, tty_imask | bio_imask, > 14) > > > > and the crashes appear to have gone away. I say appear, it has run > > longer now than it has before, but it hasn't been up much more than > > twice as long yet. > > > > I am not quite sure the best way to deal with this. The only > > idea I have thought of that I like at all is to create a splclist() > > which is the or of tty and bio and put that into the code that > > mucks with clists, perhaps just the allocation/free routines. > > We have a similar problem with the slip and ppp devices, which have > run code under botth spltty and splnet. The trick we use there is > to actually change the imasks by doing something along the lines of: > > net_mask |= tty_imask; > tty_imask = net_imask; > > So there is at least prior precedent for doing this sort of thing. Hmm. I would think that Chucks' idea has the advantage that it doesn't adversely affect existing splnet/spltty code. Despite this only mattering for a finite amount of time, I don't think the precedent is good here :-/ > > Comments > > Chuck > > > -- > > John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ > PGP Key: http://www.Baldwin.cx/~john/pgpkey.asc > "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102091736.f19HaJN01324>