mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* "layered" block devices and deadlock problems
@ 2002-03-07  9:13 Andy Tai
  2002-03-07  9:53 ` Joe Thornber
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Tai @ 2002-03-07  9:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: atai

Hi, I have been trying to write a kernel driver for a
"layered" block device, that is, a virtual device
which sits on top of actual physical devices and
redirects read/write requests to them.  To avoid
problems in the interrupt context I save the requests
in a queue in the request function and have a kernel
thread pulling the requests out of the queue and then
in turn calling read() or write() functions of the
physical block device.

However, I keep running into deadlocks.  Sometimes the
kernel thread will hang on waiting for free request
structures.  Other times it will hang in
wait_for_buffer() in buffer.c.  In both cases  the
system won't respond to any new shell commands I typed
in.  (But existing processes like xosview and top
continue to run) Since I am not familiar with the
internal workings of the buffer cache, can anyone give
me hints on how to avoid deadlocks in layered drivers?
 Or pointers to useful documentation for this kind of
tasks are also appreciated.  

Thanks.


__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-03-07  9:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-07  9:13 "layered" block devices and deadlock problems Andy Tai
2002-03-07  9:53 ` Joe Thornber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®