Date: Mon, 16 Dec 2013 16:54:15 -0800 From: Adrian Chadd <adrian@freebsd.org> To: Gleb Smirnoff <glebius@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: <CAJ-VmokxmRqm=mVEHzDeQkKeWCRJatchpJGm93uDM8HyQ1wtew@mail.gmail.com> In-Reply-To: <20131216204021.GW29088@FreeBSD.org> References: <201312161931.rBGJVOhs083409@svn.freebsd.org> <20131216204021.GW29088@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Ok. I'll go find where I copy pastes thus from. The mbuf code perhaps? Should we do a big quick tidy up? Adrian On Dec 16, 2013 1:40 PM, "Gleb Smirnoff" <glebius@freebsd.org> wrote: > 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?CAJ-VmokxmRqm=mVEHzDeQkKeWCRJatchpJGm93uDM8HyQ1wtew>