LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
 
Search this Thread
Old 01-06-2005, 08:59 PM   #1
j4r0d
LQ Newbie
 
Registered: Sep 2004
Posts: 11

Rep: Reputation: 0
Question kiobuf vs. mmap


hi everyone! i'm trying to research which of the two, kiobuf and mmap, is better to use in DMA. i need info in their advantages and disadvantages.

i was thinking of making a direct access from kernel memory to user memory or vice versa for faster and more efficient data transfer. now, i have kiobuf and mmap to choose from. is there someone who have any experience in using any of these? thank you so in advance for all your help!
 
Old 01-07-2005, 12:16 AM   #2
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
from what i know...mmap is definitely faster but if speed is not an issue..i think kiobuf is also good enough...

good details are there in linux device drivers: chapter 13 mmap & dma
this thread may be of some interest to you:
http://eclipt.uni-klu.ac.at/pipermai...er/000345.html

Last edited by shishir; 01-07-2005 at 12:36 AM.
 
Old 01-07-2005, 02:05 AM   #3
j4r0d
LQ Newbie
 
Registered: Sep 2004
Posts: 11

Original Poster
Rep: Reputation: 0
thanks shishir! i already read the mailing list and chapter 13 of the "linux device drivers" book. It was helpful but I need more specific details like:

1. comparing "kiobuf vs "mmap" in terms of efficiency (no. of copies, overhead, etc)
2. their advantages/disadvantages

hope i could find some details on these. thank you in advance and thanks again to your suggestions!
 
Old 01-07-2005, 05:40 AM   #4
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
i cant tell you readily cos this is what i knew from when i read the book ....but i can dig in and try to get some info by tomorrow..there is no ready material that compares the two approaches...
 
Old 01-07-2005, 07:42 AM   #5
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
http://howtos.linux.com/howtos/SCSI-...O/mmapio.shtml
http://howtos.linux.com/howtos/SCSI-...OWTO/dio.shtml

these two links should be a good place to help you decide for mmap.. not very huge pools of info but good enough
this is mainly for scsi-generic but does make for interesting reading with regards to copying data between user land and kernel land

am still looking for more answers

Last edited by shishir; 01-07-2005 at 07:51 AM.
 
Old 01-10-2005, 01:49 AM   #6
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
i dunno if you have been able to find any conclusive answers ..but after some digging i have found that kiobuf is not really that great an interface as it splits large IO operations into small operations thus taking too much time...btw ..as an addendum: kiobufs have been removed totally from the 2.6 series and been replaced by bio_map_user (), a zero-copy block IO method.

in case you have been able to come up with a better technique..please do enlighten , thanks
 
Old 01-10-2005, 02:19 AM   #7
j4r0d
LQ Newbie
 
Registered: Sep 2004
Posts: 11

Original Poster
Rep: Reputation: 0
Talking Ur right...

ei thanks for the two links you gave me about the SCSIs. It's a good material for additional info. And ur right about the removal of kiobuf on the current lk version actually i read somewhere that it was added on the lk ver 2.3 and removed from ver 2.5 onwards. btw, may i know where did you get the info that
Quote:
...kiobuf is not really that great an interface as it splits large IO operations into small operations thus taking too much time...
thank you again so much for all your time and effort! soon i'll be able to conclude which would be better to use then
 
Old 01-10-2005, 02:38 AM   #8
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
http://www.sao.ru/hq/sts/linux/doc/p..._26/28548.html

this is the link that talks about porting drivers from earlier versions to 2.6
 
Old 01-10-2005, 04:18 AM   #9
j4r0d
LQ Newbie
 
Registered: Sep 2004
Posts: 11

Original Poster
Rep: Reputation: 0
thanks! thanks! thanks!

thank you so much again for the link. you have been so meaningful to my research. i wanna thank you since i am really new to linux so i'm having a hard time reserching for these stuff which seem alien to me as of now (i hope ). Thanks shishir!

Last edited by j4r0d; 01-10-2005 at 04:20 AM.
 
  


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
gdb and mmap dcfnef Programming 8 09-30-2005 11:25 AM
Implementing mmap Kumar Programming 0 09-08-2005 04:12 AM
mmap function professional1983 Programming 1 06-14-2005 05:23 AM
mmap() error FarAway Programming 3 03-30-2005 08:38 AM
using mmap AngryLlama Programming 1 02-09-2005 09:53 AM


All times are GMT -5. The time now is 04:16 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration