Re: lock contention problem?
Hans Petter Selasky <[email protected]> Thu, 13 Jan 2011 22:24:54 +0100
| Newsgroups | gmane.os.freebsd.devel.usb,gmane.os.freebsd.devel.firewire,gmane.os.freebsd.questions |
|---|---|
| Message-ID | <[email protected]> |
On Thursday 13 January 2011 21:28:15 [email protected] wrote: > I suspect that I have a problem with lock/mutex contention. > Reading from a USB disk appears to lock out the firewire driver > for too long, causing data transfer (writing to firewire bus) to fail > with EAGAIN. Once it fails it does not recover. > > kernel: fwohci1: IT DMA underrun (0x40308011) (stat & > OHCI_CNTL_CYCMATCH_S) > last message repeated 63 times > This is from the end of the fwohci_itxbuf_enable() function in > dev/firewire/fwohci.c > > I added LOCK_PROFILING to the kernel and gathered some data. > The data is quite verbose, so I sorted by "max" and am including > the first 40 lines. This is a true real-time task, so I am concerned > with the worst case rather than the average. > Hi, It might be a hardware resource starvation problem. It is possible to nice umass by simply adding a line like: .interval = 2, /* 2 milliseconds */ Inside the following structure in /sys/dev/usb/storage/umass.c : umass_bbb_config[] In states: UMASS_T_BBB_DATA_WRITE UMASS_T_BBB_DATA_READ Another idea: http://svn.freebsd.org/changeset/base/217350 --HPS