usb/156596: [ehci] Extremely high interrupt rate on ehci/uhci IRQ16 80% cpu utilization on CPU0

Colin Percival cperciva at freebsd.org
Sat Jul 9 00:30:14 UTC 2011


The following reply was made to PR usb/156596; it has been noted by GNATS.

From: Colin Percival <cperciva at freebsd.org>
To: bug-followup at FreeBSD.org, Hans Petter Selasky <hselasky at freebsd.org>
Cc:  
Subject: Re: usb/156596: [ehci] Extremely high interrupt rate on ehci/uhci
 IRQ16 80% cpu utilization on CPU0
Date: Fri, 08 Jul 2011 17:26:37 -0700

 This is a multi-part message in MIME format.
 --------------060902060404020901000206
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 Hi again,
 
 The attached patch seems to fix the problem while not breaking anything on my
 laptop.  It makes handles the case of EHCI_REMOVE_QH(sqh, last) with sqh == last
 and sqh->prev == NULL by setting last = NULL -- the idea being that if sqh is
 the only entry in the queue, we still ought to delete it even though it doesn't
 have a predecessor.
 
 I have no idea if this is correct, since I don't know the rest of the code in
 this file.  Maybe we should also delete the first entry in a queue even when it
 isn't also the last entry; maybe the problem lies somewhere else entirely.  I'm
 hoping that someone who knows this code will be able to figure out the right
 fix easily now that I have an apparently-working hack.
 
 -- 
 Colin Percival
 Security Officer, FreeBSD | freebsd.org | The power to serve
 Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid
 
 
 --------------060902060404020901000206
 Content-Type: text/x-patch;
  name="ehci.c.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="ehci.c.diff"
 
 --- sys/dev/usb/controller/ehci.c.orig	2011-07-08 16:48:10.000000000 +0000
 +++ sys/dev/usb/controller/ehci.c	2011-07-08 16:49:18.000000000 +0000
 @@ -1177,7 +1177,9 @@
  		sqh->prev = 0;
  
  		usb_pc_cpu_flush(sqh->page_cache);
 -	}
 +	} else if (last == sqh)
 +		last = NULL;
 +
  	return (last);
  }
  
 
 --------------060902060404020901000206--


More information about the freebsd-usb mailing list