From owner-svn-src-all@FreeBSD.ORG Tue Dec 17 00:54:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14F5AF10; Tue, 17 Dec 2013 00:54:17 +0000 (UTC) Received: from mail-qc0-x232.google.com (mail-qc0-x232.google.com [IPv6:2607:f8b0:400d:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 902A312BA; Tue, 17 Dec 2013 00:54:16 +0000 (UTC) Received: by mail-qc0-f178.google.com with SMTP id i17so4473689qcy.9 for ; Mon, 16 Dec 2013 16:54:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=9HU4fnO6UR7BgsjGzEfIbvOMvHqRUaoqBELZpxpVdko=; b=ZdrrqLX6TpE345mWVEsadOdkcC3uHUyXY+e9knfeClkJcvYvyiHDy05nIWEOJUYybX 4HwWkf+BH3nGVb/FHdjQIUpoGUAQQoG8cqSZ8eE7Y4S4/HsBlQrKVKEc9QPFU3O6/7aq uKBKlK+spbq+0QKGLAzNJhhMwhz4cMUp3ssFkzY/9Y8YvCULD1zVF6uAIgPdRg/ccC/U N/NAYH7cFDUCgqYkpuDkFD+cq/QkucEQqgF2kjcHdvBv90VvJdHRZNSHTFi+r7o4xZse F2V+cPkTNA9aPXmCmpnb6gFpsgJh2+AQvPspZyySzBW8efNWthpp1QaTnQN2MO9PO7Bk 4PVg== MIME-Version: 1.0 X-Received: by 10.224.67.200 with SMTP id s8mr37726510qai.75.1387241655792; Mon, 16 Dec 2013 16:54:15 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.53.200 with HTTP; Mon, 16 Dec 2013 16:54:15 -0800 (PST) Received: by 10.224.53.200 with HTTP; Mon, 16 Dec 2013 16:54:15 -0800 (PST) In-Reply-To: <20131216204021.GW29088@FreeBSD.org> References: <201312161931.rBGJVOhs083409@svn.freebsd.org> <20131216204021.GW29088@FreeBSD.org> Date: Mon, 16 Dec 2013 16:54:15 -0800 X-Google-Sender-Auth: qxXvn-GqDuSLp7kYpuJ0AWT5RVw Message-ID: Subject: Re: svn commit: r259475 - head/sys/kern From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 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: Tue, 17 Dec 2013 00:54:17 -0000 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" 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 > 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. >