LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   kiobuf vs. mmap (https://www.linuxquestions.org/questions/programming-9/kiobuf-vs-mmap-274799/)

j4r0d 01-06-2005 07:59 PM

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! :D

shishir 01-06-2005 11:16 PM

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

j4r0d 01-07-2005 01:05 AM

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! ;)

shishir 01-07-2005 04:40 AM

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...

shishir 01-07-2005 06:42 AM

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 :)

shishir 01-10-2005 12:49 AM

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

j4r0d 01-10-2005 01:19 AM

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 :cool:

shishir 01-10-2005 01:38 AM

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

j4r0d 01-10-2005 03:18 AM

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 :D as of now (i hope :rolleyes: ). Thanks shishir!


All times are GMT -5. The time now is 11:38 AM.