Re: I/O and memory managment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,


> I am taking Martin's word that it's actually possible
> to do DMA in this way (directly to a user page, bypassing
> kernel buffers and copy-to-user). If all I/O
> passes through kernelspace buffers, then there
> is no problem. I have not studied the I/O system in
> much detail.

As I mentioned in my first mail, I haven't carefully studied the I/O system either. So I can't claim that DMA is really done this way, I just described it in a way I *thought* it would be done
(which is probably wrong).
As Sourav pointed out in his first reply to my question, the scenario I described did not reflect real processing in that I implicitely assumed the data would be copied straight into the
process's user space (which seems not to be the case). As Sourav wrote, data is rather first read into some kernel memory (cache) from where it is copied into the user buffer by copy_to_user()
or some of it's siblings. Since simultaneous page faults of A&B and C are synchronized by means of the mmap_sem, there is no race.

regards
Martin

--
Supercomputing System AG          email: maletinsky@scs.ch
Martin Maletinsky                 phone: +41 (0)1 445 16 05
Technoparkstrasse 1               fax:   +41 (0)1 445 16 10
CH-8005 Zurich


-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux