Skip site navigation (1)Skip section navigation (2)

FreeBSD Man Pages

Man Page or Keyword Search:
Man Architecture
Apropos Keyword Search (all sections) Output format
home | help
JUMBO(9)	       FreeBSD Kernel Developer's Manual	      JUMBO(9)

     jumbo, jumbo_vm_init, jumbo_pg_alloc, jumbo_pg_free, jumbo_freem,
     jumbo_pg_steal, jumbo_phys_to_kva -- kernel interface for allocating and
     freeing page-sized	disposable buffers

     #include <sys/jumbo.h>



     jumbo_pg_free(vm_offset_t addr);

     jumbo_freem(caddr_t addr, void *args);

     jumbo_pg_steal(vm_page_t pg);

     jumbo_phys_to_kva(vm_offset_t pa);

     The jumbo buffer facility is designed for allocating disposable page-
     sized buffers.  Buffers allocated via this	facility can either be
     returned or not.  This facility is	primarily intended for use with	net-
     work adapters that	have MTUs of a page or greater size.  The buffers will
     normally be disposed of by	the zero_copy(9) receive code.

     jumbo_vm_init() initializes the pool of KVA the jumbo code	needs to oper-
     ate and does some other initialization to prepare the subsystem for oper-
     ation.  This routine only needs to	be called once.	 Calling it multiple
     times will	have no	effect.	 It is recommended that	this initialization
     routine be	called in a device driver attach routine, so that resources
     are not allocated if the jumbo subsystem will not end up being used.
     jumbo_vm_init() returns 1 upon successful completion, and 0 upon failure.

     jumbo_pg_alloc() allocates	a physical page	and assigns a piece of KVA
     from the jumbo KVA	pool.  It returns the allocated	page if	successful,
     and NULL in the case of failure.

     jumbo_pg_free() frees a page allocated by jumbo_pg_alloc().  It takes the
     address of	the memory in question as an argument.	This routine will nor-
     mally be used in cases where the allocated	jumbo page cannot be used for
     some reason.  The normal free path	is via jumbo_freem().

     jumbo_freem() is the routine that should be given as the external free
     routine when an external mbuf is allocated	using pages from the jumbo
     allocator.	 It takes the virtual address of the page in question, and
     ignores the second	argument.

     jumbo_pg_steal() ``steals'' a page	and recycles its KVA space.

     jumbo_phys_to_kva() translates the	physical address of a jumbo allocated
     page to the proper	kernel virtual address.

     ti(4), zero_copy(9)

     The jumbo allocator is primarily based on a page allocator	system origi-
     nally written by Andrew Gallatin <> as	part of	a set
     of	zero copy patches for the ti(4)	driver.	 The allocator was taken out
     of	the ti(4) driver, cleaned up and ported	to the new mutex(9) interface
     by	Kenneth	Merry <>.

     The jumbo allocator first appeared	in FreeBSD 5.0,	and has	existed	in
     patch form	since at least 1999.

     Andrew Gallatin <>
     Kenneth Merry <>

     There is currently	a static number	of KVA pages allocated by the jumbo
     allocator,	with no	real provision for increasing the number of pages
     allocated should demand exceed supply.

     The jumbo_pg_steal() function is not currently used anywhere.

FreeBSD	10.2			 June 23, 2002			  FreeBSD 10.2


Want to link to this manual page? Use this URL:

home | help