Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-08-2003, 03:45 AM   #1
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)


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.

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.



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 12:35 PM
What does the call kernel_thread() do. asurya Programming 1 04-20-2005 12:32 PM
Design question blmack44 Linux - Hardware 1 08-22-2004 11:05 AM
How to use BH_PrivateStart (struct buffer_head) devershetty Linux - Newbie 0 07-03-2003 10:59 PM
Database Design Question oulevon Programming 4 09-12-2001 05:38 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:49 PM.

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