freebsd-nq/sys/dev/netmap
Patrick Kelsey dd4fcbc594 When a netmap process terminates without the full set of buffers it
was granted via rings and ni_bufs_list_head represented in those rings
and lists (e.g., via SIGKILL), those buffers are no longer available
for subsequent users for the lifetime of the system. To mitigate this
resource leak, reset the allocator state when the last ref to that
allocator is released.

Note that this only recovers leaked resources for an allocator when
there are no longer any users of that allocator, so there remain
circumstances in which leaked allocator resources may not ever be
recovered - consider a set of multiple netmap processes that are all
using the same allocator (say, the global allocator) where members of
that set may be killed and restarted over time but at any given point
there is one member of that set running.

Based on intial work by adrian@.

Reviewed by: Giuseppe Lettieri (g.lettieri@iet.unipi.it), luigi
Approved by: jmallett (mentor)
MFC after: 1 week
Sponsored by: Norse Corp, Inc.
2015-05-15 15:36:57 +00:00
..
if_em_netmap.h
if_igb_netmap.h
if_ixl_netmap.h
if_lem_netmap.h
if_re_netmap.h
if_vtnet_netmap.h
ixgbe_netmap.h
netmap_freebsd.c
netmap_generic.c
netmap_kern.h
netmap_mbq.c
netmap_mbq.h
netmap_mem2.c
netmap_mem2.h
netmap_monitor.c
netmap_offloadings.c
netmap_pipe.c
netmap_vale.c
netmap.c