Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Dec 2013 00:40:21 +0400
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Adrian Chadd <adrian@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r259475 - head/sys/kern
Message-ID:  <20131216204021.GW29088@FreeBSD.org>
In-Reply-To: <201312161931.rBGJVOhs083409@svn.freebsd.org>
References:  <201312161931.rBGJVOhs083409@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
  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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131216204021.GW29088>