Re: PACKET_MMAP memory allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



First of all thanks for your fast! reply

On Wed, Jan 28, 2004 at 04:17:19PM -0800, David S. Miller wrote:
[...]
> get_free_pages() at most can allocate PAGE_SIZE << MAX_ORDER bytes of
> memory.  In 2.4.x kernels MAX_ORDER is 10 and PAGE_SIZE is 4096 on
> x86 so this limit should be 4MB.  MAX_ORDER can be set higher by
> certain configuration changes, via CONFIG_FORCE_MAX_ZONEORDER.

I was aware of that

please note that the allocation is independently for each block (and my
block size is 4Kbytes, an order 0 allocation):

               for (i=0; i<req->tp_block_nr; i++) {
                        struct page *page, *pend;
                        pg_vec[i] = __get_free_pages(GFP_KERNEL, order);
                        if (!pg_vec[i])
                                goto out_free_pgvec;

                        pend = virt_to_page(pg_vec[i] + (PAGE_SIZE << order) - 1);
                        for (page = virt_to_page(pg_vec[i]); page <= pend; page++)
                                SetPageReserved(page);
                }


I belive you get confused

> Perhaps it is set to 14 for the kernel you are using.

no, I'm using 11, wich is the default in a 2.6.1 vanilla

Thanks again

	Ulisses

                Debian GNU/Linux: a dream come true
-----------------------------------------------------------------------------
"Computers are useless. They can only give answers."            Pablo Picasso

Humans are slow, innaccurate, and brilliant.
Computers are fast, acurrate, and dumb. 
Together they are unbeatable

--->	Visita http://www.valux.org/ para saber acerca de la	<---
--->	Asociación Valenciana de Usuarios de Linux		<---
 
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux