From: dhylands@gmail.com (Dave Hylands)
To: kernelnewbies@lists.kernelnewbies.org
Subject: mmap on a block device
Date: Tue, 7 Jun 2011 07:53:28 -0700 [thread overview]
Message-ID: <BANLkTin1wDEmbJmeyU7CFf9Gs9ViHDMYSg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=d5P+emUdBFCcB+8iwiPjsrc9tjQ@mail.gmail.com>
Hi Kaustubh,
Replying to all this time...
On Mon, Jun 6, 2011 at 11:44 PM, Kaustubh Ashtekar <ksashtekar@gmail.com> wrote:
> Done. mmap was successful.
> Is it a good idea to mmap a block device. A block device being much bigger
> than the available virtual address space, I will have to map it multiple
> times while working on various parts of the block device.
What it means to mmap any device is quite arbitrary and entirely up to
the driver writer.
All that mmaping means is to take some memory that the driver
allocated in kernel space and make that memory available into user
space. The contents of the memory is entirely up to the driver. Maybe
you put statistics in there? Maybe you make it map in the data storage
your block device is front-ending? It's up to the driver writer to
decide what goes there and whether it makes sense or not.
--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com
prev parent reply other threads:[~2011-06-07 14:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 4:27 mmap on a block device Kaustubh Ashtekar
2011-06-07 6:17 ` Rajat Sharma
2011-06-07 6:44 ` Kaustubh Ashtekar
2011-06-07 14:53 ` Dave Hylands [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTin1wDEmbJmeyU7CFf9Gs9ViHDMYSg@mail.gmail.com \
--to=dhylands@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).