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)

NAME
     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

SYNOPSIS
     #include <sys/jumbo.h>

     int
     jumbo_vm_init(void);

     vm_page_t
     jumbo_pg_alloc(void);

     void
     jumbo_pg_free(vm_offset_t addr);

     void
     jumbo_freem(caddr_t addr, void *args);

     void
     jumbo_pg_steal(vm_page_t pg);

     caddr_t
     jumbo_phys_to_kva(vm_offset_t pa);

DESCRIPTION
     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
     network 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
     operate and does some other initialization to prepare the subsystem for
     operation.  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
     normally 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.

SEE ALSO
     ti(4), zero_copy(9)

HISTORY
     The jumbo allocator is primarily based on a page allocator system
     originally written by Andrew Gallatin <gallatin@FreeBSD.org> 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 <ken@FreeBSD.org>.

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

AUTHORS
     Andrew Gallatin <gallatin@FreeBSD.org>
     Kenneth Merry <ken@FreeBSD.org>

BUGS
     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 11.0-PRERELEASE          June 23, 2002         FreeBSD 11.0-PRERELEASE

NAME | SYNOPSIS | DESCRIPTION | SEE ALSO | HISTORY | AUTHORS | BUGS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=jumbo&sektion=9&manpath=FreeBSD+5.5-RELEASE>

home | help