Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jun 2006 01:53:56 +0300 (EEST)
From:      Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>
To:        Stanislav Sedov <stas@310.ru>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: mmap() vs. character special file
Message-ID:  <20060625013328.J47342@atlantis.atlantis.dp.ua>
In-Reply-To: <20060624040603.594c44bc.stas@310.ru>
References:  <20060624010644.Y82000@atlantis.atlantis.dp.ua> <20060624040603.594c44bc.stas@310.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

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@mbsd.msk.ru>
> Россия, Москва		http://mbsd.msk.ru

Sincerely, Dmitry
-- 
Atlantis ISP, System Administrator
e-mail:  dmitry@atlantis.dp.ua
nic-hdl: LYNX-RIPE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060625013328.J47342>