Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jul 1996 11:29:26 +0200 (MET DST)
From:      Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
To:        hackers@freebsd.org
Subject:   polling driver
Message-ID:  <199607080929.LAA05179@angrand.prism.uvsq.fr>

next in thread | raw e-mail | index | archive | help

My ZIP driver freezes the system because it polls scsi requests (the
drive is connected to the // port). There is no way to make the drive
generate interrupts.

Then I though about something like software interrupts, timeouts or
tsleep()...

Not a good idea. Processes which request the drive simultaneously
enter in deadlock. One waits on channel "getblk" the other on
"msdhgt".

Surely, doing a tsleep() in a driver is a bad idea... I think
resources are not well locked before the drive-dependent scsi_cmd()
routine is called because the process is supposed to keep the CPU
during the call and return without being interrupted.

Timeouts are not good either because they interrupt the CPU at a high
level (>splbio) and the callback is executed at a very low level.

Please, tell me if I'm wrong.

If I could find the reason of the deadlock, I could try to fix the
problem...

Any idea would be very appreciated.

nicolas

-- 
Nicolas.Souchu@prism.uvsq.fr
Laboratoire PRiSM - Versailles, FRANCE




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