Adrian, On Mon, Dec 16, 2013 at 07:31:24PM +0000, Adrian Chadd wrote: A> Modified: head/sys/kern/uipc_syscalls.c A> ============================================================================== A> --- head/sys/kern/uipc_syscalls.c Mon Dec 16 18:53:09 2013 (r259474) A> +++ head/sys/kern/uipc_syscalls.c Mon Dec 16 19:31:23 2013 (r259475) A> @@ -80,6 +80,9 @@ __FBSDID("$FreeBSD$"); A> #include <compat/freebsd32/freebsd32_util.h> A> #endif A> A> +#include <vm/uma.h> A> +#include <vm/uma_int.h> A> +#include <vm/uma_dbg.h> A> #include <net/vnet.h> A> A> #include <security/audit/audit.h> A> @@ -130,6 +133,7 @@ static int sfreadahead = 1; A> SYSCTL_INT(_kern_ipc_sendfile, OID_AUTO, readahead, CTLFLAG_RW, A> &sfreadahead, 0, "Number of sendfile(2) read-ahead MAXBSIZE blocks"); A> A> +static uma_zone_t zone_sfsync; A> A> static void A> sfstat_init(const void *unused) A> @@ -140,6 +144,22 @@ sfstat_init(const void *unused) A> } A> SYSINIT(sfstat, SI_SUB_MBUF, SI_ORDER_FIRST, sfstat_init, NULL); A> A> +static void A> +sf_sync_init(const void *unused) A> +{ A> + A> + zone_sfsync = uma_zcreate("sendfile_sync", sizeof(struct sendfile_sync), A> + NULL, NULL, A> +#ifdef INVARIANTS A> + trash_init, trash_fini, A> +#else A> + NULL, NULL, A> +#endif A> + UMA_ALIGN_CACHE, A> + 0); A> +}
You do not need the INVARIANTS ifdef, because uma(9) will do the same thing for you automatically. Thus, you also do not need to pollute namespace with uma_int.h and uma_dbg.h. -- Totus tuus, Glebius. _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"