Sleeping in block device driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there...
  I am writing a network block device driver.  In the
request function, when I get a READ command, I have to
send a message to a remote machine and get the data
from there.  This takes considerable time duration. 
So, I need to make that device driver sleep.  The
reception of data is done in another thread.
  I have tried different ways, all in vain.  I tried
wait_event_interruptible(...) followed by condition
set and wake_up(...) when I want to wake up.  
  I also tried to have a variable along with a while
loop to indicate whether the request function should
loop or come out of the loop. 
  I have also tried interruptible_sleep_on(...) and
clones.  I cannot use
interruptible_sleep_on_timeout(...) because the
network latency is not known before hand.  
  These all things give kernel oops and make the
kernel unstable.  
   
   Can anyone please tell me how to make a block
device driver sleep and then wake it up from another
thread in the kernel. 
   
   Please help...its urgent....

   TIA.

   Pooja.

________________________________________________________________________
Looking for a job?  Visit Yahoo! India Careers
      Visit http://in.careers.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux