LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 09-27-2003, 12:57 AM   #1
devershetty
LQ Newbie
 
Registered: Jun 2003
Location: Gangavathi, Karnataka(state), INDIA
Distribution: Redhat 7.3
Posts: 28

Rep: Reputation: 15
few problems in my driver


Hello

I am stuck with few problems in my device driver in linux.
1. Among other things in my make_request() function , I need to write a fixed sector of a partition with size 8K bytes ,
i have device number, size in bytes, new data to write and i have own buffer_head in one of my private structure.
i will use this buffer_head to write to a disk..saying this i need not use getblk(), get_unused_buffer() to retrive any free buffer_head because i have my own. How to do this. Any pointers, sample driver code, links will be greatly helpfull to me..

2. In my make_request(), i usually clone each incoming buffer_heads in to my private array of buffer_heads to submit this equest to low level driver say IDE,SCSI..etc. If incoming buffer_head request is so fast, i will exhaust my private array of buffer_heads. In this case what should i do.
I have tried following.
a. queue when i exhaust my private array,and sumit it again when i get free buffer_heads in b_end_io() context.
but it is bad to use generic_make_request() at b_end_io() context( because this is interrupt context).
b.since b_end_io context is an interreupt context, i tried using kernel_threads waking up it up when there are free buffer_head in my private array.
but this has very low performance and does not work properly.

Plese guide me in this regard. I am sorry if this is wrong place of my post.

-Kotresh.
 
Old 10-03-2003, 08:06 AM   #2
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Rep: Reputation: 56
Re: few problems in my driver

Quote:
Originally posted by devershetty
I am sorry if this is wrong place of my post.
-Kotresh.
It is, and I am recommending to the moderator that it be moved to the Programming forum.
 
Old 10-04-2003, 06:06 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,408

Rep: Reputation: 108Reputation: 108
Moved to Programming.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Driver Problems mechlar Fedora 1 06-28-2005 09:22 AM
Driver Problems megadeth Linux - Software 0 04-29-2005 07:28 PM
nvidia instalation problems / Sblive driver problems Colonel-1990 Linux - Software 13 02-14-2005 05:48 PM
driver problems magwa Linux - Hardware 1 12-20-2004 03:50 AM
Ethernet Adsl Modem Driver Problems And Install Problems... akhilnair Linux - Hardware 12 11-28-2004 08:19 AM


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

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration