Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jan 2011 22:24:54 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-usb@freebsd.org
Cc:        freebsd-firewire@freebsd.org, freebsd-questions@freebsd.org, dieterbsd@engineer.com
Subject:   Re: lock contention problem?
Message-ID:  <201101132224.54858.hselasky@c2i.net>
In-Reply-To: <8CD81778A4C13E7-17B0-DFA1@web-mmc-d03.sysops.aol.com>
References:  <8CD81778A4C13E7-17B0-DFA1@web-mmc-d03.sysops.aol.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 13 January 2011 21:28:15 dieterbsd@engineer.com 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



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