Subject: Re: [PATCH] CONFIG_PACKET_MMAP should depend on MMU

From: David Howells <[email-masked]>
Date: Fri, 20 Apr 2007 09:58:52 +0100

Aubrey Li <[email-masked]> wrote:

> as checked in packet_set_ring, buffer size must be a multiple of PAGE_SIZE,
> --------------------packet_set_ring------------------------
> if (unlikely(req->tp_block_size & (PAGE_SIZE - 1)))
> 
> So why not use __get_free_pages rather than kmalloc,

Because kmalloc() may be able to get us a smaller chunk of memory.  Actually,
calling __get_free_pages() might be a better, and then release the excess
pages.

> so that we have pagetables to count?

There are no pagetables in NOMMU-mode.

David