Re: lock contention problem?

2011-01-14 Thread dieterbsd
It might be a hardware resource starvation problem. It is possible to 

nice

umass by simply adding a line like:

   .interval = 2,/* 2 milliseconds */


Thanks, but it didn't help.  Also tried setting it to 1, 4, and 20.


http://svn.freebsd.org/changeset/base/217350


Is this supposed to work for 8.0?  Is there more to it than a
couple line change in a .h file?

/usr/src/sys/dev/usb/controller/usb_controller.c: In function 
'usb_attach_sub':
/usr/src/sys/dev/usb/controller/usb_controller.c:434: warning: implicit 
declaration of function 'PI_SWI'
/usr/src/sys/dev/usb/controller/usb_controller.c:434: warning: nested 
extern declaration of 'PI_SWI'


I'm feeding "fwcontrol -u 1 -S /dev/stdin" from a pipe.   The write()
to the pipe took over a second.  Perhaps connected to the lock 
contention

of over a second?  The EAGAIN comes from the writev() roughly 20 lines
from the end of /usr/src/usr.sbin/fwcontrol/fwdv.c.

CPU is 98% idle.  Data rate is only 3.4 MiB/second.


___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: lock contention problem?

2011-01-13 Thread Hans Petter Selasky
On Thursday 13 January 2011 21:28:15 dieter...@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
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"