PACKET_MMAP memory allocation

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

 



Hi all 

I have been playing with PACKET_MMAP to see the amount of memory could
handle

Looking at the source code (2.6), the setup funcion ends by calling
__get_free_pages to allocate a number of contiguous memory for a block  
of tp_block_size size.


In my tests I always used a req.tp_frame_size of 2048 and a 
tp_block_size of 4096, so in each block can hold two frames.

In my allocation tests I always begin trying to allocate an insane
amount of frames req.tp_frame_nr, if setup fails I reduce it the amount
of frames and I try again.

I always setup the number of blocks needed (tp_block_nr) to hold 
the number of frames I want to allocate (tp_frame_nr)

In my tests always end by allocating "only" 64MB of frames 

this is a i386 machine (Pentium-III) with 1GB of RAM, mostly free.

who imposes this limit? __get_free_pages is called with GFP_KERNEL, 
so I understand it can free other page frames, swap, etc... in order
to allocate more memory

any comments?

	Thanks

                Debian GNU/Linux: a dream come true
-----------------------------------------------------------------------------
"Computers are useless. They can only give answers."            Pablo Picasso
 
-
: 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