Hello!

On Sat, 24 Jun 2006, Stanislav Sedov wrote:
I'm curious about mmap()ing devices (particularly, HDD slices). The manpage
mentions character special files only once:

You cannot mmap ata devices (as well as scsi ones), since mmap functions
was not implemented. Actually, only few devices have such support
(e.g. drm, bktr).

mmap requires device to return pointer to contigues memory range -
drm, for example, returns pointer to physical memory of the graphical
adapter.

Implementing mmap for disk devices involves complicated VM intercations,
since you cannot simply return pointer to "physical" memory. Actually,
implementing mmap, IMHO, doesn't worth efforts to do this.

 Thank you for the clarification. Actually I won't say that I can't
live w/o mmap() support for disks ;) I consider mmap() to be handy when
process should modify several bytes of the disk contents and write
them back (e.g., disklabel edition).  Of course, those tasks are very
specific, so implementing mmap() just for them is an overkill.

Stanislav Sedov         MBSD labs, Inc.         <[EMAIL PROTECTED]>
Россия, Москва          http://mbsd.msk.ru

Sincerely, Dmitry
--
Atlantis ISP, System Administrator
e-mail:  [EMAIL PROTECTED]
nic-hdl: LYNX-RIPE
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to