From owner-svn-src-all@FreeBSD.ORG Mon Dec 16 20:40:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 073B8D6; Mon, 16 Dec 2013 20:40:24 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A4DE1A9B; Mon, 16 Dec 2013 20:40:22 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rBGKeLl5049531 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 17 Dec 2013 00:40:21 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rBGKeLIu049530; Tue, 17 Dec 2013 00:40:21 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 17 Dec 2013 00:40:21 +0400 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r259475 - head/sys/kern Message-ID: <20131216204021.GW29088@FreeBSD.org> References: <201312161931.rBGJVOhs083409@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201312161931.rBGJVOhs083409@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2013 20:40:24 -0000 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 A> #endif A> A> +#include A> +#include A> +#include A> #include A> A> #include 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.