Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Aubrey Li <aubreylee@...>
Cc: Robin Getz <rgetz@...>, <uaca@...>, <bryan.wu@...>, Alan Cox <alan@...>, <waltje@...>, <netdev@...>, Andrew Morton <akpm@...>, Linux Kernel <linux-kernel@...>
Date: Friday, April 20, 2007 - 3:58 am

Aubrey Li <aubreylee@gmail.com> wrote:


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.


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
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] CONFIG_PACKET_MMAP should depend on MMU, Aubrey Li, (Sun Apr 8, 11:01 pm)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, Robin Getz, (Mon Apr 9, 11:46 am)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU , David Howells, (Tue Apr 10, 8:55 am)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, Robin Getz, (Tue Apr 10, 7:52 pm)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, Aubrey Li, (Tue Apr 17, 6:36 am)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, David Howells, (Wed Apr 18, 11:33 am)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, Aubrey Li, (Fri Apr 20, 12:46 am)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU , David Howells, (Fri Apr 20, 3:58 am)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, Aubrey Li, (Fri Apr 20, 4:39 am)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU , David Howells, (Fri Apr 20, 4:58 am)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, Aubrey Li, (Fri Apr 20, 9:14 am)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, Eric Dumazet, (Fri Apr 20, 5:17 am)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU , David Howells, (Fri Apr 20, 6:43 am)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, Aubrey Li, (Wed Apr 18, 8:59 pm)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU , David Howells, (Thu Apr 19, 5:42 am)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, Robin Getz, (Tue Apr 17, 2:30 pm)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU , David Howells, (Tue Apr 17, 3:02 pm)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, David Miller, (Mon Apr 9, 12:55 pm)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, David Miller, (Mon Apr 9, 2:43 pm)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, Robin Getz, (Mon Apr 9, 4:08 pm)
Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU, Wu, Bryan, (Mon Apr 9, 10:00 pm)