From: David Chau <dchau@mazunetworks.com>
To: Dan Malek <dan@embeddedalley.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Why is mmap()ed reserved memory so slow?
Date: Mon, 18 Jul 2005 10:44:00 -0400 [thread overview]
Message-ID: <42DBC030.7020600@mazunetworks.com> (raw)
In-Reply-To: <dc678ee4c98d1fc3eb2cb1960b759f05@embeddedalley.com>
Dan Malek wrote:
> How about a little more info, like what kernel are you using and what are
> the parameters you are sending to mmap()?
Linux (none) 2.4.31 #412 SMP Fri Jul 15 16:26:05 EDT 2005 mips unknown
(unmodified kernel from linux-mips.org).
It's running on the SB1 on a Broadcom 1250 board.
I mmap() with:
int mem_fd = open("/dev/mem", O_RDWR);
void* mem_base =
mmap(NULL, DRIVER_MEM_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED,
mem_fd, DRIVER_MEM_PHYS_BASE);
Where driver_mem_phys_base = 253M, and driver_mem_size=1M.
> The better way to approach this is to place an mmap() function in the
> associated driver that works in conjunction with the application to gain
> shared access as you expect. This also closes a hole where an errant
> application could write into unexpected places through /dev/mem.
Could you point me to an example of this so I can figure out how to do it?
Thanks,
David
next prev parent reply other threads:[~2005-07-18 14:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-15 22:21 Why is mmap()ed reserved memory so slow? David Chau
2005-07-15 22:35 ` Dan Malek
2005-07-18 14:44 ` David Chau [this message]
2005-07-18 10:51 ` Ralf Baechle
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=42DBC030.7020600@mazunetworks.com \
--to=dchau@mazunetworks.com \
--cc=dan@embeddedalley.com \
--cc=linux-mips@linux-mips.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