LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-08-2003, 02:45 AM   #1
devershetty
LQ Newbie
 
Registered: Jun 2003
Location: Gangavathi, Karnataka(state), INDIA
Distribution: Redhat 7.3
Posts: 28

Rep: Reputation: 15
Unhappy Design Question (b_end_io kernel_thread buffer_head queueing)


Hi,

The following logic in my private driver ( top of actual drivers in linux) hangs after some burst of IO's (e.g cvs co) on
device registered by my private driver.Please correct me if any logic wrong.

xxx_make_request()
a. If my private pool of buf structure is empty, queue incoming buffer head in my private global strcture.
b. else
b1. clone incoming buffer_head tomy private buf structure from freelist.
b2. private processing by changing b_rdev/b_end_io
b3. submit request to lowlevel driver calling generic_make_request()
PS: my private buf structure is exactly same as md driver's buf pool ( sorry, struct multipath_bh
refer ~/drivers/md/multipath.c)
xxx_end_request ( my b_end_io() function )a. call b_end_io on orignal buffer,
b. check private global structure if queue of buffer_head"s exists.
if YES , follow steps above i.e b1, b2, and wakeup a thread
step b3, is done in seperate kernel_thread.( becoz generic_make_request should be called in process context , not in b_end_io context)
c. if NO give back the private buf structure to freelist.

TIA,
Kotresh.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux for Graphic Design, web design, and publishing maelstrom209 Linux - Software 8 07-17-2011 11:35 AM
What does the call kernel_thread() do. asurya Programming 1 04-20-2005 11:32 AM
Design question blmack44 Linux - Hardware 1 08-22-2004 10:05 AM
How to use BH_PrivateStart (struct buffer_head) devershetty Linux - Newbie 0 07-03-2003 09:59 PM
Database Design Question oulevon Programming 4 09-12-2001 04:38 PM


All times are GMT -5. The time now is 04:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration