Re: mmap() vs. character special file
- From: Dmitry Pryanishnikov <dmitry@xxxxxxxxxxxxxx>
- Date: Sun, 25 Jun 2006 01:53:56 +0300 (EEST)
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. <ssedov@xxxxxxxxxxx>
Россия, Москва http://mbsd.msk.ru
Sincerely, Dmitry
--
Atlantis ISP, System Administrator
e-mail: dmitry@xxxxxxxxxxxxxx
nic-hdl: LYNX-RIPE
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- References:
- mmap() vs. character special file
- From: Dmitry Pryanishnikov
- Re: mmap() vs. character special file
- From: Stanislav Sedov
- mmap() vs. character special file
- Prev by Date: Re: Coding question: finding the size of a block device
- Next by Date: Re: Buses, devices and modules
- Previous by thread: Re: mmap() vs. character special file
- Next by thread: Re: mmap() vs. character special file
- Index(es):
Relevant Pages
|
|