From: David Howells <dhowells@redhat.com>
To: "Aubrey Li" <aubreylee@gmail.com>
Cc: "Robin Getz" <rgetz@blackfin.uclinux.org>,
uaca@alumni.uv.es, bryan.wu@analog.com,
"Alan Cox" <alan@lxorguk.ukuu.org.uk>,
waltje@uwalt.nl.mugnet.org, netdev@vger.kernel.org,
"Andrew Morton" <akpm@osdl.org>,
"Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU
Date: Fri, 20 Apr 2007 08:58:13 +0100 [thread overview]
Message-ID: <1016.1177055893@redhat.com> (raw)
In-Reply-To: <6d6a94c50704192146k5bbe2aefr31fa5726bf1c1e54@mail.gmail.com>
Aubrey Li <aubreylee@gmail.com> wrote:
> The patch works properly on my side. But
> 1) I'm not sure why you re-wrote alloc/free_pg_vec function, doesn't
> the current implement work for NOMMU? I know you want to allocate the
> entire data buffer as one contiguous lump, but is it really necessary?
Yes. It's not possible to map the whole buffer otherwise. Think about it!
mmap() returns _one_ reference address. In MMU-mode, the non-contiguous
physical buffers can be made to appear virtually contiguous by fudging the
page tables and using the MMU. This is not possible in NOMMU-mode. The app
will expect the buffer to be one contiguous lump in its address space, and
will not be able to locate the other segments of the buffer.
Actually, what I said is not quite true. It is possible to map the whole
buffer otherwise: I could lift the restriction that requires that you map the
whole buffer or not at all, and then userspace could stitch the whole lot
together itself. This would then require userspace to be bimodal.
> 2) So the mapped pages doesn't count into NR_FILE_MAPPED, is it a problem?
Not really, no - there are no pagetables.
Furthermore, issuing the PACKET_RX_RING sockopt does the entire allocation.
Any subsequent mmaps on it have little effect.
We could do that accounting though if you think it'd be better. I don't
suppose it hurts.
David
next prev parent reply other threads:[~2007-04-20 8:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-09 3:01 [PATCH] CONFIG_PACKET_MMAP should depend on MMU Aubrey Li
2007-04-09 9:50 ` Wu, Bryan
2007-04-09 15:46 ` Robin Getz
2007-04-10 12:55 ` David Howells
2007-04-10 23:52 ` Robin Getz
2007-04-17 10:36 ` Aubrey Li
2007-04-17 18:30 ` Robin Getz
2007-04-17 19:02 ` David Howells
2007-04-18 15:33 ` David Howells
2007-04-19 0:59 ` Aubrey Li
2007-04-19 9:42 ` David Howells
2007-04-20 4:46 ` Aubrey Li
2007-04-20 7:58 ` David Howells [this message]
2007-04-20 8:39 ` Aubrey Li
2007-04-20 8:58 ` David Howells
2007-04-20 9:17 ` Eric Dumazet
2007-04-20 10:43 ` David Howells
2007-04-20 13:14 ` Aubrey Li
2007-04-09 16:55 ` David Miller
2007-04-09 18:43 ` David Miller
2007-04-09 20:08 ` Robin Getz
2007-04-10 2:00 ` Wu, Bryan
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=1016.1177055893@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=aubreylee@gmail.com \
--cc=bryan.wu@analog.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rgetz@blackfin.uclinux.org \
--cc=uaca@alumni.uv.es \
--cc=waltje@uwalt.nl.mugnet.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).