From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 08:09:09 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4A23D39; Sun, 21 Oct 2012 08:09:09 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 898848FC12; Sun, 21 Oct 2012 08:09:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9L899QY022837; Sun, 21 Oct 2012 08:09:09 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9L899FP022835; Sun, 21 Oct 2012 08:09:09 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210210809.q9L899FP022835@svn.freebsd.org> From: Andre Oppermann Date: Sun, 21 Oct 2012 08:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241795 - user/andre/tcp_workqueue/sys/netinet X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 08:09:09 -0000 Author: andre Date: Sun Oct 21 08:09:09 2012 New Revision: 241795 URL: http://svn.freebsd.org/changeset/base/241795 Log: Fix mismerge from last integrate in r241732. Modified: user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c Modified: user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c Sun Oct 21 04:02:34 2012 (r241794) +++ user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c Sun Oct 21 08:09:09 2012 (r241795) @@ -966,7 +966,6 @@ syncache_expand(struct in_conninfo *inc, tod->tod_syncache_removed(tod, sc->sc_todctx); } #endif - V_tcp_syncache.cache_count--; SCH_UNLOCK(sch); } From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 08:29:59 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D3825DB; Sun, 21 Oct 2012 08:29:59 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E0578FC1E; Sun, 21 Oct 2012 08:29:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9L8Tx5Z026496; Sun, 21 Oct 2012 08:29:59 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9L8TxNc026494; Sun, 21 Oct 2012 08:29:59 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210210829.q9L8TxNc026494@svn.freebsd.org> From: Andre Oppermann Date: Sun, 21 Oct 2012 08:29:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241796 - user/andre/tcp_workqueue/sys/kern X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 08:29:59 -0000 Author: andre Date: Sun Oct 21 08:29:58 2012 New Revision: 241796 URL: http://svn.freebsd.org/changeset/base/241796 Log: In sonewconn() be more verbose in the log(DEBUG,) messages on socket creation failures on accept(2). Also include the pointer to the PCB so it can be attributed to a particular application by corresponding it to "netstat -A" output. Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_socket.c Sun Oct 21 08:09:09 2012 (r241795) +++ user/andre/tcp_workqueue/sys/kern/uipc_socket.c Sun Oct 21 08:29:58 2012 (r241796) @@ -474,16 +474,18 @@ sonewconn(struct socket *head, int conns #else if (over) { #endif - log(LOG_DEBUG, "%s: Listen queue overflow: %i in queue", - __func__, over); + log(LOG_DEBUG, "%s: pcb %p: Listen queue overflow: " + "%i already in queue awaiting acceptance\n", + __func__, head->so_pcb, over); return (NULL); } VNET_ASSERT(head->so_vnet != NULL, ("%s:%d so_vnet is NULL, head=%p", __func__, __LINE__, head)); so = soalloc(head->so_vnet); if (so == NULL) { - log(LOG_DEBUG, "%s: Socket allocation failure: " - "limit reached or out of memory", __func__); + log(LOG_DEBUG, "%s: pcb %p: New socket allocation failure: " + "limit reached or out of memory\n", + __func__, head->so_pcb); return (NULL); } if ((head->so_options & SO_ACCEPTFILTER) != 0) @@ -502,11 +504,16 @@ sonewconn(struct socket *head, int conns knlist_init_mtx(&so->so_rcv.sb_sel.si_note, SOCKBUF_MTX(&so->so_rcv)); knlist_init_mtx(&so->so_snd.sb_sel.si_note, SOCKBUF_MTX(&so->so_snd)); VNET_SO_ASSERT(head); - if (soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat) || - (*so->so_proto->pr_usrreqs->pru_attach)(so, 0, NULL)) { + if (soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat)) { sodealloc(so); - log(LOG_DEBUG, "%s: soreserve() or pru_attach() failed ", - __func__); + log(LOG_DEBUG, "%s: pcb %p: soreserve() failed\n", + __func__, head->so_pcb); + return (NULL); + } + if ((*so->so_proto->pr_usrreqs->pru_attach)(so, 0, NULL)) { + sodealloc(so); + log(LOG_DEBUG, "%s: pcb %p: pru_attach() failed\n", + __func__, head->so_pcb); return (NULL); } so->so_rcv.sb_lowat = head->so_rcv.sb_lowat; From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 08:46:16 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A28D2DFC; Sun, 21 Oct 2012 08:46:16 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A1AD8FC08; Sun, 21 Oct 2012 08:46:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9L8kGVQ029656; Sun, 21 Oct 2012 08:46:16 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9L8kGX7029653; Sun, 21 Oct 2012 08:46:16 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210210846.q9L8kGX7029653@svn.freebsd.org> From: Andre Oppermann Date: Sun, 21 Oct 2012 08:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241798 - in user/andre/tcp_workqueue/sys: kern sys X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 08:46:16 -0000 Author: andre Date: Sun Oct 21 08:46:15 2012 New Revision: 241798 URL: http://svn.freebsd.org/changeset/base/241798 Log: Make sure that global locks have their own CPU cache line in the .bss section of the kernel and do not end up sharing one by chance or the place they are defined in. Three new macros are added: MTX_GLOBAL(name) defining the mutex MTX_GLOBAL_STATIC(name) defining the mutex as static MTX_GLB(name) accessing the mutex in mtx_lock() This makes global locks cache deterministic. Changes to the .bss layout and ordering due to differences in completely unrelated parts of the kernel can no longer cause global locks to share the same CPU cache line. This is a proof of concept with only one global lock converted. I'm open to suggestions and improvements on the macros and their naming. Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c user/andre/tcp_workqueue/sys/sys/mutex.h Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_socket.c Sun Oct 21 08:38:55 2012 (r241797) +++ user/andre/tcp_workqueue/sys/kern/uipc_socket.c Sun Oct 21 08:46:15 2012 (r241798) @@ -215,8 +215,8 @@ MTX_SYSINIT(accept_mtx, &accept_mtx, "ac * so_global_mtx protects so_gencnt, numopensockets, and the per-socket * so_gencnt field. */ -static struct mtx so_global_mtx; -MTX_SYSINIT(so_global_mtx, &so_global_mtx, "so_glabel", MTX_DEF); +MTX_GLOBAL_STATIC(so_global_mtx); +MTX_SYSINIT(so_global_mtx, MTX_GLB(so_global_mtx), "so_glabel", MTX_DEF); /* * General IPC sysctl name space, used by sockets and a variety of other IPC @@ -324,7 +324,7 @@ soalloc(struct vnet *vnet) sx_init(&so->so_snd.sb_sx, "so_snd_sx"); sx_init(&so->so_rcv.sb_sx, "so_rcv_sx"); TAILQ_INIT(&so->so_aiojobq); - mtx_lock(&so_global_mtx); + mtx_lock(MTX_GLB(so_global_mtx)); so->so_gencnt = ++so_gencnt; ++numopensockets; #ifdef VIMAGE @@ -333,7 +333,7 @@ soalloc(struct vnet *vnet) vnet->vnet_sockcnt++; so->so_vnet = vnet; #endif - mtx_unlock(&so_global_mtx); + mtx_unlock(MTX_GLB(so_global_mtx)); return (so); } @@ -349,7 +349,7 @@ sodealloc(struct socket *so) KASSERT(so->so_count == 0, ("sodealloc(): so_count %d", so->so_count)); KASSERT(so->so_pcb == NULL, ("sodealloc(): so_pcb != NULL")); - mtx_lock(&so_global_mtx); + mtx_lock(MTX_GLB(so_global_mtx)); so->so_gencnt = ++so_gencnt; --numopensockets; /* Could be below, but faster here. */ #ifdef VIMAGE @@ -357,7 +357,7 @@ sodealloc(struct socket *so) __func__, __LINE__, so)); so->so_vnet->vnet_sockcnt--; #endif - mtx_unlock(&so_global_mtx); + mtx_unlock(MTX_GLB(so_global_mtx)); if (so->so_rcv.sb_hiwat) (void)chgsbsize(so->so_cred->cr_uidinfo, &so->so_rcv.sb_hiwat, 0, RLIM_INFINITY); Modified: user/andre/tcp_workqueue/sys/sys/mutex.h ============================================================================== --- user/andre/tcp_workqueue/sys/sys/mutex.h Sun Oct 21 08:38:55 2012 (r241797) +++ user/andre/tcp_workqueue/sys/sys/mutex.h Sun Oct 21 08:46:15 2012 (r241798) @@ -411,6 +411,18 @@ struct mtx_args { SYSUNINIT(name##_mtx_sysuninit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ mtx_destroy, (mtx)) +#define MTX_GLOBAL(name) \ + struct { \ + struct mtx (name); \ + } __aligned(CACHE_LINE_SIZE) (name); + +#define MTX_GLOBAL_STATIC(name) \ + static struct { \ + struct mtx (name); \ + } __aligned(CACHE_LINE_SIZE) (name); + +#define MTX_GLB(name) (&(name.name)) + /* * The INVARIANTS-enabled mtx_assert() functionality. * From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 09:46:03 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 859834CE; Sun, 21 Oct 2012 09:46:03 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DD288FC0C; Sun, 21 Oct 2012 09:46:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9L9k31Y040656; Sun, 21 Oct 2012 09:46:03 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9L9k37r040654; Sun, 21 Oct 2012 09:46:03 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210210946.q9L9k37r040654@svn.freebsd.org> From: Andre Oppermann Date: Sun, 21 Oct 2012 09:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241800 - user/andre/tcp_workqueue/sys/sys X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 09:46:03 -0000 Author: andre Date: Sun Oct 21 09:46:02 2012 New Revision: 241800 URL: http://svn.freebsd.org/changeset/base/241800 Log: Make the cache line alignment conditional on SMP as it is not needed on UP systems. This saves a few bytes on embedded platforms. Remove the semicolons at the end of the structure definitions. Modified: user/andre/tcp_workqueue/sys/sys/mutex.h Modified: user/andre/tcp_workqueue/sys/sys/mutex.h ============================================================================== --- user/andre/tcp_workqueue/sys/sys/mutex.h Sun Oct 21 09:31:48 2012 (r241799) +++ user/andre/tcp_workqueue/sys/sys/mutex.h Sun Oct 21 09:46:02 2012 (r241800) @@ -411,16 +411,32 @@ struct mtx_args { SYSUNINIT(name##_mtx_sysuninit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ mtx_destroy, (mtx)) +/* + * Helper macros to prevent global mutexes to share a cache line + * on SMP systems. + * MTX_GLB(name) abstracts the access to the structure encapsulated + * mutexes. + */ +#ifdef SMP #define MTX_GLOBAL(name) \ struct { \ struct mtx (name); \ - } __aligned(CACHE_LINE_SIZE) (name); + } __aligned(CACHE_LINE_SIZE) (name) #define MTX_GLOBAL_STATIC(name) \ static struct { \ struct mtx (name); \ - } __aligned(CACHE_LINE_SIZE) (name); - + } __aligned(CACHE_LINE_SIZE) (name) +#else /* SMP */ +#define MTX_GLOBAL(name) \ + struct { \ + struct mtx (name); \ + } (name) +#define MTX_GLOBAL_STATIC(name) \ + static struct { \ + struct mtx (name); \ + } (name) +#endif /* SMP */ #define MTX_GLB(name) (&(name.name)) /* From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 10:22:04 2012 Return-Path: Delivered-To: svn-src-user@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2B51C183; Sun, 21 Oct 2012 10:22:04 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 996B48FC08; Sun, 21 Oct 2012 10:22:03 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9LALtV1068241; Sun, 21 Oct 2012 14:21:55 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9LALtn8068240; Sun, 21 Oct 2012 14:21:55 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 21 Oct 2012 14:21:55 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r241798 - in user/andre/tcp_workqueue/sys: kern sys Message-ID: <20121021102155.GA64905@FreeBSD.org> References: <201210210846.q9L8kGX7029653@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201210210846.q9L8kGX7029653@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.org, svn-src-user@FreeBSD.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 10:22:04 -0000 On Sun, Oct 21, 2012 at 08:46:16AM +0000, Andre Oppermann wrote: A> Author: andre A> Date: Sun Oct 21 08:46:15 2012 A> New Revision: 241798 A> URL: http://svn.freebsd.org/changeset/base/241798 A> A> Log: A> Make sure that global locks have their own CPU cache line in A> the .bss section of the kernel and do not end up sharing one A> by chance or the place they are defined in. A> A> Three new macros are added: A> MTX_GLOBAL(name) defining the mutex A> MTX_GLOBAL_STATIC(name) defining the mutex as static A> MTX_GLB(name) accessing the mutex in mtx_lock() A> A> This makes global locks cache deterministic. Changes to the A> .bss layout and ordering due to differences in completely A> unrelated parts of the kernel can no longer cause global A> locks to share the same CPU cache line. A> A> This is a proof of concept with only one global lock converted. A> A> I'm open to suggestions and improvements on the macros and A> their naming. My fault, I have confused you yesterday in our discussion. Actually we don't need to embrace declaration into additional struct. This code works: static struct mtx __aligned(CACHE_LINE_SIZE) foo_mtx; When speaking about embracing, I actually meant that we can embrace into anonymous struct a mutex and a structures it protects, not a mutex only. P.S. Before merging such changes to head we need to do some benchmarking proving that this isn't a nop. -- Totus tuus, Glebius. From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 11:07:20 2012 Return-Path: Delivered-To: svn-src-user@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E9611ADA for ; Sun, 21 Oct 2012 11:07:20 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 41B5B8FC0C for ; Sun, 21 Oct 2012 11:07:19 +0000 (UTC) Received: (qmail 48487 invoked from network); 21 Oct 2012 12:45:42 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 21 Oct 2012 12:45:42 -0000 Message-ID: <5083D75F.6050603@freebsd.org> Date: Sun, 21 Oct 2012 13:07:11 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r241798 - in user/andre/tcp_workqueue/sys: kern sys References: <201210210846.q9L8kGX7029653@svn.freebsd.org> <20121021102155.GA64905@FreeBSD.org> In-Reply-To: <20121021102155.GA64905@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, svn-src-user@FreeBSD.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 11:07:21 -0000 On 21.10.2012 12:21, Gleb Smirnoff wrote: > On Sun, Oct 21, 2012 at 08:46:16AM +0000, Andre Oppermann wrote: > A> Author: andre > A> Date: Sun Oct 21 08:46:15 2012 > A> New Revision: 241798 > A> URL: http://svn.freebsd.org/changeset/base/241798 > A> > A> Log: > A> Make sure that global locks have their own CPU cache line in > A> the .bss section of the kernel and do not end up sharing one > A> by chance or the place they are defined in. > A> > A> Three new macros are added: > A> MTX_GLOBAL(name) defining the mutex > A> MTX_GLOBAL_STATIC(name) defining the mutex as static > A> MTX_GLB(name) accessing the mutex in mtx_lock() > A> > A> This makes global locks cache deterministic. Changes to the > A> .bss layout and ordering due to differences in completely > A> unrelated parts of the kernel can no longer cause global > A> locks to share the same CPU cache line. > A> > A> This is a proof of concept with only one global lock converted. > A> > A> I'm open to suggestions and improvements on the macros and > A> their naming. > > My fault, I have confused you yesterday in our discussion. Actually > we don't need to embrace declaration into additional struct. > This code works: > > static struct mtx __aligned(CACHE_LINE_SIZE) foo_mtx; OK, I see. That makes it simpler. I'll still do it with a macro to do the SMP/UP differentiation. > When speaking about embracing, I actually meant that we can embrace > into anonymous struct a mutex and a structures it protects, not a > mutex only. In most cases the global locks serve as a serialization point protecting more than one structure. So it's difficult to chose where to put it. > P.S. Before merging such changes to head we need to do some benchmarking > proving that this isn't a nop. Ideally it is a nop. It's about being deterministic and preventing bad things should cache line sharing happen. -- Andre From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 11:16:17 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AB36D12A; Sun, 21 Oct 2012 11:16:17 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FED48FC0C; Sun, 21 Oct 2012 11:16:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9LBGH8a059343; Sun, 21 Oct 2012 11:16:17 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LBGHv8059338; Sun, 21 Oct 2012 11:16:17 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210211116.q9LBGHv8059338@svn.freebsd.org> From: Andre Oppermann Date: Sun, 21 Oct 2012 11:16:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241802 - in user/andre/tcp_workqueue/sys: kern sys X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 11:16:18 -0000 Author: andre Date: Sun Oct 21 11:16:16 2012 New Revision: 241802 URL: http://svn.freebsd.org/changeset/base/241802 Log: Simplify cache line alignment of global mutexes and remove the unnecessary MTX_GLB() accessor macro again. Suggested by: glebius Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c user/andre/tcp_workqueue/sys/sys/mutex.h Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_socket.c Sun Oct 21 10:19:07 2012 (r241801) +++ user/andre/tcp_workqueue/sys/kern/uipc_socket.c Sun Oct 21 11:16:16 2012 (r241802) @@ -215,8 +215,8 @@ MTX_SYSINIT(accept_mtx, &accept_mtx, "ac * so_global_mtx protects so_gencnt, numopensockets, and the per-socket * so_gencnt field. */ -MTX_GLOBAL_STATIC(so_global_mtx); -MTX_SYSINIT(so_global_mtx, MTX_GLB(so_global_mtx), "so_glabel", MTX_DEF); +static MTX_GLOBAL(so_global_mtx); +MTX_SYSINIT(so_global_mtx, &so_global_mtx, "so_glabel", MTX_DEF); /* * General IPC sysctl name space, used by sockets and a variety of other IPC @@ -324,7 +324,7 @@ soalloc(struct vnet *vnet) sx_init(&so->so_snd.sb_sx, "so_snd_sx"); sx_init(&so->so_rcv.sb_sx, "so_rcv_sx"); TAILQ_INIT(&so->so_aiojobq); - mtx_lock(MTX_GLB(so_global_mtx)); + mtx_lock(&so_global_mtx); so->so_gencnt = ++so_gencnt; ++numopensockets; #ifdef VIMAGE @@ -333,7 +333,7 @@ soalloc(struct vnet *vnet) vnet->vnet_sockcnt++; so->so_vnet = vnet; #endif - mtx_unlock(MTX_GLB(so_global_mtx)); + mtx_unlock(&so_global_mtx); return (so); } @@ -349,7 +349,7 @@ sodealloc(struct socket *so) KASSERT(so->so_count == 0, ("sodealloc(): so_count %d", so->so_count)); KASSERT(so->so_pcb == NULL, ("sodealloc(): so_pcb != NULL")); - mtx_lock(MTX_GLB(so_global_mtx)); + mtx_lock(&so_global_mtx); so->so_gencnt = ++so_gencnt; --numopensockets; /* Could be below, but faster here. */ #ifdef VIMAGE @@ -357,7 +357,7 @@ sodealloc(struct socket *so) __func__, __LINE__, so)); so->so_vnet->vnet_sockcnt--; #endif - mtx_unlock(MTX_GLB(so_global_mtx)); + mtx_unlock(&so_global_mtx); if (so->so_rcv.sb_hiwat) (void)chgsbsize(so->so_cred->cr_uidinfo, &so->so_rcv.sb_hiwat, 0, RLIM_INFINITY); Modified: user/andre/tcp_workqueue/sys/sys/mutex.h ============================================================================== --- user/andre/tcp_workqueue/sys/sys/mutex.h Sun Oct 21 10:19:07 2012 (r241801) +++ user/andre/tcp_workqueue/sys/sys/mutex.h Sun Oct 21 11:16:16 2012 (r241802) @@ -414,30 +414,15 @@ struct mtx_args { /* * Helper macros to prevent global mutexes to share a cache line * on SMP systems. - * MTX_GLB(name) abstracts the access to the structure encapsulated - * mutexes. */ #ifdef SMP #define MTX_GLOBAL(name) \ - struct { \ - struct mtx (name); \ - } __aligned(CACHE_LINE_SIZE) (name) + struct mtx __aligned(CACHE_LINE_SIZE) (name) -#define MTX_GLOBAL_STATIC(name) \ - static struct { \ - struct mtx (name); \ - } __aligned(CACHE_LINE_SIZE) (name) #else /* SMP */ #define MTX_GLOBAL(name) \ - struct { \ - struct mtx (name); \ - } (name) -#define MTX_GLOBAL_STATIC(name) \ - static struct { \ - struct mtx (name); \ - } (name) + struct mtx (name) #endif /* SMP */ -#define MTX_GLB(name) (&(name.name)) /* * The INVARIANTS-enabled mtx_assert() functionality. From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 11:52:16 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E76C2BCF; Sun, 21 Oct 2012 11:52:16 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4D9E8FC12; Sun, 21 Oct 2012 11:52:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9LBqGAL066663; Sun, 21 Oct 2012 11:52:16 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LBqGZc066660; Sun, 21 Oct 2012 11:52:16 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210211152.q9LBqGZc066660@svn.freebsd.org> From: Andre Oppermann Date: Sun, 21 Oct 2012 11:52:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241805 - in user/andre/tcp_workqueue/sys: kern sys X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 11:52:17 -0000 Author: andre Date: Sun Oct 21 11:52:16 2012 New Revision: 241805 URL: http://svn.freebsd.org/changeset/base/241805 Log: Add MTX_DEF_SYSINIT() macro which combines defining a global mutex with initializing it and ensuring the cache line alignment. Suggested by: ed Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c user/andre/tcp_workqueue/sys/sys/mutex.h Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_socket.c Sun Oct 21 11:43:47 2012 (r241804) +++ user/andre/tcp_workqueue/sys/kern/uipc_socket.c Sun Oct 21 11:52:16 2012 (r241805) @@ -208,15 +208,13 @@ SYSCTL_INT(_kern_ipc_zero_copy, OID_AUTO * accept_mtx locks down per-socket fields relating to accept queues. See * socketvar.h for an annotation of the protected fields of struct socket. */ -struct mtx accept_mtx; -MTX_SYSINIT(accept_mtx, &accept_mtx, "accept", MTX_DEF); +MTX_DEF_SYSINIT(accept_mtx, &accept_mtx, "accept", MTX_DEF); /* * so_global_mtx protects so_gencnt, numopensockets, and the per-socket * so_gencnt field. */ -static MTX_GLOBAL(so_global_mtx); -MTX_SYSINIT(so_global_mtx, &so_global_mtx, "so_glabel", MTX_DEF); +static MTX_DEF_SYSINIT(so_global_mtx, &so_global_mtx, "so_glabel", MTX_DEF); /* * General IPC sysctl name space, used by sockets and a variety of other IPC Modified: user/andre/tcp_workqueue/sys/sys/mutex.h ============================================================================== --- user/andre/tcp_workqueue/sys/sys/mutex.h Sun Oct 21 11:43:47 2012 (r241804) +++ user/andre/tcp_workqueue/sys/sys/mutex.h Sun Oct 21 11:52:16 2012 (r241805) @@ -394,12 +394,28 @@ do { \ return (_val); \ } while (0) +/* + * Helper macros to prevent global mutexes to share a cache line + * on SMP systems. + */ +#ifdef SMP +#define MTX_GLOBAL(name) \ + struct mtx __aligned(CACHE_LINE_SIZE) (name) +#else /* SMP */ +#define MTX_GLOBAL(name) \ + struct mtx (name) +#endif /* SMP */ + struct mtx_args { struct mtx *ma_mtx; const char *ma_desc; int ma_opts; }; +#define MTX_DEF_SYSINIT(name, mtx, desc, opts) \ + MTX_GLOBAL(name); \ + MTX_SYSINIT(name, mtx, desc, opts) + #define MTX_SYSINIT(name, mtx, desc, opts) \ static struct mtx_args name##_args = { \ (mtx), \ @@ -412,19 +428,6 @@ struct mtx_args { mtx_destroy, (mtx)) /* - * Helper macros to prevent global mutexes to share a cache line - * on SMP systems. - */ -#ifdef SMP -#define MTX_GLOBAL(name) \ - struct mtx __aligned(CACHE_LINE_SIZE) (name) - -#else /* SMP */ -#define MTX_GLOBAL(name) \ - struct mtx (name) -#endif /* SMP */ - -/* * The INVARIANTS-enabled mtx_assert() functionality. * * The constants need to be defined for INVARIANT_SUPPORT infrastructure From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 12:12:22 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AAEA4714; Sun, 21 Oct 2012 12:12:22 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D3538FC12; Sun, 21 Oct 2012 12:12:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9LCCM2Y070948; Sun, 21 Oct 2012 12:12:22 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LCCMD9070946; Sun, 21 Oct 2012 12:12:22 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201210211212.q9LCCMD9070946@svn.freebsd.org> From: Gabor Kovesdan Date: Sun, 21 Oct 2012 12:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241808 - user/gabor/tre-integration/usr.bin/grep X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 12:12:22 -0000 Author: gabor Date: Sun Oct 21 12:12:22 2012 New Revision: 241808 URL: http://svn.freebsd.org/changeset/base/241808 Log: - Merge some minor changes Modified: user/gabor/tre-integration/usr.bin/grep/grep.c Directory Properties: user/gabor/tre-integration/usr.bin/grep/ (props changed) Modified: user/gabor/tre-integration/usr.bin/grep/grep.c ============================================================================== --- user/gabor/tre-integration/usr.bin/grep/grep.c Sun Oct 21 12:01:19 2012 (r241807) +++ user/gabor/tre-integration/usr.bin/grep/grep.c Sun Oct 21 12:12:22 2012 (r241808) @@ -91,8 +91,8 @@ size_t *lens; mregex_t preg; /* Filename exclusion/inclusion patterns */ -unsigned int fpatterns, fpattern_sz; -unsigned int dpatterns, dpattern_sz; +unsigned int fpatterns, dpatterns; +static unsigned int fpattern_sz, dpattern_sz; struct epat *dpattern, *fpattern; /* For regex errors */ From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 13:41:19 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 57673EF2; Sun, 21 Oct 2012 13:41:19 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3968A8FC0C; Sun, 21 Oct 2012 13:41:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9LDfJYV086825; Sun, 21 Oct 2012 13:41:19 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LDfJV6086823; Sun, 21 Oct 2012 13:41:19 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210211341.q9LDfJV6086823@svn.freebsd.org> From: Andre Oppermann Date: Sun, 21 Oct 2012 13:41:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241814 - user/andre/tcp_workqueue/sys/sys X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 13:41:19 -0000 Author: andre Date: Sun Oct 21 13:41:18 2012 New Revision: 241814 URL: http://svn.freebsd.org/changeset/base/241814 Log: Simplify MTX_DEF_SYSINIT(name, desc, opts) by making the name the mutex struct name as well. Modified: user/andre/tcp_workqueue/sys/sys/mutex.h Modified: user/andre/tcp_workqueue/sys/sys/mutex.h ============================================================================== --- user/andre/tcp_workqueue/sys/sys/mutex.h Sun Oct 21 12:53:33 2012 (r241813) +++ user/andre/tcp_workqueue/sys/sys/mutex.h Sun Oct 21 13:41:18 2012 (r241814) @@ -412,9 +412,9 @@ struct mtx_args { int ma_opts; }; -#define MTX_DEF_SYSINIT(name, mtx, desc, opts) \ +#define MTX_DEF_SYSINIT(name, desc, opts) \ MTX_GLOBAL(name); \ - MTX_SYSINIT(name, mtx, desc, opts) + MTX_SYSINIT(name, &name, desc, opts) #define MTX_SYSINIT(name, mtx, desc, opts) \ static struct mtx_args name##_args = { \ From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 13:42:40 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22D35AC; Sun, 21 Oct 2012 13:42:40 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 029E38FC08; Sun, 21 Oct 2012 13:42:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9LDgdpV087117; Sun, 21 Oct 2012 13:42:39 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LDgdoj087084; Sun, 21 Oct 2012 13:42:39 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210211342.q9LDgdoj087084@svn.freebsd.org> From: Andre Oppermann Date: Sun, 21 Oct 2012 13:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241815 - in user/andre/tcp_workqueue/sys: kern net netatalk netinet netinet6 vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 13:42:40 -0000 Author: andre Date: Sun Oct 21 13:42:38 2012 New Revision: 241815 URL: http://svn.freebsd.org/changeset/base/241815 Log: First pass at making global mutexes use MTX_DEF_SYSINIT(). Modified: user/andre/tcp_workqueue/sys/kern/kern_et.c user/andre/tcp_workqueue/sys/kern/kern_event.c user/andre/tcp_workqueue/sys/kern/kern_fail.c user/andre/tcp_workqueue/sys/kern/kern_hhook.c user/andre/tcp_workqueue/sys/kern/kern_intr.c user/andre/tcp_workqueue/sys/kern/kern_pmc.c user/andre/tcp_workqueue/sys/kern/kern_racct.c user/andre/tcp_workqueue/sys/kern/kern_rmlock.c user/andre/tcp_workqueue/sys/kern/kern_thread.c user/andre/tcp_workqueue/sys/kern/kern_uuid.c user/andre/tcp_workqueue/sys/kern/subr_autoconf.c user/andre/tcp_workqueue/sys/kern/subr_devstat.c user/andre/tcp_workqueue/sys/kern/subr_firmware.c user/andre/tcp_workqueue/sys/kern/subr_log.c user/andre/tcp_workqueue/sys/kern/subr_sleepqueue.c user/andre/tcp_workqueue/sys/kern/subr_unit.c user/andre/tcp_workqueue/sys/kern/uipc_accf.c user/andre/tcp_workqueue/sys/kern/uipc_domain.c user/andre/tcp_workqueue/sys/kern/uipc_socket.c user/andre/tcp_workqueue/sys/kern/vfs_mount.c user/andre/tcp_workqueue/sys/net/pfil.c user/andre/tcp_workqueue/sys/net/raw_cb.c user/andre/tcp_workqueue/sys/net/raw_usrreq.c user/andre/tcp_workqueue/sys/net/rtsock.c user/andre/tcp_workqueue/sys/netatalk/aarp.c user/andre/tcp_workqueue/sys/netinet/in_mcast.c user/andre/tcp_workqueue/sys/netinet/ip_encap.c user/andre/tcp_workqueue/sys/netinet/ip_id.c user/andre/tcp_workqueue/sys/netinet/tcp_debug.c user/andre/tcp_workqueue/sys/netinet6/in6_mcast.c user/andre/tcp_workqueue/sys/vm/vm_glue.c user/andre/tcp_workqueue/sys/vm/vm_pageout.c Modified: user/andre/tcp_workqueue/sys/kern/kern_et.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_et.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/kern_et.c Sun Oct 21 13:42:38 2012 (r241815) @@ -37,8 +37,7 @@ __FBSDID("$FreeBSD$"); SLIST_HEAD(et_eventtimers_list, eventtimer); static struct et_eventtimers_list eventtimers = SLIST_HEAD_INITIALIZER(et_eventtimers); -struct mtx et_eventtimers_mtx; -MTX_SYSINIT(et_eventtimers_init, &et_eventtimers_mtx, "et_mtx", MTX_DEF); +MTX_DEF_SYSINIT(et_eventtimers_mtx, "et_mtx", MTX_DEF); SYSCTL_NODE(_kern, OID_AUTO, eventtimer, CTLFLAG_RW, 0, "Event timers"); static SYSCTL_NODE(_kern_eventtimer, OID_AUTO, et, CTLFLAG_RW, 0, ""); Modified: user/andre/tcp_workqueue/sys/kern/kern_event.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_event.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/kern_event.c Sun Oct 21 13:42:38 2012 (r241815) @@ -74,8 +74,7 @@ static MALLOC_DEFINE(M_KQUEUE, "kqueue", * This lock is used if multiple kq locks are required. This possibly * should be made into a per proc lock. */ -static struct mtx kq_global; -MTX_SYSINIT(kq_global, &kq_global, "kqueue order", MTX_DEF); +static MTX_DEF_SYSINIT(kq_global, "kqueue order", MTX_DEF); #define KQ_GLOBAL_LOCK(lck, haslck) do { \ if (!haslck) \ mtx_lock(lck); \ @@ -269,9 +268,7 @@ extern struct filterops fs_filtops; /* * Table for for all system-defined filters. */ -static struct mtx filterops_lock; -MTX_SYSINIT(kqueue_filterops, &filterops_lock, "protect sysfilt_ops", - MTX_DEF); +static MTX_DEF_SYSINIT(filterops_lock, "protect sysfilt_ops", MTX_DEF); static struct { struct filterops *for_fop; int for_refcnt; @@ -1882,9 +1879,8 @@ knlist_empty(struct knlist *knl) return SLIST_EMPTY(&knl->kl_list); } -static struct mtx knlist_lock; -MTX_SYSINIT(knlist_lock, &knlist_lock, "knlist lock for lockless objects", - MTX_DEF); +static MTX_DEF_SYSINIT(knlist_lock, "knlist lock for lockless objects", + MTX_DEF); static void knlist_mtx_lock(void *arg); static void knlist_mtx_unlock(void *arg); Modified: user/andre/tcp_workqueue/sys/kern/kern_fail.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_fail.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/kern_fail.c Sun Oct 21 13:42:38 2012 (r241815) @@ -73,8 +73,7 @@ static MALLOC_DEFINE(M_FAIL_POINT, "Fail #define fp_free(ptr) free(ptr, M_FAIL_POINT) #define fp_malloc(size, flags) malloc((size), M_FAIL_POINT, (flags)) -static struct mtx g_fp_mtx; -MTX_SYSINIT(g_fp_mtx, &g_fp_mtx, "fail point mtx", MTX_DEF); +static MTX_DEF_SYSINIT(g_fp_mtx, "fail point mtx", MTX_DEF); #define FP_LOCK() mtx_lock(&g_fp_mtx) #define FP_UNLOCK() mtx_unlock(&g_fp_mtx) Modified: user/andre/tcp_workqueue/sys/kern/kern_hhook.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_hhook.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/kern_hhook.c Sun Oct 21 13:42:38 2012 (r241815) @@ -64,9 +64,7 @@ LIST_HEAD(hhookheadhead, hhook_head); VNET_DEFINE(struct hhookheadhead, hhook_head_list); #define V_hhook_head_list VNET(hhook_head_list) -static struct mtx hhook_head_list_lock; -MTX_SYSINIT(hhookheadlistlock, &hhook_head_list_lock, "hhook_head list lock", - MTX_DEF); +static MTX_DEF_SYSINIT(hhook_head_list_lock, "hhook_head list lock", MTX_DEF); /* Private function prototypes. */ static void hhook_head_destroy(struct hhook_head *hhh); Modified: user/andre/tcp_workqueue/sys/kern/kern_intr.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_intr.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/kern_intr.c Sun Oct 21 13:42:38 2012 (r241815) @@ -95,8 +95,8 @@ SYSCTL_INT(_hw, OID_AUTO, intr_storm_thr "Number of consecutive interrupts before storm protection is enabled"); static TAILQ_HEAD(, intr_event) event_list = TAILQ_HEAD_INITIALIZER(event_list); -static struct mtx event_lock; -MTX_SYSINIT(intr_event_list, &event_lock, "intr event list", MTX_DEF); + +static MTX_DEF_SYSINIT(event_lock, "intr event list", MTX_DEF); static void intr_event_update(struct intr_event *ie); #ifdef INTR_FILTER Modified: user/andre/tcp_workqueue/sys/kern/kern_pmc.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_pmc.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/kern_pmc.c Sun Oct 21 13:42:38 2012 (r241815) @@ -100,11 +100,10 @@ TUNABLE_INT(PMC_SYSCTL_NAME_PREFIX "soft SYSCTL_INT(_kern_hwpmc, OID_AUTO, softevents, CTLFLAG_TUN|CTLFLAG_RD, &pmc_softevents, 0, "maximum number of soft events"); -struct mtx pmc_softs_mtx; int pmc_softs_count; struct pmc_soft **pmc_softs; -MTX_SYSINIT(pmc_soft_mtx, &pmc_softs_mtx, "pmc-softs", MTX_SPIN); +MTX_DEF_SYSINIT(pmc_softs_mtx, "pmc-softs", MTX_SPIN); static void pmc_init_sx(void) Modified: user/andre/tcp_workqueue/sys/kern/kern_racct.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_racct.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/kern_racct.c Sun Oct 21 13:42:38 2012 (r241815) @@ -63,8 +63,7 @@ __FBSDID("$FreeBSD$"); FEATURE(racct, "Resource Accounting"); -static struct mtx racct_lock; -MTX_SYSINIT(racct_lock, &racct_lock, "racct lock", MTX_DEF); +static MTX_DEF_SYSINIT(racct_lock, "racct lock", MTX_DEF); static uma_zone_t racct_zone; Modified: user/andre/tcp_workqueue/sys/kern/kern_rmlock.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_rmlock.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/kern_rmlock.c Sun Oct 21 13:42:38 2012 (r241815) @@ -118,9 +118,7 @@ owner_rm(const struct lock_object *lock, } #endif -static struct mtx rm_spinlock; - -MTX_SYSINIT(rm_spinlock, &rm_spinlock, "rm_spinlock", MTX_SPIN); +static MTX_DEF_SYSINIT(rm_spinlock, "rm_spinlock", MTX_SPIN); /* * Add or remove tracker from per-cpu list. Modified: user/andre/tcp_workqueue/sys/kern/kern_thread.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_thread.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/kern_thread.c Sun Oct 21 13:42:38 2012 (r241815) @@ -72,8 +72,8 @@ SDT_PROBE_DEFINE(proc, , , lwp_exit, lwp static uma_zone_t thread_zone; TAILQ_HEAD(, thread) zombie_threads = TAILQ_HEAD_INITIALIZER(zombie_threads); -static struct mtx zombie_lock; -MTX_SYSINIT(zombie_lock, &zombie_lock, "zombie lock", MTX_SPIN); + +static MTX_DEF_SYSINIT(zombie_lock, "zombie lock", MTX_SPIN); static void thread_zombie(struct thread *); Modified: user/andre/tcp_workqueue/sys/kern/kern_uuid.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_uuid.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/kern_uuid.c Sun Oct 21 13:42:38 2012 (r241815) @@ -73,8 +73,7 @@ CTASSERT(sizeof(struct uuid_private) == static struct uuid_private uuid_last; -static struct mtx uuid_mutex; -MTX_SYSINIT(uuid_lock, &uuid_mutex, "UUID generator mutex lock", MTX_DEF); +static MTX_DEF_SYSINIT(uuid_mutex, "UUID generator mutex lock", MTX_DEF); /* * Return the first MAC address we encounter or, if none was found, Modified: user/andre/tcp_workqueue/sys/kern/subr_autoconf.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/subr_autoconf.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/subr_autoconf.c Sun Oct 21 13:42:38 2012 (r241815) @@ -56,8 +56,8 @@ __FBSDID("$FreeBSD$"); static TAILQ_HEAD(, intr_config_hook) intr_config_hook_list = TAILQ_HEAD_INITIALIZER(intr_config_hook_list); static struct intr_config_hook *next_to_notify; -static struct mtx intr_config_hook_lock; -MTX_SYSINIT(intr_config_hook, &intr_config_hook_lock, "intr config", MTX_DEF); + +static MTX_DEF_SYSINIT(intr_config_hook_lock, "intr config", MTX_DEF); /* ARGSUSED */ static void run_interrupt_driven_config_hooks(void); Modified: user/andre/tcp_workqueue/sys/kern/subr_devstat.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/subr_devstat.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/subr_devstat.c Sun Oct 21 13:42:38 2012 (r241815) @@ -102,8 +102,8 @@ static int devstat_num_devs; static long devstat_generation = 1; static int devstat_version = DEVSTAT_VERSION; static int devstat_current_devnumber; -static struct mtx devstat_mutex; -MTX_SYSINIT(devstat_mutex, &devstat_mutex, "devstat", MTX_DEF); + +static MTX_DEF_SYSINIT(devstat_mutex, "devstat", MTX_DEF); static struct devstatlist device_statq = STAILQ_HEAD_INITIALIZER(device_statq); static struct devstat *devstat_alloc(void); Modified: user/andre/tcp_workqueue/sys/kern/subr_firmware.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/subr_firmware.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/subr_firmware.c Sun Oct 21 13:42:38 2012 (r241815) @@ -134,8 +134,7 @@ static struct task firmware_unload_task; /* * This mutex protects accesses to the firmware table. */ -static struct mtx firmware_mtx; -MTX_SYSINIT(firmware, &firmware_mtx, "firmware table", MTX_DEF); +static MTX_DEF_SYSINIT(firmware_mtx, "firmware table", MTX_DEF); /* * Helper function to lookup a name. Modified: user/andre/tcp_workqueue/sys/kern/subr_log.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/subr_log.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/subr_log.c Sun Oct 21 13:42:38 2012 (r241815) @@ -93,8 +93,8 @@ static struct logsoftc { int log_open; /* also used in log() */ static struct cv log_wakeup; -struct mtx msgbuf_lock; -MTX_SYSINIT(msgbuf_lock, &msgbuf_lock, "msgbuf lock", MTX_DEF); + +MTX_DEF_SYSINIT(msgbuf_lock, "msgbuf lock", MTX_DEF); /* Times per second to check for a pending syslog wakeup. */ static int log_wakeups_per_second = 5; Modified: user/andre/tcp_workqueue/sys/kern/subr_sleepqueue.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/subr_sleepqueue.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/subr_sleepqueue.c Sun Oct 21 13:42:38 2012 (r241815) @@ -1040,8 +1040,8 @@ LIST_HEAD(sqphead, sleepq_prof); struct sqphead sleepq_prof_free; struct sqphead sleepq_hash[SC_TABLESIZE]; static struct sleepq_prof sleepq_profent[SLEEPQ_PROF_LOCATIONS]; -static struct mtx sleepq_prof_lock; -MTX_SYSINIT(sleepq_prof_lock, &sleepq_prof_lock, "sleepq_prof", MTX_SPIN); + +static MTX_DEF_SYSINIT(sleepq_prof_lock, "sleepq_prof", MTX_SPIN); static void sleepq_profile(const char *wmesg) Modified: user/andre/tcp_workqueue/sys/kern/subr_unit.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/subr_unit.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/subr_unit.c Sun Oct 21 13:42:38 2012 (r241815) @@ -92,9 +92,7 @@ static MALLOC_DEFINE(M_UNIT, "Unitno", " #define Malloc(foo) malloc(foo, M_UNIT, M_WAITOK | M_ZERO) #define Free(foo) free(foo, M_UNIT) -static struct mtx unitmtx; - -MTX_SYSINIT(unit, &unitmtx, "unit# allocation", MTX_DEF); +static MTX_DEF_SYSINIT(unitmtx, "unit# allocation", MTX_DEF); #else /* ...USERLAND */ Modified: user/andre/tcp_workqueue/sys/kern/uipc_accf.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_accf.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/uipc_accf.c Sun Oct 21 13:42:38 2012 (r241815) @@ -47,9 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include -static struct mtx accept_filter_mtx; -MTX_SYSINIT(accept_filter, &accept_filter_mtx, "accept_filter_mtx", - MTX_DEF); +static MTX_DEF_SYSINIT(accept_filter_mtx, "accept_filter_mtx", MTX_DEF); #define ACCEPT_FILTER_LOCK() mtx_lock(&accept_filter_mtx) #define ACCEPT_FILTER_UNLOCK() mtx_unlock(&accept_filter_mtx) Modified: user/andre/tcp_workqueue/sys/kern/uipc_domain.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_domain.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/uipc_domain.c Sun Oct 21 13:42:38 2012 (r241815) @@ -75,8 +75,8 @@ static void pfslowtimo(void *); struct domain *domains; /* registered protocol domains */ int domain_init_status = 0; -static struct mtx dom_mtx; /* domain list lock */ -MTX_SYSINIT(domain, &dom_mtx, "domain list", MTX_DEF); + +static MTX_DEF_SYSINIT(dom_mtx, "domain list", MTX_DEF); /* * Dummy protocol specific user requests function pointer array. Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_socket.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/uipc_socket.c Sun Oct 21 13:42:38 2012 (r241815) @@ -208,13 +208,13 @@ SYSCTL_INT(_kern_ipc_zero_copy, OID_AUTO * accept_mtx locks down per-socket fields relating to accept queues. See * socketvar.h for an annotation of the protected fields of struct socket. */ -MTX_DEF_SYSINIT(accept_mtx, &accept_mtx, "accept", MTX_DEF); +MTX_DEF_SYSINIT(accept_mtx, "accept", MTX_DEF); /* * so_global_mtx protects so_gencnt, numopensockets, and the per-socket * so_gencnt field. */ -static MTX_DEF_SYSINIT(so_global_mtx, &so_global_mtx, "so_glabel", MTX_DEF); +static MTX_DEF_SYSINIT(so_global_mtx, "so_glabel", MTX_DEF); /* * General IPC sysctl name space, used by sockets and a variety of other IPC Modified: user/andre/tcp_workqueue/sys/kern/vfs_mount.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/vfs_mount.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/kern/vfs_mount.c Sun Oct 21 13:42:38 2012 (r241815) @@ -87,8 +87,7 @@ static uma_zone_t mount_zone; struct mntlist mountlist = TAILQ_HEAD_INITIALIZER(mountlist); /* For any iteration/modification of mountlist */ -struct mtx mountlist_mtx; -MTX_SYSINIT(mountlist, &mountlist_mtx, "mountlist", MTX_DEF); +MTX_DEF_SYSINIT(mountlist_mtx, "mountlist", MTX_DEF); /* * Global opts, taken by all filesystems Modified: user/andre/tcp_workqueue/sys/net/pfil.c ============================================================================== --- user/andre/tcp_workqueue/sys/net/pfil.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/net/pfil.c Sun Oct 21 13:42:38 2012 (r241815) @@ -47,10 +47,7 @@ #include #include -static struct mtx pfil_global_lock; - -MTX_SYSINIT(pfil_heads_lock, &pfil_global_lock, "pfil_head_list lock", - MTX_DEF); +static MTX_DEF_SYSINIT(pfil_global_lock, "pfil_head_list lock", MTX_DEF); static int pfil_list_add(pfil_list_t *, struct packet_filter_hook *, int); Modified: user/andre/tcp_workqueue/sys/net/raw_cb.c ============================================================================== --- user/andre/tcp_workqueue/sys/net/raw_cb.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/net/raw_cb.c Sun Oct 21 13:42:38 2012 (r241815) @@ -56,7 +56,7 @@ * redo address binding to allow wildcards */ -struct mtx rawcb_mtx; +MTX_DEF_SYSINIT(rawcb_mtx, "rawcb", MTX_DEF); VNET_DEFINE(struct rawcb_list_head, rawcb_list); static SYSCTL_NODE(_net, OID_AUTO, raw, CTLFLAG_RW, 0, Modified: user/andre/tcp_workqueue/sys/net/raw_usrreq.c ============================================================================== --- user/andre/tcp_workqueue/sys/net/raw_usrreq.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/net/raw_usrreq.c Sun Oct 21 13:42:38 2012 (r241815) @@ -49,8 +49,6 @@ #include #include -MTX_SYSINIT(rawcb_mtx, &rawcb_mtx, "rawcb", MTX_DEF); - /* * Initialize raw connection block q. */ Modified: user/andre/tcp_workqueue/sys/net/rtsock.c ============================================================================== --- user/andre/tcp_workqueue/sys/net/rtsock.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/net/rtsock.c Sun Oct 21 13:42:38 2012 (r241815) @@ -167,8 +167,7 @@ static struct { int any_count; /* total attached */ } route_cb; -struct mtx rtsock_mtx; -MTX_SYSINIT(rtsock, &rtsock_mtx, "rtsock route_cb lock", MTX_DEF); +MTX_DEF_SYSINIT(rtsock_mtx, "rtsock route_cb lock", MTX_DEF); #define RTSOCK_LOCK() mtx_lock(&rtsock_mtx) #define RTSOCK_UNLOCK() mtx_unlock(&rtsock_mtx) Modified: user/andre/tcp_workqueue/sys/netatalk/aarp.c ============================================================================== --- user/andre/tcp_workqueue/sys/netatalk/aarp.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/netatalk/aarp.c Sun Oct 21 13:42:38 2012 (r241815) @@ -82,8 +82,7 @@ static void at_aarpinput(struct ifnet *i #define AARPTAB_SIZE (AARPTAB_BSIZ * AARPTAB_NB) static struct aarptab aarptab[AARPTAB_SIZE]; -struct mtx aarptab_mtx; -MTX_SYSINIT(aarptab_mtx, &aarptab_mtx, "aarptab_mtx", MTX_DEF); +MTX_DEF_SYSINIT(aarptab_mtx, "aarptab_mtx", MTX_DEF); #define AARPTAB_HASH(a) ((((a).s_net << 8) + (a).s_node) % AARPTAB_NB) Modified: user/andre/tcp_workqueue/sys/netinet/in_mcast.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/in_mcast.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/netinet/in_mcast.c Sun Oct 21 13:42:38 2012 (r241815) @@ -94,8 +94,7 @@ static MALLOC_DEFINE(M_IPMSOURCE, "ip_ms * any need for in_multi itself to be virtualized -- it is bound to an ifp * anyway no matter what happens. */ -struct mtx in_multi_mtx; -MTX_SYSINIT(in_multi_mtx, &in_multi_mtx, "in_multi_mtx", MTX_DEF); +MTX_DEF_SYSINIT(in_multi_mtx, "in_multi_mtx", MTX_DEF); /* * Functions with non-static linkage defined in this file should be Modified: user/andre/tcp_workqueue/sys/netinet/ip_encap.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/ip_encap.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/netinet/ip_encap.c Sun Oct 21 13:42:38 2012 (r241815) @@ -101,8 +101,7 @@ static void encap_fillarg(struct mbuf *, /* * All global variables in ip_encap.c are locked using encapmtx. */ -static struct mtx encapmtx; -MTX_SYSINIT(encapmtx, &encapmtx, "encapmtx", MTX_DEF); +static MTX_DEF_SYSINIT(encapmtx, "encapmtx", MTX_DEF); LIST_HEAD(, encaptab) encaptab = LIST_HEAD_INITIALIZER(encaptab); /* Modified: user/andre/tcp_workqueue/sys/netinet/ip_id.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/ip_id.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/netinet/ip_id.c Sun Oct 21 13:42:38 2012 (r241815) @@ -97,12 +97,11 @@ static int array_ptr = 0; static int array_size = 8192; static int random_id_collisions = 0; static int random_id_total = 0; -static struct mtx ip_id_mtx; static void ip_initid(void); static int sysctl_ip_id_change(SYSCTL_HANDLER_ARGS); -MTX_SYSINIT(ip_id_mtx, &ip_id_mtx, "ip_id_mtx", MTX_DEF); +static MTX_DEF_SYSINIT(ip_id_mtx, "ip_id_mtx", MTX_DEF); SYSCTL_DECL(_net_inet_ip); SYSCTL_PROC(_net_inet_ip, OID_AUTO, random_id_period, CTLTYPE_INT|CTLFLAG_RW, Modified: user/andre/tcp_workqueue/sys/netinet/tcp_debug.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/tcp_debug.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/netinet/tcp_debug.c Sun Oct 21 13:42:38 2012 (r241815) @@ -86,8 +86,7 @@ static int tcp_debx; * two parts, one of which saves connection and other state into the global * array (locked by tcp_debug_mtx). */ -struct mtx tcp_debug_mtx; -MTX_SYSINIT(tcp_debug_mtx, &tcp_debug_mtx, "tcp_debug_mtx", MTX_DEF); +MTX_DEF_SYSINIT(tcp_debug_mtx, "tcp_debug_mtx", MTX_DEF); /* * Save TCP state at a given moment; optionally, both tcpcb and TCP packet Modified: user/andre/tcp_workqueue/sys/netinet6/in6_mcast.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet6/in6_mcast.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/netinet6/in6_mcast.c Sun Oct 21 13:42:38 2012 (r241815) @@ -103,8 +103,7 @@ RB_GENERATE(ip6_msource_tree, ip6_msourc * any need for in6_multi itself to be virtualized -- it is bound to an ifp * anyway no matter what happens. */ -struct mtx in6_multi_mtx; -MTX_SYSINIT(in6_multi_mtx, &in6_multi_mtx, "in6_multi_mtx", MTX_DEF); +MTX_DEF_SYSINIT(in6_multi_mtx, "in6_multi_mtx", MTX_DEF); static void im6f_commit(struct in6_mfilter *); static int im6f_get_source(struct in6_mfilter *imf, Modified: user/andre/tcp_workqueue/sys/vm/vm_glue.c ============================================================================== --- user/andre/tcp_workqueue/sys/vm/vm_glue.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/vm/vm_glue.c Sun Oct 21 13:42:38 2012 (r241815) @@ -306,7 +306,8 @@ vm_sync_icache(vm_map_t map, vm_offset_t struct kstack_cache_entry *kstack_cache; static int kstack_cache_size = 128; static int kstacks; -static struct mtx kstack_cache_mtx; +static MTX_DEF_SYSINIT(kstack_cache_mtx, "kstkch", MTX_DEF); + SYSCTL_INT(_vm, OID_AUTO, kstack_cache_size, CTLFLAG_RW, &kstack_cache_size, 0, ""); SYSCTL_INT(_vm, OID_AUTO, kstacks, CTLFLAG_RD, &kstacks, 0, @@ -486,7 +487,6 @@ kstack_cache_init(void *nulll) EVENTHANDLER_PRI_ANY); } -MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF); SYSINIT(vm_kstacks, SI_SUB_KTHREAD_INIT, SI_ORDER_ANY, kstack_cache_init, NULL); #ifndef NO_SWAPPING Modified: user/andre/tcp_workqueue/sys/vm/vm_pageout.c ============================================================================== --- user/andre/tcp_workqueue/sys/vm/vm_pageout.c Sun Oct 21 13:41:18 2012 (r241814) +++ user/andre/tcp_workqueue/sys/vm/vm_pageout.c Sun Oct 21 13:42:38 2012 (r241815) @@ -146,9 +146,8 @@ int vm_pageout_pages_needed; /* flag say #if !defined(NO_SWAPPING) static int vm_pageout_req_swapout; /* XXX */ static int vm_daemon_needed; -static struct mtx vm_daemon_mtx; /* Allow for use by vm_pageout before vm_daemon is initialized. */ -MTX_SYSINIT(vm_daemon, &vm_daemon_mtx, "vm daemon", MTX_DEF); +static MTX_DEF_SYSINIT(vm_daemon_mtx, "vm daemon", MTX_DEF); #endif static int vm_max_launder = 32; static int vm_pageout_stats_max=0, vm_pageout_stats_interval = 0; From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 14:24:49 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9FC9C21; Sun, 21 Oct 2012 14:24:49 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id EC7218FC0A; Sun, 21 Oct 2012 14:24:47 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so1437782lag.13 for ; Sun, 21 Oct 2012 07:24:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=C5YwPutxzS+5164XkNDQeQuS3Mznjb3ZqXa3jyDLxhY=; b=tSDl5r6YbW7WEg52Yrf8vt0tr7Cd5APL4vQ92NpYMSI/K0jLjy8UBFYvu01TL/ism+ oeIAZJ00phwDOkUCh9sxLTLCpRn6Lgd8UIlTqdqQfEeDzCadLKVW/OQi2dE80BGA7x8i FRwDepgQ7w7jRvGSITnqzFhtsS4Lt8B4YjaFpO6RoLuKrhBlJceps0u5Sb0XvwAB+0fo 4v1RaH14mCEb77fDR0lV5oL7sN3S4zLQuCu5vygazVE9mAk4KJM/NcHjiaVlLQrjWLTw TTFeVYg4KsN3AqJ1SpTotc2y02SDbzIuz8snSN+vZhHRFtaybMUn4dknSKvjMxeWaRuP q7IA== MIME-Version: 1.0 Received: by 10.112.98.37 with SMTP id ef5mr2667392lbb.84.1350829487083; Sun, 21 Oct 2012 07:24:47 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Sun, 21 Oct 2012 07:24:47 -0700 (PDT) In-Reply-To: <201210211152.q9LBqGZc066660@svn.freebsd.org> References: <201210211152.q9LBqGZc066660@svn.freebsd.org> Date: Sun, 21 Oct 2012 15:24:47 +0100 X-Google-Sender-Auth: _yuOQjGA9xzGdpFJu16cWjmXxHc Message-ID: Subject: Re: svn commit: r241805 - in user/andre/tcp_workqueue/sys: kern sys From: Attilio Rao To: Andre Oppermann Content-Type: text/plain; charset=UTF-8 Cc: src-committers@freebsd.org, svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 14:24:50 -0000 On Sun, Oct 21, 2012 at 12:52 PM, Andre Oppermann wrote: > Author: andre > Date: Sun Oct 21 11:52:16 2012 > New Revision: 241805 > URL: http://svn.freebsd.org/changeset/base/241805 > > Log: > Add MTX_DEF_SYSINIT() macro which combines defining a global mutex > with initializing it and ensuring the cache line alignment. If you really want such api (I'm not entirely sure i like it because it could lead to less readability in my opinion), can I suggest that you also unify the behaviour with other current kernel users? This way we have at least a defined and clear policy (and also that you submit it before to merge in -CURRENT the workqueue branch). Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 22:47:12 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B1FF14B9 for ; Sun, 21 Oct 2012 22:47:12 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 111518FC0C for ; Sun, 21 Oct 2012 22:47:11 +0000 (UTC) Received: (qmail 55812 invoked from network); 22 Oct 2012 00:25:23 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 22 Oct 2012 00:25:23 -0000 Message-ID: <50847B60.3080108@freebsd.org> Date: Mon, 22 Oct 2012 00:46:56 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: attilio@FreeBSD.org Subject: Re: svn commit: r241805 - in user/andre/tcp_workqueue/sys: kern sys References: <201210211152.q9LBqGZc066660@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 22:47:12 -0000 On 21.10.2012 16:24, Attilio Rao wrote: > On Sun, Oct 21, 2012 at 12:52 PM, Andre Oppermann wrote: >> Author: andre >> Date: Sun Oct 21 11:52:16 2012 >> New Revision: 241805 >> URL: http://svn.freebsd.org/changeset/base/241805 >> >> Log: >> Add MTX_DEF_SYSINIT() macro which combines defining a global mutex >> with initializing it and ensuring the cache line alignment. > > If you really want such api (I'm not entirely sure i like it because > it could lead to less readability in my opinion), can I suggest that > you also unify the behaviour with other current kernel users? This way > we have at least a defined and clear policy (and also that you submit > it before to merge in -CURRENT the workqueue branch). See r241815 for first batch. :) -- Andre From owner-svn-src-user@FreeBSD.ORG Sun Oct 21 23:51:45 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE5E7D02; Sun, 21 Oct 2012 23:51:45 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id E22478FC22; Sun, 21 Oct 2012 23:51:44 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so1685077lbd.13 for ; Sun, 21 Oct 2012 16:51:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=4s0qitHgWMgMK51doIApq/ki6NFRcQoauvn2ZLq+Xng=; b=Sk0a0d7nslg57iRyZc6jfnrECt1Fqks2WcRtgSa1uf8YkbY4AYiDdvxOaN6Zrd622+ CADUOga+F9lxZ6NEQ+cVIJCtzQ1dH6m2UxNvgMAZZU4kdxKLxdv1CHXC2i1jm1Id7hft e/JpgnrNsdCyKDlrwLX6FZx3Q4dCtMBsIZDIz7lbifeRLjhaHR3KbLMLwF6hB1i9O21c wxBrLYRM1awOUOtGZmdwHejvcgG5DbPpl6ZUkhIHmJAJMCaYMjGCBBvc7gzdXqKDZkO6 bLkjYl/A8WFqXm1DU/mUEtMD/qiViuMoomkQQFF1RvaCGaR1Y7ICdJasqPUwKKTVsAs1 wxcQ== MIME-Version: 1.0 Received: by 10.152.129.197 with SMTP id ny5mr4345317lab.43.1350863503734; Sun, 21 Oct 2012 16:51:43 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Sun, 21 Oct 2012 16:51:43 -0700 (PDT) In-Reply-To: <50847B60.3080108@freebsd.org> References: <201210211152.q9LBqGZc066660@svn.freebsd.org> <50847B60.3080108@freebsd.org> Date: Mon, 22 Oct 2012 00:51:43 +0100 X-Google-Sender-Auth: AyxAgH7XS08B_VBUkY05ZN-cPy0 Message-ID: Subject: Re: svn commit: r241805 - in user/andre/tcp_workqueue/sys: kern sys From: Attilio Rao To: Andre Oppermann Content-Type: text/plain; charset=UTF-8 Cc: src-committers@freebsd.org, svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 23:51:45 -0000 On Sun, Oct 21, 2012 at 11:46 PM, Andre Oppermann wrote: > On 21.10.2012 16:24, Attilio Rao wrote: >> >> On Sun, Oct 21, 2012 at 12:52 PM, Andre Oppermann >> wrote: >>> >>> Author: andre >>> Date: Sun Oct 21 11:52:16 2012 >>> New Revision: 241805 >>> URL: http://svn.freebsd.org/changeset/base/241805 >>> >>> Log: >>> Add MTX_DEF_SYSINIT() macro which combines defining a global mutex >>> with initializing it and ensuring the cache line alignment. >> >> >> If you really want such api (I'm not entirely sure i like it because >> it could lead to less readability in my opinion), can I suggest that >> you also unify the behaviour with other current kernel users? This way >> we have at least a defined and clear policy (and also that you submit >> it before to merge in -CURRENT the workqueue branch). > > > See r241815 for first batch. :) Cool, thanks. Please merge this whole patch alone. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Mon Oct 22 14:18:24 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 55D2718D; Mon, 22 Oct 2012 14:18:24 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 389EB8FC0C; Mon, 22 Oct 2012 14:18:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9MEIOah026782; Mon, 22 Oct 2012 14:18:24 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MEINkr026751; Mon, 22 Oct 2012 14:18:23 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210221418.q9MEINkr026751@svn.freebsd.org> From: Andre Oppermann Date: Mon, 22 Oct 2012 14:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 14:18:24 -0000 Author: andre Date: Mon Oct 22 14:18:22 2012 New Revision: 241889 URL: http://svn.freebsd.org/changeset/base/241889 Log: Second pass at making global mutexes use MTX_DEF_SYSINIT(). Modified: user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c user/andre/tcp_workqueue/sys/ddb/db_script.c user/andre/tcp_workqueue/sys/dev/acpica/acpivar.h user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c user/andre/tcp_workqueue/sys/dev/ipmi/ipmi_smbios.c user/andre/tcp_workqueue/sys/dev/ppbus/if_plip.c user/andre/tcp_workqueue/sys/dev/sbni/if_sbni.c user/andre/tcp_workqueue/sys/dev/snp/snp.c user/andre/tcp_workqueue/sys/dev/sound/pcm/channel.c user/andre/tcp_workqueue/sys/fs/devfs/devfs_dir.c user/andre/tcp_workqueue/sys/fs/devfs/devfs_vnops.c user/andre/tcp_workqueue/sys/fs/nfsclient/nfs_clvnops.c user/andre/tcp_workqueue/sys/geom/journal/g_journal.c user/andre/tcp_workqueue/sys/mips/atheros/if_arge.c user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-mdio.c user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-rgmii.c user/andre/tcp_workqueue/sys/mips/mips/busdma_machdep.c user/andre/tcp_workqueue/sys/mips/sibyte/sb_zbbus.c user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c user/andre/tcp_workqueue/sys/pc98/cbus/cbus_dma.c user/andre/tcp_workqueue/sys/security/mac/mac_net.c user/andre/tcp_workqueue/sys/ufs/ffs/ffs_snapshot.c user/andre/tcp_workqueue/sys/ufs/ffs/ffs_softdep.c user/andre/tcp_workqueue/sys/x86/isa/isa_dma.c user/andre/tcp_workqueue/sys/xen/evtchn/evtchn.c user/andre/tcp_workqueue/sys/xen/gnttab.c Modified: user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c ============================================================================== --- user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Mon Oct 22 14:18:22 2012 (r241889) @@ -163,9 +163,7 @@ static TAILQ_HEAD(,bus_dmamap) dmamap_fr #define BUSDMA_STATIC_MAPS 500 static struct bus_dmamap map_pool[BUSDMA_STATIC_MAPS]; -static struct mtx busdma_mtx; - -MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF); +static MTX_DEF_SYSINIT(busdma_mtx, "busdma lock", MTX_DEF); static void init_bounce_pages(void *dummy); static int alloc_bounce_zone(bus_dma_tag_t dmat); Modified: user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c Mon Oct 22 14:18:22 2012 (r241889) @@ -35,8 +35,7 @@ __FBSDID("$FreeBSD$"); #ifdef _KERNEL #include -struct mtx atomic_mtx; -MTX_SYSINIT(atomic, &atomic_mtx, "atomic", MTX_DEF); +MTX_DEF_SYSINIT(atomic_mtx, "atomic", MTX_DEF); #else #include Modified: user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Mon Oct 22 14:18:22 2012 (r241889) @@ -58,8 +58,7 @@ struct kmem_item { LIST_ENTRY(kmem_item) next; }; static LIST_HEAD(, kmem_item) kmem_items; -static struct mtx kmem_items_mtx; -MTX_SYSINIT(kmem_items_mtx, &kmem_items_mtx, "kmem_items", MTX_DEF); +static MTX_DEF_SYSINIT(kmem_items_mtx, "kmem_items", MTX_DEF); #endif /* KMEM_DEBUG */ void * Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Oct 22 14:18:22 2012 (r241889) @@ -232,8 +232,7 @@ static dtrace_helpers_t *dtrace_deferred static dtrace_enabling_t *dtrace_retained; /* list of retained enablings */ static dtrace_dynvar_t dtrace_dynhash_sink; /* end of dynamic hash chains */ #if !defined(sun) -static struct mtx dtrace_unr_mtx; -MTX_SYSINIT(dtrace_unr_mtx, &dtrace_unr_mtx, "Unique resource identifier", MTX_DEF); +static MTX_DEF_SYSINIT(dtrace_unr_mtx, "Unique resource identifier", MTX_DEF); int dtrace_in_probe; /* non-zero if executing a probe */ #if defined(__i386__) || defined(__amd64__) || defined(__mips__) uintptr_t dtrace_in_probe_addr; /* Address of invop when already in probe */ Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Oct 22 14:18:22 2012 (r241889) @@ -63,8 +63,7 @@ #include #include "zfs_comutil.h" -struct mtx zfs_debug_mtx; -MTX_SYSINIT(zfs_debug_mtx, &zfs_debug_mtx, "zfs_debug", MTX_DEF); +MTX_DEF_SYSINIT(zfs_debug_mtx, "zfs_debug", MTX_DEF); SYSCTL_NODE(_vfs, OID_AUTO, zfs, CTLFLAG_RW, 0, "ZFS file system"); Modified: user/andre/tcp_workqueue/sys/ddb/db_script.c ============================================================================== --- user/andre/tcp_workqueue/sys/ddb/db_script.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/ddb/db_script.c Mon Oct 22 14:18:22 2012 (r241889) @@ -111,8 +111,7 @@ static char db_static_buffer[DB_MAXSCRIP * processes. Sysctl procedures acquire db_script_mtx before accessing the * global script data structures. */ -static struct mtx db_script_mtx; -MTX_SYSINIT(db_script_mtx, &db_script_mtx, "db_script_mtx", MTX_DEF); +static MTX_DEF_SYSINIT(db_script_mtx, "db_script_mtx", MTX_DEF); /* * Some script names have special meaning, such as those executed Modified: user/andre/tcp_workqueue/sys/dev/acpica/acpivar.h ============================================================================== --- user/andre/tcp_workqueue/sys/dev/acpica/acpivar.h Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/dev/acpica/acpivar.h Mon Oct 22 14:18:22 2012 (r241889) @@ -149,8 +149,7 @@ extern struct mtx acpi_mutex; #define ACPI_UNLOCK(sys) mtx_unlock(&sys##_mutex) #define ACPI_LOCK_ASSERT(sys) mtx_assert(&sys##_mutex, MA_OWNED); #define ACPI_LOCK_DECL(sys, name) \ - static struct mtx sys##_mutex; \ - MTX_SYSINIT(sys##_mutex, &sys##_mutex, name, MTX_DEF) + static MTX_DEF_SYSINIT(sys##_mutex, name, MTX_DEF) #define ACPI_SERIAL_BEGIN(sys) sx_xlock(&sys##_sxlock) #define ACPI_SERIAL_END(sys) sx_xunlock(&sys##_sxlock) #define ACPI_SERIAL_ASSERT(sys) sx_assert(&sys##_sxlock, SX_XLOCKED); Modified: user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c Mon Oct 22 14:18:22 2012 (r241889) @@ -70,9 +70,7 @@ * XXX This is a global lock for now; it should be pushed to * a per-device lock in some platform-independent fashion. */ -struct mtx ah_regser_mtx; -MTX_SYSINIT(ah_regser, &ah_regser_mtx, "Atheros register access mutex", - MTX_SPIN); +MTX_DEF_SYSINIT(ah_regser_mtx, "Atheros register access mutex", MTX_SPIN); extern void ath_hal_printf(struct ath_hal *, const char*, ...) __printflike(2,3); Modified: user/andre/tcp_workqueue/sys/dev/ipmi/ipmi_smbios.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ipmi/ipmi_smbios.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/dev/ipmi/ipmi_smbios.c Mon Oct 22 14:18:22 2012 (r241889) @@ -83,8 +83,7 @@ typedef void (*smbios_callback_t)(struct static struct ipmi_get_info ipmi_info; static int ipmi_probed; -static struct mtx ipmi_info_mtx; -MTX_SYSINIT(ipmi_info, &ipmi_info_mtx, "ipmi info", MTX_DEF); +static MTX_DEF_SYSINIT(ipmi_info_mtx, "ipmi info", MTX_DEF); static void ipmi_smbios_probe(struct ipmi_get_info *); static int smbios_cksum(struct smbios_eps *); Modified: user/andre/tcp_workqueue/sys/dev/ppbus/if_plip.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ppbus/if_plip.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/dev/ppbus/if_plip.c Mon Oct 22 14:18:22 2012 (r241889) @@ -156,8 +156,7 @@ struct lp_data { void *sc_intr_cookie; }; -static struct mtx lp_tables_lock; -MTX_SYSINIT(lp_tables, &lp_tables_lock, "plip tables", MTX_DEF); +static MTX_DEF_SYSINIT(lp_tables_lock, "plip tables", MTX_DEF); /* Tables for the lp# interface */ static u_char *txmith; Modified: user/andre/tcp_workqueue/sys/dev/sbni/if_sbni.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/sbni/if_sbni.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/dev/sbni/if_sbni.c Mon Oct 22 14:18:22 2012 (r241889) @@ -125,8 +125,7 @@ static __inline void sbni_outsb(struct s static u_int32_t crc32tab[]; #ifdef SBNI_DUAL_COMPOUND -static struct mtx headlist_lock; -MTX_SYSINIT(headlist_lock, &headlist_lock, "sbni headlist", MTX_DEF); +static MTX_DEF_SYSINIT(headlist_lock, "sbni headlist", MTX_DEF); static struct sbni_softc *sbni_headlist; #endif Modified: user/andre/tcp_workqueue/sys/dev/snp/snp.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/snp/snp.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/dev/snp/snp.c Mon Oct 22 14:18:22 2012 (r241889) @@ -47,8 +47,7 @@ static MALLOC_DEFINE(M_SNP, "snp", "tty /* XXX: should be mtx, but TTY can be locked by Giant. */ #if 0 -static struct mtx snp_register_lock; -MTX_SYSINIT(snp_register_lock, &snp_register_lock, +static MTX_DEF_SYSINIT(snp_register_lock, "tty snoop registration", MTX_DEF); #define SNP_LOCK() mtx_lock(&snp_register_lock) #define SNP_UNLOCK() mtx_unlock(&snp_register_lock) Modified: user/andre/tcp_workqueue/sys/dev/sound/pcm/channel.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/sound/pcm/channel.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/dev/sound/pcm/channel.c Mon Oct 22 14:18:22 2012 (r241889) @@ -211,8 +211,7 @@ SYSCTL_INT(_hw_snd, OID_AUTO, syncdelay, * Clients should acquire this lock @b without holding any channel locks * before touching syncgroups or the main syncgroup list. */ -struct mtx snd_pcm_syncgroups_mtx; -MTX_SYSINIT(pcm_syncgroup, &snd_pcm_syncgroups_mtx, "PCM channel sync group lock", MTX_DEF); +MTX_DEF_SYSINIT(snd_pcm_syncgroups_mtx, "PCM channel sync group lock", MTX_DEF); /** * @brief syncgroups' master list * Modified: user/andre/tcp_workqueue/sys/fs/devfs/devfs_dir.c ============================================================================== --- user/andre/tcp_workqueue/sys/fs/devfs/devfs_dir.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/fs/devfs/devfs_dir.c Mon Oct 22 14:18:22 2012 (r241889) @@ -52,8 +52,7 @@ static LIST_HEAD(, dirlistent) devfs_dir static MALLOC_DEFINE(M_DEVFS4, "DEVFS4", "DEVFS directory list"); -static struct mtx dirlist_mtx; -MTX_SYSINIT(dirlist_mtx, &dirlist_mtx, "devfs dirlist lock", MTX_DEF); +static MTX_DEF_SYSINIT(dirlist_mtx, "devfs dirlist lock", MTX_DEF); /* Returns 1 if the path is in the directory list. */ int Modified: user/andre/tcp_workqueue/sys/fs/devfs/devfs_vnops.c ============================================================================== --- user/andre/tcp_workqueue/sys/fs/devfs/devfs_vnops.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/fs/devfs/devfs_vnops.c Mon Oct 22 14:18:22 2012 (r241889) @@ -73,12 +73,10 @@ static struct fileops devfs_ops_f; static MALLOC_DEFINE(M_CDEVPDATA, "DEVFSP", "Metainfo for cdev-fp data"); -struct mtx devfs_de_interlock; -MTX_SYSINIT(devfs_de_interlock, &devfs_de_interlock, "devfs interlock", MTX_DEF); +MTX_DEF_SYSINIT(devfs_de_interlock, "devfs interlock", MTX_DEF); struct sx clone_drain_lock; SX_SYSINIT(clone_drain_lock, &clone_drain_lock, "clone events drain lock"); -struct mtx cdevpriv_mtx; -MTX_SYSINIT(cdevpriv_mtx, &cdevpriv_mtx, "cdevpriv lock", MTX_DEF); +MTX_DEF_SYSINIT(cdevpriv_mtx, "cdevpriv lock", MTX_DEF); static int devfs_fp_check(struct file *fp, struct cdev **devp, struct cdevsw **dswp, Modified: user/andre/tcp_workqueue/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- user/andre/tcp_workqueue/sys/fs/nfsclient/nfs_clvnops.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/fs/nfsclient/nfs_clvnops.c Mon Oct 22 14:18:22 2012 (r241889) @@ -1481,9 +1481,7 @@ nfs_mknod(struct vop_mknod_args *ap) return (nfs_mknodrpc(ap->a_dvp, ap->a_vpp, ap->a_cnp, ap->a_vap)); } -static struct mtx nfs_cverf_mtx; -MTX_SYSINIT(nfs_cverf_mtx, &nfs_cverf_mtx, "NFS create verifier mutex", - MTX_DEF); +static MTX_DEF_SYSINIT(nfs_cverf_mtx, "NFS create verifier mutex", MTX_DEF); static nfsquad_t nfs_get_cverf(void) Modified: user/andre/tcp_workqueue/sys/geom/journal/g_journal.c ============================================================================== --- user/andre/tcp_workqueue/sys/geom/journal/g_journal.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/geom/journal/g_journal.c Mon Oct 22 14:18:22 2012 (r241889) @@ -73,8 +73,7 @@ CTASSERT(sizeof(struct g_journal_header) CTASSERT(sizeof(struct g_journal_record_header) <= 512); static MALLOC_DEFINE(M_JOURNAL, "journal_data", "GEOM_JOURNAL Data"); -static struct mtx g_journal_cache_mtx; -MTX_SYSINIT(g_journal_cache, &g_journal_cache_mtx, "cache usage", MTX_DEF); +static MTX_DEF_SYSINIT(g_journal_cache_mtx, "cache usage", MTX_DEF); const struct g_journal_desc *g_journal_filesystems[] = { &g_journal_ufs, Modified: user/andre/tcp_workqueue/sys/mips/atheros/if_arge.c ============================================================================== --- user/andre/tcp_workqueue/sys/mips/atheros/if_arge.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/mips/atheros/if_arge.c Mon Oct 22 14:18:22 2012 (r241889) @@ -240,9 +240,7 @@ DRIVER_MODULE(mdio, argemdio, mdio_drive */ extern uint32_t ar711_base_mac[ETHER_ADDR_LEN]; -static struct mtx miibus_mtx; - -MTX_SYSINIT(miibus_mtx, &miibus_mtx, "arge mii lock", MTX_DEF); +static MTX_DEF_SYSINIT(miibus_mtx, "arge mii lock", MTX_DEF); /* * Flushes all Modified: user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-mdio.c ============================================================================== --- user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-mdio.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-mdio.c Mon Oct 22 14:18:22 2012 (r241889) @@ -46,8 +46,7 @@ __FBSDID("$FreeBSD$"); #include "wrapper-cvmx-includes.h" #include "ethernet-headers.h" -struct mtx cvm_oct_mdio_mtx; -MTX_SYSINIT(cvm_oct_mdio, &cvm_oct_mdio_mtx, "MDIO", MTX_DEF); +MTX_DEF_SYSINIT(cvm_oct_mdio_mtx, "MDIO", MTX_DEF); /** * Perform an MII read. Called by the generic MII routines Modified: user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-rgmii.c ============================================================================== --- user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-rgmii.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-rgmii.c Mon Oct 22 14:18:22 2012 (r241889) @@ -52,9 +52,7 @@ __FBSDID("$FreeBSD$"); extern int octeon_is_simulation(void); extern struct ifnet *cvm_oct_device[]; -static struct mtx global_register_lock; -MTX_SYSINIT(global_register_lock, &global_register_lock, - "RGMII Global", MTX_SPIN); +static MTX_DEF_SYSINIT(global_register_lock, "RGMII Global", MTX_SPIN); static int number_rgmii_ports; Modified: user/andre/tcp_workqueue/sys/mips/mips/busdma_machdep.c ============================================================================== --- user/andre/tcp_workqueue/sys/mips/mips/busdma_machdep.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/mips/mips/busdma_machdep.c Mon Oct 22 14:18:22 2012 (r241889) @@ -156,9 +156,7 @@ static TAILQ_HEAD(,bus_dmamap) dmamap_fr #define BUSDMA_STATIC_MAPS 500 static struct bus_dmamap map_pool[BUSDMA_STATIC_MAPS]; -static struct mtx busdma_mtx; - -MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF); +static MTX_DEF_SYSINIT(busdma_mtx, "busdma lock", MTX_DEF); static void init_bounce_pages(void *dummy); static int alloc_bounce_zone(bus_dma_tag_t dmat); Modified: user/andre/tcp_workqueue/sys/mips/sibyte/sb_zbbus.c ============================================================================== --- user/andre/tcp_workqueue/sys/mips/sibyte/sb_zbbus.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/mips/sibyte/sb_zbbus.c Mon Oct 22 14:18:22 2012 (r241889) @@ -44,9 +44,7 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_INTMAP, "sb1250 intmap", "Sibyte 1250 Interrupt Mapper"); -static struct mtx zbbus_intr_mtx; -MTX_SYSINIT(zbbus_intr_mtx, &zbbus_intr_mtx, "zbbus_intr_mask/unmask lock", - MTX_SPIN); +static MTX_DEF_SYSINIT(zbbus_intr_mtx, "zbbus_intr_mask/unmask lock", MTX_SPIN); /* * This array holds the mapping between a MIPS hard interrupt and the Modified: user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c Mon Oct 22 14:18:22 2012 (r241889) @@ -991,7 +991,9 @@ syncache_expand(struct in_conninfo *inc, "rejected\n", s, __func__, th->th_seq, sc->sc_irs); goto failed; } - + /* + * If timestamps were not negotiated we don't expect them. + */ if (!(sc->sc_flags & SCF_TIMESTAMP) && (to->to_flags & TOF_TS)) { if ((s = tcp_log_addrs(inc, th, NULL, NULL))) log(LOG_DEBUG, "%s; %s: Timestamp not expected, " @@ -999,6 +1001,19 @@ syncache_expand(struct in_conninfo *inc, goto failed; } /* + * If timestamps were negotiated every packet is required + * to carry them. + * RFC1323, Section X + */ + if ((sc->sc_flags & SCF_TIMESTAMP) && !(to->to_flags & TOF_TS)) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) + log(LOG_DEBUG, "%s; %s: Timestamp expected, " + "rfc violation ignored\n", s, __func__); +#if 0 + goto failed; +#endif + } + /* * If timestamps were negotiated the reflected timestamp * must be equal to what we actually sent in the SYN|ACK. */ Modified: user/andre/tcp_workqueue/sys/pc98/cbus/cbus_dma.c ============================================================================== --- user/andre/tcp_workqueue/sys/pc98/cbus/cbus_dma.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/pc98/cbus/cbus_dma.c Mon Oct 22 14:18:22 2012 (r241889) @@ -72,8 +72,7 @@ static u_int8_t dma_bounced = 0; static u_int8_t dma_busy = 0; /* Used in isa_dmastart() */ static u_int8_t dma_inuse = 0; /* User for acquire/release */ static u_int8_t dma_auto_mode = 0; -static struct mtx isa_dma_lock; -MTX_SYSINIT(isa_dma_lock, &isa_dma_lock, "isa DMA lock", MTX_DEF); +static MTX_DEF_SYSINIT(isa_dma_lock, "isa DMA lock", MTX_DEF); #define VALID_DMA_MASK (3) Modified: user/andre/tcp_workqueue/sys/security/mac/mac_net.c ============================================================================== --- user/andre/tcp_workqueue/sys/security/mac/mac_net.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/security/mac/mac_net.c Mon Oct 22 14:18:22 2012 (r241889) @@ -79,8 +79,7 @@ __FBSDID("$FreeBSD$"); * our own global mutex for struct ifnet. Non-ideal, but should help in the * SMP environment. */ -struct mtx mac_ifnet_mtx; -MTX_SYSINIT(mac_ifnet_mtx, &mac_ifnet_mtx, "mac_ifnet", MTX_DEF); +MTX_DEF_SYSINIT(mac_ifnet_mtx, "mac_ifnet", MTX_DEF); /* * Retrieve the label associated with an mbuf by searching for the tag. Modified: user/andre/tcp_workqueue/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- user/andre/tcp_workqueue/sys/ufs/ffs/ffs_snapshot.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/ufs/ffs/ffs_snapshot.c Mon Oct 22 14:18:22 2012 (r241889) @@ -136,8 +136,7 @@ ffs_sync_snap(mp, waitfor) FEATURE(ffs_snapshot, "FFS snapshot support"); LIST_HEAD(, snapdata) snapfree; -static struct mtx snapfree_lock; -MTX_SYSINIT(ffs_snapfree, &snapfree_lock, "snapdata free list", MTX_DEF); +static MTX_DEF_SYSINIT(snapfree_lock, "snapdata free list", MTX_DEF); static int cgaccount(int, struct vnode *, struct buf *, int); static int expunge_ufs1(struct vnode *, struct inode *, struct fs *, Modified: user/andre/tcp_workqueue/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- user/andre/tcp_workqueue/sys/ufs/ffs/ffs_softdep.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/ufs/ffs/ffs_softdep.c Mon Oct 22 14:18:22 2012 (r241889) @@ -993,8 +993,7 @@ static void softdep_disk_write_complete( static void softdep_deallocate_dependencies(struct buf *); static int softdep_count_dependencies(struct buf *bp, int); -static struct mtx lk; -MTX_SYSINIT(softdep_lock, &lk, "Softdep Lock", MTX_DEF); +static MTX_DEF_SYSINIT(lk, "Softdep Lock", MTX_DEF); #define TRY_ACQUIRE_LOCK(lk) mtx_trylock(lk) #define ACQUIRE_LOCK(lk) mtx_lock(lk) Modified: user/andre/tcp_workqueue/sys/x86/isa/isa_dma.c ============================================================================== --- user/andre/tcp_workqueue/sys/x86/isa/isa_dma.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/x86/isa/isa_dma.c Mon Oct 22 14:18:22 2012 (r241889) @@ -71,8 +71,7 @@ static u_int8_t dma_bounced = 0; static u_int8_t dma_busy = 0; /* Used in isa_dmastart() */ static u_int8_t dma_inuse = 0; /* User for acquire/release */ static u_int8_t dma_auto_mode = 0; -static struct mtx isa_dma_lock; -MTX_SYSINIT(isa_dma_lock, &isa_dma_lock, "isa DMA lock", MTX_DEF); +static MTX_DEF_SYSINIT(isa_dma_lock, "isa DMA lock", MTX_DEF); #define VALID_DMA_MASK (7) Modified: user/andre/tcp_workqueue/sys/xen/evtchn/evtchn.c ============================================================================== --- user/andre/tcp_workqueue/sys/xen/evtchn/evtchn.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/xen/evtchn/evtchn.c Mon Oct 22 14:18:22 2012 (r241889) @@ -44,7 +44,14 @@ static inline unsigned long __ffs(unsign return word; } -static struct mtx irq_mapping_update_lock; +/* + * irq_mapping_update_lock: in order to allow an interrupt to occur in a critical + * section, to set pcpu->ipending (etc...) properly, we + * must be able to get the icu lock, so it can't be + * under witness. + */ +static MTX_DEF_SYSINIT(irq_mapping_update_lock, "xp", MTX_SPIN); + static struct xenpic *xp; struct xenpic_intsrc { struct intsrc xp_intsrc; @@ -1130,11 +1137,4 @@ evtchn_init(void *dummy __unused) } SYSINIT(evtchn_init, SI_SUB_INTR, SI_ORDER_MIDDLE, evtchn_init, NULL); - /* - * irq_mapping_update_lock: in order to allow an interrupt to occur in a critical - * section, to set pcpu->ipending (etc...) properly, we - * must be able to get the icu lock, so it can't be - * under witness. - */ -MTX_SYSINIT(irq_mapping_update_lock, &irq_mapping_update_lock, "xp", MTX_SPIN); Modified: user/andre/tcp_workqueue/sys/xen/gnttab.c ============================================================================== --- user/andre/tcp_workqueue/sys/xen/gnttab.c Mon Oct 22 14:10:17 2012 (r241888) +++ user/andre/tcp_workqueue/sys/xen/gnttab.c Mon Oct 22 14:18:22 2012 (r241889) @@ -49,7 +49,8 @@ static unsigned int nr_grant_frames; static unsigned int boot_max_nr_grant_frames; static int gnttab_free_count; static grant_ref_t gnttab_free_head; -static struct mtx gnttab_list_lock; + +static MTX_DEF_SYSINIT(gnttab_list_lock, "GNTTAB LOCK", MTX_DEF); static grant_entry_t *shared; @@ -706,4 +707,3 @@ ini_nomem: } -MTX_SYSINIT(gnttab, &gnttab_list_lock, "GNTTAB LOCK", MTX_DEF); From owner-svn-src-user@FreeBSD.ORG Mon Oct 22 14:24:00 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E306C64E; Mon, 22 Oct 2012 14:24:00 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C44728FC19; Mon, 22 Oct 2012 14:24:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9MEO0Wd027681; Mon, 22 Oct 2012 14:24:00 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MEO0Tk027648; Mon, 22 Oct 2012 14:24:00 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210221424.q9MEO0Tk027648@svn.freebsd.org> From: Andre Oppermann Date: Mon, 22 Oct 2012 14:24:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241890 - in user/andre/tcp_workqueue/sys: arm/broadcom/bcm2835 arm/ti/am335x arm/ti/cpsw boot/common boot/efi boot/ficl boot/i386 boot/i386/libi386 boot/uboot/lib boot/userboot/ficl bo... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 14:24:01 -0000 Author: andre Date: Mon Oct 22 14:23:59 2012 New Revision: 241890 URL: http://svn.freebsd.org/changeset/base/241890 Log: Integrate from HEAD @241889. Added: user/andre/tcp_workqueue/sys/powerpc/conf/WII - copied unchanged from r241889, head/sys/powerpc/conf/WII Modified: user/andre/tcp_workqueue/sys/arm/broadcom/bcm2835/bcm2835_systimer.c user/andre/tcp_workqueue/sys/arm/ti/am335x/am335x_dmtimer.c user/andre/tcp_workqueue/sys/arm/ti/cpsw/if_cpsw.c user/andre/tcp_workqueue/sys/boot/common/disk.c user/andre/tcp_workqueue/sys/boot/common/disk.h user/andre/tcp_workqueue/sys/boot/efi/Makefile.inc user/andre/tcp_workqueue/sys/boot/ficl/Makefile user/andre/tcp_workqueue/sys/boot/i386/Makefile.inc user/andre/tcp_workqueue/sys/boot/i386/libi386/biosdisk.c user/andre/tcp_workqueue/sys/boot/uboot/lib/disk.c user/andre/tcp_workqueue/sys/boot/userboot/ficl/Makefile user/andre/tcp_workqueue/sys/boot/userboot/userboot/userboot_disk.c user/andre/tcp_workqueue/sys/boot/zfs/Makefile user/andre/tcp_workqueue/sys/cam/ata/ata_da.c user/andre/tcp_workqueue/sys/cam/ctl/ctl.c user/andre/tcp_workqueue/sys/cam/scsi/scsi_enc_ses.c user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c user/andre/tcp_workqueue/sys/conf/files user/andre/tcp_workqueue/sys/conf/files.powerpc user/andre/tcp_workqueue/sys/dev/acpica/acpi_video.c user/andre/tcp_workqueue/sys/dev/ahci/ahciem.c user/andre/tcp_workqueue/sys/dev/cxgb/cxgb_main.c user/andre/tcp_workqueue/sys/dev/cxgb/ulp/tom/cxgb_tom.h user/andre/tcp_workqueue/sys/dev/cxgbe/adapter.h user/andre/tcp_workqueue/sys/dev/cxgbe/t4_l2t.h user/andre/tcp_workqueue/sys/dev/cxgbe/t4_main.c user/andre/tcp_workqueue/sys/dev/cxgbe/tom/t4_tom.h user/andre/tcp_workqueue/sys/dev/e1000/if_lem.c user/andre/tcp_workqueue/sys/dev/hpt27xx/os_bsd.c user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_core.c user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_intel.c user/andre/tcp_workqueue/sys/dev/hwpmc/pmc_events.h user/andre/tcp_workqueue/sys/dev/isf/isf.c user/andre/tcp_workqueue/sys/dev/mps/mps_sas.c user/andre/tcp_workqueue/sys/dev/mps/mps_user.c user/andre/tcp_workqueue/sys/dev/mpt/mpt.c user/andre/tcp_workqueue/sys/dev/mpt/mpt.h user/andre/tcp_workqueue/sys/dev/mpt/mpt_cam.c user/andre/tcp_workqueue/sys/dev/mpt/mpt_debug.c user/andre/tcp_workqueue/sys/dev/mpt/mpt_pci.c user/andre/tcp_workqueue/sys/dev/mpt/mpt_raid.c user/andre/tcp_workqueue/sys/dev/netmap/netmap_mem2.c user/andre/tcp_workqueue/sys/dev/oce/oce_if.c user/andre/tcp_workqueue/sys/dev/pci/pcireg.h user/andre/tcp_workqueue/sys/dev/sound/pci/hda/hdaa.c user/andre/tcp_workqueue/sys/dev/tws/tws.c user/andre/tcp_workqueue/sys/dev/tws/tws.h user/andre/tcp_workqueue/sys/dev/tws/tws_cam.c user/andre/tcp_workqueue/sys/dev/tws/tws_hdm.h user/andre/tcp_workqueue/sys/dev/tws/tws_user.c user/andre/tcp_workqueue/sys/dev/usb/input/uhid.c user/andre/tcp_workqueue/sys/dev/usb/net/if_ipheth.c user/andre/tcp_workqueue/sys/dev/usb/net/if_smsc.c user/andre/tcp_workqueue/sys/dev/usb/usbdevs user/andre/tcp_workqueue/sys/fs/nandfs/nandfs_subr.c user/andre/tcp_workqueue/sys/kern/kern_sig.c user/andre/tcp_workqueue/sys/kern/sched_ule.c user/andre/tcp_workqueue/sys/kern/uipc_socket.c user/andre/tcp_workqueue/sys/mips/rmi/xlr_i2c.c user/andre/tcp_workqueue/sys/modules/3dfx/Makefile user/andre/tcp_workqueue/sys/modules/cmx/Makefile user/andre/tcp_workqueue/sys/modules/filemon/Makefile user/andre/tcp_workqueue/sys/net/pfil.c user/andre/tcp_workqueue/sys/net/pfil.h user/andre/tcp_workqueue/sys/netinet/tcp_hostcache.c user/andre/tcp_workqueue/sys/netinet6/in6_rmx.c user/andre/tcp_workqueue/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c user/andre/tcp_workqueue/sys/ofed/drivers/net/mlx4/en_netdev.c user/andre/tcp_workqueue/sys/ofed/drivers/net/mlx4/en_rx.c user/andre/tcp_workqueue/sys/powerpc/conf/NOTES user/andre/tcp_workqueue/sys/powerpc/wii/platform_wii.c user/andre/tcp_workqueue/sys/powerpc/wii/wii_ipcreg.h user/andre/tcp_workqueue/sys/sparc64/include/intr_machdep.h user/andre/tcp_workqueue/sys/sparc64/sparc64/interrupt.S user/andre/tcp_workqueue/sys/sparc64/sparc64/intr_machdep.c user/andre/tcp_workqueue/sys/sparc64/sparc64/tick.c user/andre/tcp_workqueue/sys/sys/ipc.h user/andre/tcp_workqueue/sys/sys/pmc.h user/andre/tcp_workqueue/sys/vm/uma_core.c user/andre/tcp_workqueue/sys/xen/interface/foreign/mkheader.py Directory Properties: user/andre/tcp_workqueue/sys/ (props changed) user/andre/tcp_workqueue/sys/boot/ (props changed) user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/ (props changed) user/andre/tcp_workqueue/sys/conf/ (props changed) Modified: user/andre/tcp_workqueue/sys/arm/broadcom/bcm2835/bcm2835_systimer.c ============================================================================== --- user/andre/tcp_workqueue/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Mon Oct 22 14:23:59 2012 (r241890) @@ -1,4 +1,4 @@ -/*- +/* * Copyright (c) 2012 Oleksandr Tymoshenko * Copyright (c) 2012 Damjan Marion * All rights reserved. @@ -280,7 +280,7 @@ DELAY(int usec) } /* Get the number of times to count */ - counts = usec * ((bcm_systimer_tc.tc_frequency / 1000000) + 1);; + counts = usec * ((bcm_systimer_tc.tc_frequency / 1000000) + 1); first = bcm_systimer_tc_read_4(SYSTIMER_CLO); Modified: user/andre/tcp_workqueue/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- user/andre/tcp_workqueue/sys/arm/ti/am335x/am335x_dmtimer.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/arm/ti/am335x/am335x_dmtimer.c Mon Oct 22 14:23:59 2012 (r241890) @@ -368,7 +368,7 @@ DELAY(int usec) } /* Get the number of times to count */ - counts = usec * ((am335x_dmtimer_tc.tc_frequency / 1000000) + 1);; + counts = usec * ((am335x_dmtimer_tc.tc_frequency / 1000000) + 1); first = am335x_dmtimer_tc_read_4(DMTIMER_TCRR); Modified: user/andre/tcp_workqueue/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- user/andre/tcp_workqueue/sys/arm/ti/cpsw/if_cpsw.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/arm/ti/cpsw/if_cpsw.c Mon Oct 22 14:23:59 2012 (r241890) @@ -800,6 +800,7 @@ cpsw_intr_rx_locked(void *arg) cpsw_write_4(CPSW_CPDMA_RX_CP(0), cpsw_cpdma_rxbd_paddr(i)); bus_dmamap_sync(sc->mbuf_dtag, sc->rx_dmamap[i], BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->mbuf_dtag, sc->rx_dmamap[i]); /* Fill mbuf */ sc->rx_mbuf[i]->m_hdr.mh_data += bd.bufoff; @@ -817,11 +818,6 @@ cpsw_intr_rx_locked(void *arg) } } - bus_dmamap_sync(sc->mbuf_dtag, - sc->rx_dmamap[i], - BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(sc->mbuf_dtag, sc->rx_dmamap[i]); - /* Handover packet */ CPSW_RX_UNLOCK(sc); (*ifp->if_input)(ifp, sc->rx_mbuf[i]); Modified: user/andre/tcp_workqueue/sys/boot/common/disk.c ============================================================================== --- user/andre/tcp_workqueue/sys/boot/common/disk.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/boot/common/disk.c Mon Oct 22 14:23:59 2012 (r241890) @@ -47,6 +47,7 @@ struct open_disk { struct ptable *table; off_t mediasize; u_int sectorsize; + u_int flags; int rcnt; }; @@ -232,16 +233,20 @@ disk_print(struct disk_devdesc *dev, cha } int -disk_open(struct disk_devdesc *dev, off_t mediasize, u_int sectorsize) +disk_open(struct disk_devdesc *dev, off_t mediasize, u_int sectorsize, + u_int flags) { struct open_disk *od; struct ptable *table; struct ptable_entry part; int rc, slice, partition; - rc = disk_lookup(dev); - if (rc == 0) - return (0); + rc = 0; + if ((flags & DISK_F_NOCACHE) == 0) { + rc = disk_lookup(dev); + if (rc == 0) + return (0); + } /* * While we are reading disk metadata, make sure we do it relative * to the start of the disk @@ -267,11 +272,12 @@ disk_open(struct disk_devdesc *dev, off_ DEBUG("no memory"); return (ENOMEM); } + dev->d_opendata = od; + od->rcnt = 0; } - dev->d_opendata = od; od->mediasize = mediasize; od->sectorsize = sectorsize; - od->rcnt = 0; + od->flags = flags; DEBUG("%s unit %d, slice %d, partition %d => %p", disk_fmtdev(dev), dev->d_unit, dev->d_slice, dev->d_partition, od); @@ -304,6 +310,13 @@ opened: if (ptable_gettype(od->table) == PTABLE_GPT) { partition = 255; goto out; /* Nothing more to do */ + } else if (partition == 255) { + /* + * When we try to open GPT partition, but partition + * table isn't GPT, reset d_partition value to -1 + * and try to autodetect appropriate value. + */ + partition = -1; } /* * If d_partition < 0 and we are looking at a BSD slice, @@ -348,7 +361,8 @@ out: } DEBUG("%s could not open", disk_fmtdev(dev)); } else { - disk_insert(dev); + if ((flags & DISK_F_NOCACHE) == 0) + disk_insert(dev); /* Save the slice and partition number to the dev */ dev->d_slice = slice; dev->d_partition = partition; @@ -361,12 +375,14 @@ out: int disk_close(struct disk_devdesc *dev) { -#if DISK_DEBUG struct open_disk *od; od = (struct open_disk *)dev->d_opendata; DEBUG("%s closed => %p [%d]", disk_fmtdev(dev), od, od->rcnt); -#endif + if (od->flags & DISK_F_NOCACHE) { + ptable_close(od->table); + free(od); + } return (0); } Modified: user/andre/tcp_workqueue/sys/boot/common/disk.h ============================================================================== --- user/andre/tcp_workqueue/sys/boot/common/disk.h Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/boot/common/disk.h Mon Oct 22 14:23:59 2012 (r241890) @@ -93,7 +93,8 @@ struct disk_devdesc * Parse disk metadata and initialise dev->d_offset. */ extern int disk_open(struct disk_devdesc *dev, off_t mediasize, - u_int sectorsize); + u_int sectorsize, u_int flags); +#define DISK_F_NOCACHE 0x0001 /* Do not use metadata caching */ extern int disk_close(struct disk_devdesc *dev); extern void disk_cleanup(const struct devsw *d_dev); Modified: user/andre/tcp_workqueue/sys/boot/efi/Makefile.inc ============================================================================== --- user/andre/tcp_workqueue/sys/boot/efi/Makefile.inc Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/boot/efi/Makefile.inc Mon Oct 22 14:23:59 2012 (r241890) @@ -2,8 +2,12 @@ BINDIR?= /boot +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -march=i386 +.endif + .if ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -m32 -march=i386 +CFLAGS+= -m32 ACFLAGS+= -m32 LDFLAGS+= -m elf_i386_fbsd AFLAGS+= --32 Modified: user/andre/tcp_workqueue/sys/boot/ficl/Makefile ============================================================================== --- user/andre/tcp_workqueue/sys/boot/ficl/Makefile Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/boot/ficl/Makefile Mon Oct 22 14:23:59 2012 (r241890) @@ -8,6 +8,7 @@ SRCS= ${BASE_SRCS} sysdep.c softcore.c CLEANFILES= softcore.c testmain testmain.o CFLAGS+= -ffreestanding .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -march=i386 CFLAGS+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif @@ -39,7 +40,7 @@ SOFTWORDS= softcore.fr jhlocal.fr marker #SOFTWORDS+= oo.fr classes.fr .if ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -m32 -march=i386 -I. +CFLAGS+= -m32 -I. .endif .if ${MACHINE_ARCH} == "powerpc64" Modified: user/andre/tcp_workqueue/sys/boot/i386/Makefile.inc ============================================================================== --- user/andre/tcp_workqueue/sys/boot/i386/Makefile.inc Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/boot/i386/Makefile.inc Mon Oct 22 14:23:59 2012 (r241890) @@ -5,12 +5,12 @@ BINDIR?= /boot LOADER_ADDRESS?=0x200000 -CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 \ +CFLAGS+= -march=i386 -ffreestanding -mpreferred-stack-boundary=2 \ -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float LDFLAGS+= -nostdlib .if ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -m32 -march=i386 +CFLAGS+= -m32 ACFLAGS+= -m32 LDFLAGS+= -m elf_i386_fbsd AFLAGS+= --32 Modified: user/andre/tcp_workqueue/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- user/andre/tcp_workqueue/sys/boot/i386/libi386/biosdisk.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/boot/i386/libi386/biosdisk.c Mon Oct 22 14:23:59 2012 (r241890) @@ -276,7 +276,9 @@ bd_print(int verbose) dev.d_partition = -1; if (disk_open(&dev, bdinfo[i].bd_sectorsize * bdinfo[i].bd_sectors, - bdinfo[i].bd_sectorsize) == 0) { + bdinfo[i].bd_sectorsize, + (bdinfo[i].bd_flags & BD_FLOPPY) ? + DISK_F_NOCACHE: 0) == 0) { sprintf(line, " disk%d", i); disk_print(&dev, line, verbose); disk_close(&dev); @@ -308,7 +310,8 @@ bd_open(struct open_file *f, ...) return (EIO); return (disk_open(dev, BD(dev).bd_sectors * BD(dev).bd_sectorsize, - BD(dev).bd_sectorsize)); + BD(dev).bd_sectorsize, (BD(dev).bd_flags & BD_FLOPPY) ? + DISK_F_NOCACHE: 0)); } static int @@ -645,7 +648,8 @@ bd_getdev(struct i386_devdesc *d) if (biosdev == -1) /* not a BIOS device */ return(-1); if (disk_open(dev, BD(dev).bd_sectors * BD(dev).bd_sectorsize, - BD(dev).bd_sectorsize) != 0) /* oops, not a viable device */ + BD(dev).bd_sectorsize,(BD(dev).bd_flags & BD_FLOPPY) ? + DISK_F_NOCACHE: 0) != 0) /* oops, not a viable device */ return (-1); else disk_close(dev); Modified: user/andre/tcp_workqueue/sys/boot/uboot/lib/disk.c ============================================================================== --- user/andre/tcp_workqueue/sys/boot/uboot/lib/disk.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/boot/uboot/lib/disk.c Mon Oct 22 14:23:59 2012 (r241890) @@ -205,7 +205,7 @@ stor_opendev(struct disk_devdesc *dev) SI(dev).opened++; } return (disk_open(dev, SI(dev).blocks * SI(dev).bsize, - SI(dev).bsize)); + SI(dev).bsize, 0)); } static int Modified: user/andre/tcp_workqueue/sys/boot/userboot/ficl/Makefile ============================================================================== --- user/andre/tcp_workqueue/sys/boot/userboot/ficl/Makefile Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/boot/userboot/ficl/Makefile Mon Oct 22 14:23:59 2012 (r241890) @@ -12,6 +12,7 @@ SRCS= ${BASE_SRCS} sysdep.c softcore.c CLEANFILES= softcore.c testmain testmain.o CFLAGS+= -ffreestanding -fPIC .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +#CFLAGS+= -march=i386 CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 .endif .if ${MACHINE_CPUARCH} == "i386" @@ -46,7 +47,7 @@ SOFTWORDS= softcore.fr jhlocal.fr marker #SOFTWORDS+= oo.fr classes.fr #.if ${MACHINE_CPUARCH} == "amd64" -#CFLAGS+= -m32 -march=i386 -I. +#CFLAGS+= -m32 -I. #.endif .if ${MACHINE_ARCH} == "powerpc64" Modified: user/andre/tcp_workqueue/sys/boot/userboot/userboot/userboot_disk.c ============================================================================== --- user/andre/tcp_workqueue/sys/boot/userboot/userboot/userboot_disk.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/boot/userboot/userboot/userboot_disk.c Mon Oct 22 14:23:59 2012 (r241890) @@ -125,7 +125,7 @@ userdisk_print(int verbose) dev.d_slice = -1; dev.d_partition = -1; if (disk_open(&dev, ud_info[i].mediasize, - ud_info[i].sectorsize) == 0) { + ud_info[i].sectorsize, 0) == 0) { sprintf(line, " disk%d", i); disk_print(&dev, line, verbose); disk_close(&dev); @@ -150,7 +150,7 @@ userdisk_open(struct open_file *f, ...) return (EIO); return (disk_open(dev, ud_info[dev->d_unit].mediasize, - ud_info[dev->d_unit].sectorsize)); + ud_info[dev->d_unit].sectorsize, 0)); } static int Modified: user/andre/tcp_workqueue/sys/boot/zfs/Makefile ============================================================================== --- user/andre/tcp_workqueue/sys/boot/zfs/Makefile Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/boot/zfs/Makefile Mon Oct 22 14:23:59 2012 (r241890) @@ -12,6 +12,7 @@ CFLAGS+= -I${.CURDIR}/../../cddl/boot/zf CFLAGS+= -ffreestanding .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -march=i386 CFLAGS+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif @@ -19,7 +20,7 @@ CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -m CFLAGS+= -msoft-float .endif .if ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -m32 -march=i386 +CFLAGS+= -m32 .endif CFLAGS+= -Wformat -Wall Modified: user/andre/tcp_workqueue/sys/cam/ata/ata_da.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/ata/ata_da.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/cam/ata/ata_da.c Mon Oct 22 14:23:59 2012 (r241890) @@ -269,6 +269,116 @@ static struct ada_quirk_entry ada_quirk_ /*quirks*/ADA_Q_4K }, { + /* + * Corsair Force 2 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Corsair CSSD-F*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * Corsair Force 3 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Corsair Force 3*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * OCZ Agility 3 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "OCZ-AGILITY3*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * OCZ Vertex 2 SSDs (inc pro series) + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "OCZ?VERTEX2*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * OCZ Vertex 3 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "OCZ-VERTEX3*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * SuperTalent TeraDrive CT SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "FTM??CT25H*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * Crucial RealSSD C300 SSDs + * 4k optimised + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "C300-CTFDDAC???MAG*", + "*" }, /*quirks*/ADA_Q_4K + }, + { + /* + * XceedIOPS SATA SSDs + * 4k optimised + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "SG9XCS2D*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * Intel 330 Series SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "INTEL SSDSC2ct*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * OCZ Deneva R Series SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "DENRSTE251M45*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * Kingston HyperX 3k SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "KINGSTON SH103S3*", "*" }, + /*quirks*/ADA_Q_4K + }, + { /* Default */ { T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED, Modified: user/andre/tcp_workqueue/sys/cam/ctl/ctl.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/ctl/ctl.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/cam/ctl/ctl.c Mon Oct 22 14:23:59 2012 (r241890) @@ -480,7 +480,7 @@ ctl_isc_handler_finish_xfer(struct ctl_s memcpy(&ctsio->sense_data, &msg_info->scsi.sense_data, sizeof(ctsio->sense_data)); memcpy(&ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - &msg_info->scsi.lbalen, sizeof(msg_info->scsi.lbalen));; + &msg_info->scsi.lbalen, sizeof(msg_info->scsi.lbalen)); STAILQ_INSERT_TAIL(&ctl_softc->isc_queue, &ctsio->io_hdr, links); ctl_wakeup_thread(); } @@ -12593,7 +12593,7 @@ ctl_process_done(union ctl_io *io, int h */ memcpy(&msg.scsi.lbalen, &io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - sizeof(msg.scsi.lbalen));; + sizeof(msg.scsi.lbalen)); if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, sizeof(msg), 0) > CTL_HA_STATUS_SUCCESS) { Modified: user/andre/tcp_workqueue/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/scsi/scsi_enc_ses.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/cam/scsi/scsi_enc_ses.c Mon Oct 22 14:23:59 2012 (r241890) @@ -1323,7 +1323,7 @@ ses_process_config(enc_softc_t *enc, str enc_cache = &enc->enc_daemon_cache; ses_cache = enc_cache->private; buf = *bufp; - err = -1;; + err = -1; if (error != 0) { err = error; Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Oct 22 14:23:59 2012 (r241890) @@ -3792,8 +3792,16 @@ arc_lowmem(void *arg __unused, int howto mutex_enter(&arc_reclaim_thr_lock); needfree = 1; cv_signal(&arc_reclaim_thr_cv); - while (needfree) - msleep(&needfree, &arc_reclaim_thr_lock, 0, "zfs:lowmem", 0); + + /* + * It is unsafe to block here in arbitrary threads, because we can come + * here from ARC itself and may hold ARC locks and thus risk a deadlock + * with ARC reclaim thread. + */ + if (curproc == pageproc) { + while (needfree) + msleep(&needfree, &arc_reclaim_thr_lock, 0, "zfs:lowmem", 0); + } mutex_exit(&arc_reclaim_thr_lock); mutex_exit(&arc_lowmem_lock); } Modified: user/andre/tcp_workqueue/sys/conf/files ============================================================================== --- user/andre/tcp_workqueue/sys/conf/files Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/conf/files Mon Oct 22 14:23:59 2012 (r241890) @@ -214,6 +214,7 @@ cddl/contrib/opensolaris/uts/common/fs/z cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c optional zfs compile-with "${ZFS_C}" +cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/unique.c optional zfs compile-with "${ZFS_C}" Modified: user/andre/tcp_workqueue/sys/conf/files.powerpc ============================================================================== --- user/andre/tcp_workqueue/sys/conf/files.powerpc Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/conf/files.powerpc Mon Oct 22 14:23:59 2012 (r241890) @@ -232,7 +232,7 @@ powerpc/wii/platform_wii.c optional wii powerpc/wii/wii_bus.c optional wii powerpc/wii/wii_pic.c optional wii powerpc/wii/wii_fb.c optional wii -powerpc/wii/wii_gpio.c optional wii +powerpc/wii/wii_gpio.c optional wiigpio powerpc/wii/wii_ipc.c optional wii compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 Modified: user/andre/tcp_workqueue/sys/dev/acpica/acpi_video.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/acpica/acpi_video.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/dev/acpica/acpi_video.c Mon Oct 22 14:23:59 2012 (r241890) @@ -906,7 +906,8 @@ vid_enum_outputs_subr(ACPI_HANDLE handle for (i = 0; i < argset->dod_pkg->Package.Count; i++) { if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 && - (val & DOD_DEVID_MASK_FULL) == adr) { + (val & DOD_DEVID_MASK_FULL) == + (adr & DOD_DEVID_MASK_FULL)) { argset->callback(handle, val, argset->context); argset->count++; } Modified: user/andre/tcp_workqueue/sys/dev/ahci/ahciem.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ahci/ahciem.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/dev/ahci/ahciem.c Mon Oct 22 14:23:59 2012 (r241890) @@ -87,7 +87,7 @@ ahci_em_attach(device_t dev) if (!(enc->r_memc = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE))) return (ENXIO); - enc->capsem = ATA_INL(enc->r_memc, 0);; + enc->capsem = ATA_INL(enc->r_memc, 0); rid = 1; if (!(enc->r_memt = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE))) { Modified: user/andre/tcp_workqueue/sys/dev/cxgb/cxgb_main.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/cxgb/cxgb_main.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/dev/cxgb/cxgb_main.c Mon Oct 22 14:23:59 2012 (r241890) @@ -2984,7 +2984,7 @@ cxgb_extension_ioctl(struct cdev *dev, u break; } case CHELSIO_SET_FILTER: { - struct ch_filter *f = (struct ch_filter *)data;; + struct ch_filter *f = (struct ch_filter *)data; struct filter_info *p; unsigned int nfilters = sc->params.mc5.nfilters; Modified: user/andre/tcp_workqueue/sys/dev/cxgb/ulp/tom/cxgb_tom.h ============================================================================== --- user/andre/tcp_workqueue/sys/dev/cxgb/ulp/tom/cxgb_tom.h Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/dev/cxgb/ulp/tom/cxgb_tom.h Mon Oct 22 14:23:59 2012 (r241890) @@ -142,7 +142,8 @@ void t3_process_tid_release_list(void *d static inline struct tom_data * t3_tomdata(struct toedev *tod) { - return (member2struct(tom_data, tod, tod)); + + return (__containerof(tod, struct tom_data, tod)); } union listen_entry { Modified: user/andre/tcp_workqueue/sys/dev/cxgbe/adapter.h ============================================================================== --- user/andre/tcp_workqueue/sys/dev/cxgbe/adapter.h Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/dev/cxgbe/adapter.h Mon Oct 22 14:23:59 2012 (r241890) @@ -435,7 +435,7 @@ static inline struct sge_rxq * iq_to_rxq(struct sge_iq *iq) { - return (member2struct(sge_rxq, iq, iq)); + return (__containerof(iq, struct sge_rxq, iq)); } @@ -450,7 +450,7 @@ static inline struct sge_ofld_rxq * iq_to_ofld_rxq(struct sge_iq *iq) { - return (member2struct(sge_ofld_rxq, iq, iq)); + return (__containerof(iq, struct sge_ofld_rxq, iq)); } #endif Modified: user/andre/tcp_workqueue/sys/dev/cxgbe/t4_l2t.h ============================================================================== --- user/andre/tcp_workqueue/sys/dev/cxgbe/t4_l2t.h Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/dev/cxgbe/t4_l2t.h Mon Oct 22 14:23:59 2012 (r241890) @@ -94,7 +94,7 @@ int do_l2t_write_rpl(struct sge_iq *, co static inline void t4_l2t_release(struct l2t_entry *e) { - struct l2t_data *d = member2struct(l2t_data, l2tab[e->idx], e); + struct l2t_data *d = __containerof(e, struct l2t_data, l2tab[e->idx]); if (atomic_fetchadd_int(&e->refcnt, -1) == 1) atomic_add_int(&d->nfree, 1); Modified: user/andre/tcp_workqueue/sys/dev/cxgbe/t4_main.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/cxgbe/t4_main.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/dev/cxgbe/t4_main.c Mon Oct 22 14:23:59 2012 (r241890) @@ -3057,8 +3057,8 @@ t4_register_an_handler(struct adapter *s static int fw_msg_not_handled(struct adapter *sc, const __be64 *rpl) { - __be64 *r = __DECONST(__be64 *, rpl); - struct cpl_fw6_msg *cpl = member2struct(cpl_fw6_msg, data, r); + const struct cpl_fw6_msg *cpl = + __containerof(rpl, struct cpl_fw6_msg, data[0]); #ifdef INVARIANTS panic("%s: fw_msg type %d", __func__, cpl->type); Modified: user/andre/tcp_workqueue/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- user/andre/tcp_workqueue/sys/dev/cxgbe/tom/t4_tom.h Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/dev/cxgbe/tom/t4_tom.h Mon Oct 22 14:23:59 2012 (r241890) @@ -205,7 +205,7 @@ static inline struct tom_data * tod_td(struct toedev *tod) { - return (member2struct(tom_data, tod, tod)); + return (__containerof(tod, struct tom_data, tod)); } static inline struct adapter * Modified: user/andre/tcp_workqueue/sys/dev/e1000/if_lem.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/e1000/if_lem.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/dev/e1000/if_lem.c Mon Oct 22 14:23:59 2012 (r241890) @@ -3425,7 +3425,7 @@ lem_free_receive_structures(struct adapt static bool lem_rxeof(struct adapter *adapter, int count, int *done) { - struct ifnet *ifp = adapter->ifp;; + struct ifnet *ifp = adapter->ifp; struct mbuf *mp; u8 status = 0, accept_frame = 0, eop = 0; u16 len, desc_len, prev_len_adj; Modified: user/andre/tcp_workqueue/sys/dev/hpt27xx/os_bsd.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/hpt27xx/os_bsd.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/dev/hpt27xx/os_bsd.c Mon Oct 22 14:23:59 2012 (r241890) @@ -133,7 +133,7 @@ HPT_U8 pcicfg_read_byte (HPT_U8 bus, HPT } HPT_U32 pcicfg_read_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg) { - return (HPT_U32)pci_cfgregread(bus, dev, func, reg, 4);; + return (HPT_U32)pci_cfgregread(bus, dev, func, reg, 4); } void pcicfg_write_byte (HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg, HPT_U8 v) { Modified: user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_core.c Mon Oct 22 14:18:22 2012 (r241889) +++ user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_core.c Mon Oct 22 14:23:59 2012 (r241890) @@ -559,7 +559,8 @@ struct iap_event_descr { #define IAP_F_WM (1 << 5) /* CPU: Westmere */ #define IAP_F_SB (1 << 6) /* CPU: Sandy Bridge */ #define IAP_F_IB (1 << 7) /* CPU: Ivy Bridge */ -#define IAP_F_FM (1 << 8) /* Fixed mask */ +#define IAP_F_SBX (1 << 8) /* CPU: Sandy Bridge Xeon */ +#define IAP_F_FM (1 << 9) /* Fixed mask */ #define IAP_F_ALLCPUSCORE2 \ (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) @@ -599,12 +600,15 @@ static struct iap_event_descr iap_events IAPDESCR(02H_81H, 0x02, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(03H_00H, 0x03, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB), + IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | + IAP_F_SBX), IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), - IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB), - IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB), + IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | + IAP_F_SBX), + IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | + IAP_F_SBX), IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(04H_00H, 0x04, 0x00, IAP_F_FM | IAP_F_CC), @@ -614,8 +618,10 @@ static struct iap_event_descr iap_events IAPDESCR(04H_08H, 0x04, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB), - IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), + IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O), IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | @@ -628,24 +634,26 @@ static struct iap_event_descr iap_events IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), - IAPDESCR(07H_08H, 0x07, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_SB), + IAPDESCR(07H_08H, 0x07, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_SB | + IAP_F_SBX), IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_WM | IAP_F_SB), + IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_06H, 0x08, 0x06, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_07H, 0x08, 0x07, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB), + IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX), IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O), IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7), @@ -667,10 +675,11 @@ static struct iap_event_descr iap_events IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB), - IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB), + IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB), IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB), @@ -685,19 +694,24 @@ static struct iap_event_descr iap_events IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM | IAP_F_SB), + IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB), - IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB), - IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB), - IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB), + IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX), + IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX), + IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX), + IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX), IAPDESCR(10H_81H, 0x10, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(11H_00H, 0x11, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(11H_01H, 0x11, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_SB), - IAPDESCR(11H_02H, 0x11, 0x02, IAP_F_FM | IAP_F_SB), + IAPDESCR(11H_01H, 0x11, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_SB | + IAP_F_SBX), + IAPDESCR(11H_02H, 0x11, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(11H_81H, 0x11, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), @@ -719,10 +733,11 @@ static struct iap_event_descr iap_events IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB), + IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX), IAPDESCR(18H_00H, 0x18, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(18H_01H, 0x18, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -744,18 +759,29 @@ static struct iap_event_descr iap_events IAPDESCR(23H, 0x23, IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), - IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), - IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), - IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), - IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), - IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), - IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), - IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), - IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), - IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), - IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), + IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), + IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), + IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), + IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), + IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), + IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), + IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), + IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), + IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -775,12 +801,16 @@ static struct iap_event_descr iap_events IAPDESCR(26H_FFH, 0x26, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H, 0x27, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), - IAPDESCR(27H_01H, 0x27, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAPDESCR(27H_01H, 0x27, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), IAPDESCR(27H_02H, 0x27, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(27H_04H, 0x27, 0x04, IAP_F_FM | IAP_F_I7O | IAP_F_SB), - IAPDESCR(27H_08H, 0x27, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAPDESCR(27H_04H, 0x27, 0x04, IAP_F_FM | IAP_F_I7O | IAP_F_SB | + IAP_F_SBX), + IAPDESCR(27H_08H, 0x27, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), IAPDESCR(27H_0EH, 0x27, 0x0E, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(27H_0FH, 0x27, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAPDESCR(27H_0FH, 0x27, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -789,11 +819,13 @@ static struct iap_event_descr iap_events IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(28H, 0x28, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUSCORE2), - IAPDESCR(28H_01H, 0x28, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB), - IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), - IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), - IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB), + IAPDESCR(28H_01H, 0x28, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_SBX), + IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SBX), + IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), + IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), + IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_SBX), IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI, IAP_F_CC), IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, @@ -806,9 +838,9 @@ static struct iap_event_descr iap_events IAPDESCR(2EH_01H, 0x2E, 0x01, IAP_F_FM | IAP_F_WM), IAPDESCR(2EH_02H, 0x2E, 0x02, IAP_F_FM | IAP_F_WM), IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | - IAP_F_SB | IAP_F_IB), + IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | - IAP_F_SB | IAP_F_IB), + IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), @@ -821,9 +853,9 @@ static struct iap_event_descr iap_events IAPDESCR(3BH_C0H, 0x3B, 0xC0, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -864,17 +896,19 @@ static struct iap_event_descr iap_events IAPDESCR(47H_00H, 0x47, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(48H_01H, 0x48, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB), + IAPDESCR(48H_01H, 0x48, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O), IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB), - IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX), + IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB), + IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7), IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O), IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7), @@ -887,14 +921,15 @@ static struct iap_event_descr iap_events IAPDESCR(4CH_00H, 0x4C, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(4CH_01H, 0x4C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB), - IAPDESCR(4CH_02H, 0x4C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB), + IAP_F_SB | IAP_F_IB | IAP_F_SBX), + IAPDESCR(4CH_02H, 0x4C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), IAPDESCR(4DH_01H, 0x4D, 0x01, IAP_F_FM | IAP_F_I7O), IAPDESCR(4EH_01H, 0x4E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(4EH_02H, 0x4E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB), + IAP_F_SB | IAP_F_SBX), IAPDESCR(4EH_04H, 0x4E, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(4EH_10H, 0x4E, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -905,13 +940,13 @@ static struct iap_event_descr iap_events IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM), IAPDESCR(51H_01H, 0x51, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB), + IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(51H_02H, 0x51, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB), + IAP_F_SB | IAP_F_SBX), IAPDESCR(51H_04H, 0x51, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB), + IAP_F_SB | IAP_F_SBX), IAPDESCR(51H_08H, 0x51, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB), + IAP_F_SB | IAP_F_SBX), IAPDESCR(52H_01H, 0x52, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -922,30 +957,33 @@ static struct iap_event_descr iap_events IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB), IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB), - IAPDESCR(59H_20H, 0x59, 0x20, IAP_F_FM | IAP_F_SB), - IAPDESCR(59H_40H, 0x59, 0x40, IAP_F_FM | IAP_F_SB), - IAPDESCR(59H_80H, 0x59, 0x80, IAP_F_FM | IAP_F_SB), - - IAPDESCR(5BH_0CH, 0x5B, 0x0C, IAP_F_FM | IAP_F_SB), - IAPDESCR(5BH_0FH, 0x5B, 0x0F, IAP_F_FM | IAP_F_SB), - IAPDESCR(5BH_40H, 0x5B, 0x40, IAP_F_FM | IAP_F_SB), - IAPDESCR(5BH_4FH, 0x5B, 0x4F, IAP_F_FM | IAP_F_SB), - - IAPDESCR(5CH_01H, 0x5C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB), - IAPDESCR(5CH_02H, 0x5C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB), + IAPDESCR(59H_20H, 0x59, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(59H_40H, 0x59, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(59H_80H, 0x59, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + + IAPDESCR(5BH_0CH, 0x5B, 0x0C, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(5BH_0FH, 0x5B, 0x0F, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(5BH_40H, 0x5B, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(5BH_4FH, 0x5B, 0x4F, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + + IAPDESCR(5CH_01H, 0x5C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), + IAPDESCR(5CH_02H, 0x5C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), - IAPDESCR(5EH_01H, 0x5E, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB), + IAPDESCR(5EH_01H, 0x5E, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX), IAPDESCR(5FH_01H, 0x5F, 0x01, IAP_F_FM | IAP_F_IB), IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(60H_01H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB), + IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(60H_02H, 0x60, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB), IAPDESCR(60H_04H, 0x60, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB), + IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(60H_08H, 0x60, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB), + IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), IAPDESCR(61H_00H, 0x61, 0x00, IAP_F_FM | IAP_F_CC), @@ -957,9 +995,9 @@ static struct iap_event_descr iap_events IAP_F_CA | IAP_F_CC2), IAPDESCR(63H, 0x63, IAP_M_CORE, IAP_F_CC), IAPDESCR(63H_01H, 0x63, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB), + IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(63H_02H, 0x63, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB), + IAP_F_SB | IAP_F_IB | IAP_F_SBX), IAPDESCR(64H, 0x64, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(64H_40H, 0x64, 0x40, IAP_F_FM | IAP_F_CC), @@ -1000,12 +1038,18 @@ static struct iap_event_descr iap_events IAPDESCR(78H, 0x78, IAP_M_CORE, IAP_F_CC), IAPDESCR(78H, 0x78, IAP_M_CORE | IAP_M_SNOOPTYPE, IAP_F_CA | IAP_F_CC2), - IAPDESCR(79H_02H, 0x79, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB), - IAPDESCR(79H_04H, 0x79, 0x04, IAP_F_FM | IAP_F_SB | IAP_F_IB), - IAPDESCR(79H_08H, 0x79, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB), - IAPDESCR(79H_10H, 0x79, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB), - IAPDESCR(79H_20H, 0x79, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB), - IAPDESCR(79H_30H, 0x79, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB), + IAPDESCR(79H_02H, 0x79, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Mon Oct 22 17:10:38 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8D3A9DD; Mon, 22 Oct 2012 17:10:38 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by mx1.freebsd.org (Postfix) with ESMTP id 79FA28FC12; Mon, 22 Oct 2012 17:10:36 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9MHAVAm007951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Oct 2012 04:10:32 +1100 Date: Tue, 23 Oct 2012 04:10:31 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andre Oppermann Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... In-Reply-To: <201210221418.q9MEINkr026751@svn.freebsd.org> Message-ID: <20121023032743.K2804@besplex.bde.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=IbXfwhWa c=1 sm=1 a=yBc9O6YWil4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=71122zBos6gA:10 a=sqi-pC6oGpjiH1UNzKQA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: src-committers@freebsd.org, svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 17:10:39 -0000 On Mon, 22 Oct 2012, Andre Oppermann wrote: > Log: > Second pass at making global mutexes use MTX_DEF_SYSINIT(). > Modified: user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c > ============================================================================== > --- user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Mon Oct 22 14:10:17 2012 (r241888) > +++ user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Mon Oct 22 14:18:22 2012 (r241889) > @@ -163,9 +163,7 @@ static TAILQ_HEAD(,bus_dmamap) dmamap_fr > #define BUSDMA_STATIC_MAPS 500 > static struct bus_dmamap map_pool[BUSDMA_STATIC_MAPS]; > > -static struct mtx busdma_mtx; > - > -MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF); > +static MTX_DEF_SYSINIT(busdma_mtx, "busdma lock", MTX_DEF); The verboser (sic) name is uglier. But once it says DEF, the arg list shouldn't say DEF. Either this is DEF for something unrelated to MTX_DEF, in which case it is confusing and the confusion is made worse by having MTX_ precede DEF in both, or it is the same DEF and the arg is redundant, or it implies MTX_DEF by default but this can be changed, in which case it is confusing. The first seems to apply, since some calls use MTX_SPIN: > ... > Modified: user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c > ============================================================================== > --- user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c Mon Oct 22 14:10:17 2012 (r241888) > +++ user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c Mon Oct 22 14:18:22 2012 (r241889) > @@ -70,9 +70,7 @@ > * XXX This is a global lock for now; it should be pushed to > * a per-device lock in some platform-independent fashion. > */ > -struct mtx ah_regser_mtx; > -MTX_SYSINIT(ah_regser, &ah_regser_mtx, "Atheros register access mutex", > - MTX_SPIN); > +MTX_DEF_SYSINIT(ah_regser_mtx, "Atheros register access mutex", MTX_SPIN); So this is an MTX_DEF that gives MTX_SPIN but not MTX_DEF?! Always aligning to the cache line size can't be quite right. It over-uses addresses that are zero modulo the line size, especially if the alignment is used for objects smaller than the line size. It doesn't give determinism, since cache collisions are still possible due to shortages of tags, especially with lots of objects at the same alignment, and especially with caches of limited associativity. And without a special section for the global aligned objects, you might be unlucky and have them all have offset 0 modulo PAGE_SIZE or similar, and thus have more than the average number of tag collisions. In a test program in userland, I notices many very large performance differences from alignment, and sometimes even larger performance losses from trying tpo hard to line things up. The program is a relatively simple floating point benchmark. The problems are largest in long double precisions. Long doubles take 16 bytes each, and are rather exessively aligned by default, and gcc uses far too much stack space for them. Despite the stack being 16-byte aligned, modifying the environment using something like CFLAGS=-O would change the alignment mod 64 or something significantly enough to give performance differences of up to 50%. The following didn't quite work to give determinism: - -mpreferred-stack-boundary=6 or more. This gives 64-byte or more stack alignment, except it is not supported by clang (clang generally handles stack alignment better, but you can't control it). This also takes much more stack, and sometimes makes the problem worse. But it does make the problem harder to hit by modifiying the environment. Now larger environment changes are normally need to move the stack to the next 64-byte boundary. - align the stack initially to PAGE_SIZE, then try all adjustments of that are multiples of 8 mod PAGE_SIZE. Don't use -mpreferred-stack-boundary now. The best multiples seemed to be 44 * 8 for amd64 and 43 * 8 for i386. (This is on core2 (ref*).). This works better than the above, and is fairly deterministic. But there are still some subtests that run much slower than they should and run at full speed with a different multiple. Their stack use is not signifcantly different, so I suspect some collision with aligned addresses in the data or text sections. The tests are very repetitive, so any cache collisions would probably give the 20-50% slowdowns if the repeated. Some caching schemes use random replacement since nothing is worse than eaccidentally excessive alignment that causes a cache collision repeatedly. Bruce From owner-svn-src-user@FreeBSD.ORG Mon Oct 22 17:23:33 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5453AD54; Mon, 22 Oct 2012 17:23:33 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 330F38FC0A; Mon, 22 Oct 2012 17:23:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9MHNXqJ055288; Mon, 22 Oct 2012 17:23:33 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MHNWA8055285; Mon, 22 Oct 2012 17:23:32 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210221723.q9MHNWA8055285@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 22 Oct 2012 17:23:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241894 - user/np/stable_9_toe/sys/dev/cxgbe/tom X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 17:23:33 -0000 Author: np Date: Mon Oct 22 17:23:32 2012 New Revision: 241894 URL: http://svn.freebsd.org/changeset/base/241894 Log: Pull in latest cxgbe TOE fixes from head (r241626, r241642). Modified: user/np/stable_9_toe/sys/dev/cxgbe/tom/t4_cpl_io.c user/np/stable_9_toe/sys/dev/cxgbe/tom/t4_listen.c Directory Properties: user/np/stable_9_toe/sys/ (props changed) user/np/stable_9_toe/sys/dev/ (props changed) Modified: user/np/stable_9_toe/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- user/np/stable_9_toe/sys/dev/cxgbe/tom/t4_cpl_io.c Mon Oct 22 17:13:15 2012 (r241893) +++ user/np/stable_9_toe/sys/dev/cxgbe/tom/t4_cpl_io.c Mon Oct 22 17:23:32 2012 (r241894) @@ -73,9 +73,9 @@ VNET_DECLARE(int, tcp_autorcvbuf_max); void send_flowc_wr(struct toepcb *toep, struct flowc_tx_params *ftxp) { - struct wrqe *wr; - struct fw_flowc_wr *flowc; - unsigned int nparams = ftxp ? 8 : 4, flowclen; + struct wrqe *wr; + struct fw_flowc_wr *flowc; + unsigned int nparams = ftxp ? 8 : 6, flowclen; struct port_info *pi = toep->port; struct adapter *sc = pi->adapter; unsigned int pfvf = G_FW_VIID_PFN(pi->viid) << S_FW_VIID_PFN; @@ -102,13 +102,13 @@ send_flowc_wr(struct toepcb *toep, struc V_FW_WR_FLOWID(toep->tid)); flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN; - flowc->mnemval[0].val = htobe32(pfvf); - flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; - flowc->mnemval[1].val = htobe32(pi->tx_chan); - flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; - flowc->mnemval[2].val = htobe32(pi->tx_chan); - flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; - flowc->mnemval[3].val = htobe32(toep->ofld_rxq->iq.abs_id); + flowc->mnemval[0].val = htobe32(pfvf); + flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; + flowc->mnemval[1].val = htobe32(pi->tx_chan); + flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; + flowc->mnemval[2].val = htobe32(pi->tx_chan); + flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; + flowc->mnemval[3].val = htobe32(toep->ofld_rxq->iq.abs_id); if (ftxp) { uint32_t sndbuf = min(ftxp->snd_space, sc->tt.sndbuf); @@ -120,6 +120,11 @@ send_flowc_wr(struct toepcb *toep, struc flowc->mnemval[6].val = htobe32(sndbuf); flowc->mnemval[7].mnemonic = FW_FLOWC_MNEM_MSS; flowc->mnemval[7].val = htobe32(ftxp->mss); + } else { + flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; + flowc->mnemval[4].val = htobe32(512); + flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS; + flowc->mnemval[5].val = htobe32(512); } txsd->tx_credits = howmany(flowclen, 16); Modified: user/np/stable_9_toe/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- user/np/stable_9_toe/sys/dev/cxgbe/tom/t4_listen.c Mon Oct 22 17:13:15 2012 (r241893) +++ user/np/stable_9_toe/sys/dev/cxgbe/tom/t4_listen.c Mon Oct 22 17:23:32 2012 (r241894) @@ -271,13 +271,13 @@ send_reset_synqe(struct toedev *tod, str struct ifnet *ifp = m->m_pkthdr.rcvif; struct port_info *pi = ifp->if_softc; struct l2t_entry *e = &sc->l2t->l2tab[synqe->l2e_idx]; - struct wrqe *wr; - struct fw_flowc_wr *flowc; + struct wrqe *wr; + struct fw_flowc_wr *flowc; struct cpl_abort_req *req; int txqid, rxqid, flowclen; struct sge_wrq *ofld_txq; struct sge_ofld_rxq *ofld_rxq; - const int nparams = 4; + const int nparams = 6; unsigned int pfvf = G_FW_VIID_PFN(pi->viid) << S_FW_VIID_PFN; INP_WLOCK_ASSERT(synqe->lctx->inp); @@ -312,13 +312,17 @@ send_reset_synqe(struct toedev *tod, str flowc->flowid_len16 = htonl(V_FW_WR_LEN16(howmany(flowclen, 16)) | V_FW_WR_FLOWID(synqe->tid)); flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN; - flowc->mnemval[0].val = htobe32(pfvf); - flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; - flowc->mnemval[1].val = htobe32(pi->tx_chan); - flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; - flowc->mnemval[2].val = htobe32(pi->tx_chan); - flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; - flowc->mnemval[3].val = htobe32(ofld_rxq->iq.abs_id); + flowc->mnemval[0].val = htobe32(pfvf); + flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; + flowc->mnemval[1].val = htobe32(pi->tx_chan); + flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; + flowc->mnemval[2].val = htobe32(pi->tx_chan); + flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; + flowc->mnemval[3].val = htobe32(ofld_rxq->iq.abs_id); + flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; + flowc->mnemval[4].val = htobe32(512); + flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS; + flowc->mnemval[5].val = htobe32(512); synqe->flags |= TPF_FLOWC_WR_SENT; /* ... then ABORT request */ From owner-svn-src-user@FreeBSD.ORG Mon Oct 22 20:02:37 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 497F9D77; Mon, 22 Oct 2012 20:02:37 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D0B98FC0C; Mon, 22 Oct 2012 20:02:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9MK2bgr092881; Mon, 22 Oct 2012 20:02:37 GMT (envelope-from crees@svn.freebsd.org) Received: (from crees@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MK2bYx092877; Mon, 22 Oct 2012 20:02:37 GMT (envelope-from crees@svn.freebsd.org) Message-Id: <201210222002.q9MK2bYx092877@svn.freebsd.org> From: Chris Rees Date: Mon, 22 Oct 2012 20:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241910 - user/crees/rclint X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 20:02:37 -0000 Author: crees (ports committer) Date: Mon Oct 22 20:02:36 2012 New Revision: 241910 URL: http://svn.freebsd.org/changeset/base/241910 Log: Almost complete rewrite-- now revolves around objects. Less stupid and easier to extend. Modified: user/crees/rclint/errors.en user/crees/rclint/rclint.py Modified: user/crees/rclint/errors.en ============================================================================== --- user/crees/rclint/errors.en Mon Oct 22 19:44:17 2012 (r241909) +++ user/crees/rclint/errors.en Mon Oct 22 20:02:36 2012 (r241910) @@ -5,20 +5,31 @@ # format as follows: error_id message explanation -defaults_invalid Invalid lines in defaults block. Allowed are variable assignments (including eval statements) and comments. A blank line ends the block. -defaults_mandatory_colon Override blanks in mandatory values (:=/:- vs =/-) Values that must not be blank (such as _enable) should be set by default as ${var:=value}; thus disallowing blank values (man sh) -defaults_non_mandatory_colon Do not clobber blank values for non-mandatory variables Syntax for variables that are not mandatory is ${var=value}; including := will override var="" set in rc.conf (man sh) -defaults_old_style Prefer condensed version for setting default values of variables When setting the default value for a variable, it is much less verbose and clearer to use the : ${variable=var} notation, as well as it being obvious that the source and destination variable are the same -defaults_value_quoted Do not quote values set by default With the syntax ${variable=value}, value can even contain spaces and does not need quoting - -definitions_missing Definitions block missing Following the default definitions must be other definitions (such as command, command_args) -definitions_quoted Do not quote values of variables Unless the value contains spaces/tabs, do not quote variable assignments +file_order Order of rc file incorrect Order of the rc file should be shebang/header/$FreeBSD$/sourcing rc_subr/name/rcvar/load_rc_config/setting defaults/setting other definitions/defining functions. Do not include unassociated shell commands, and blocks must be separated by single blank lines. Single blank lines may appear inside the defaults, definitions and functions blocks -functions_brace_inline Braces should have their own lines Do not put a brace on the same line as the function definition; it should have its own line -functions_brace_missing Function definition does not start with a brace The function definition must begin with an opening brace on its own line, and end with a closing brace on its own line functions_neverending Unclosed function block Functions must end with a closing brace on its own line +functions_problem Function incorrectly defined Functions should not have spaces in the definition functions_short One-line functions discouraged; put command directly in variable It is wasteful to write a function just for one command. It is possible to put commands directly inside declarations; name_prestart="install -d -o $name_user /var/run/$name" for example -functions_spaces No spaces allowed in function definitions Do not separate the function name from the parentheses with spaces; func() not func () + +orphaned_line Orphaned line Do not put unassociated shell commands inside rc scripts; put them inside functions + +rcorder_order rcorder block in the wrong order; should be PROVIDE/REQUIRE/BEFORE/KEYWORD See the article on RC scripting + +shebang Incorrect shebang used All rc scripts must start with the correct shebang; #!/bin/sh + +variables_defaults_mandatory_colon Override blanks in mandatory values (:=/:- vs =/-) Values that must not be blank (such as _enable) should be set by default as ${var:=value}; thus disallowing blank values (man sh) +variables_defaults_non_mandatory_colon Do not clobber blank values for non-mandatory variables Syntax for variables that are not mandatory is ${var=value}; including := will override var="" set in rc.conf (man sh) +variables_defaults_old_style Prefer condensed version for setting default values of variables When setting the default value for a variable, it is much less verbose and clearer to use the : ${variable=var} notation, as well as it being obvious that the source and destination variable are the same +variables_order Order of variables incorrect Order of the variables should be setting defaults then setting other variables + +value_quoted Do not quote values unless necessary Unless there are spaces in the value, quotes are unnecessary. With the syntax ${variable=value}, value can even contain spaces and does not need quoting + + + + +defaults_invalid Invalid lines in defaults block. Allowed are variable assignments (including eval statements) and comments. A blank line ends the block. + +definitions_missing Definitions block missing Following the default definitions must be other definitions (such as command, command_args) load_rc_config_extra load_rc_config not followed by blank line The load_rc_config line must form its own block load_rc_config_missing load_rc_config is late, incorrect or missing Directly following the name/rcvar block must be load_rc_config $name, unquoted @@ -30,7 +41,6 @@ rc_subr_late rc.subr sourcing late or no rcorder_keyword_freebsd Do not include FreeBSD in the KEYWORD rcorder line Historically FreeBSD scripts were marked in the KEYWORD section. This is no longer necessary rcorder_missing Missing rcorder block Following the FreeBSD RCSId keyword must be nothing but empty comment lines and an rcorder block -rcorder_order rcorder block in the wrong order; should be PROVIDE/REQUIRE/BEFORE/KEYWORD See the article on RC scripting rcvar_extra extra lines in name/rcvar block Order should be [blank line]/name=/rcvar=/[blank line] rcvar_incorrect rcvar is not set correctly rcvar must be directly set to name_enable. Do not quote, and do not use indirection; ${name}_enable is slower than example_enable @@ -40,8 +50,6 @@ rcvar_quoted rcvar is quoted Do not quot rcsid Missing FreeBSD RCSId keyword All rc scripts must contain a line beginning # $FreeBSD$. Do not include blank lines without comment markers at the beginning (#) until the script begins run_rc_argument Incorrect argument to run_rc_command The last line of the file should be run_rc_command $1 -run_rc_cruft Order of rc file incorrect Order of the rc file should be shebang/header/$FreeBSD$/setting defaults/setting other definitions/defining functions. Do not include unassociated shell commands, and blocks must be separated by single blank lines. Single blank lines may appear inside the defaults, definitions and functions blocks. run_rc_followed run_rc_command line is not the last line in the file Do not write anything after the run_rc_command line run_rc_quoted Quoted argument to run_rc_command No need to quote the argument to run_rc_command -shebang Incorrect shebang used All rc scripts must start with the correct shebang; #!/bin/sh Modified: user/crees/rclint/rclint.py ============================================================================== --- user/crees/rclint/rclint.py Mon Oct 22 19:44:17 2012 (r241909) +++ user/crees/rclint/rclint.py Mon Oct 22 20:02:36 2012 (r241910) @@ -22,331 +22,339 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# $FreeBSD$ # -major = 0 -minor = 0 -micro = 0 +__version__ = '$FreeBSD$' + +MAJOR = 0 +MINOR = 0 +MICRO = 0 import argparse import logging import re import textwrap -def read_db(dbname, language): - try: +class Db: + def __init__(self, dbname, language): + self._contents = [] with open('%s.%s' % (dbname, language)) as f: logging.debug('Sucking in %s database' % dbname) - contents = { } for e in f.readlines(): + e = e.rstrip('\n') if not e or e[0] == '#': continue - e = e.split(' ') - contents[e[0]] = e[1:] - except: - logging.error('Cannot open %s database for language %s' % (dbname, language)) - exit() - return contents - -def explain(error): - if verbosity > 0: - print textwrap.fill(error[1], - initial_indent='==> ', subsequent_indent=' ') - -def error(type, line_number, filename): - logging.error("[%d]%s: %s " % (line_number + 1, filename, errors[type][0])) - explain(errors[type]) - -def check_quoted(string): - return True if string[0] == '"' or string[0] == "'" else False - -def mandatory(var): - mand = ['enable'] - return True if var.split('_')[-1] in mand else False - -def get_value(var, line): - try: - return re.match('%s=(\S+)$' % var, line).group(1) - except: - return False + self._contents.append(e.split('\t')) -def get_assignment(line): - try: - return re.match('(\S+)=(.+)$', line).groups() - except: + def _get(self, key, index): + for c in self._contents: + if c[0] == key: + return c[index] return False -def check_header(lines, num, filename): - # Basic order; shebang, copyright, RCSId, gap, rcorder - - logging.debug('Check shebang') - if lines[num] != '#!/bin/sh': - error('shebang', num, filename) - - logging.debug('Skipping license') - num += 1 - while (not re.match('# \$FreeBSD[:$]', lines[num]) and - (lines[num] == '' or lines[num][0] == '#')): - num += 1 - - logging.debug('Checking for RCSId') - if not re.match('# \$FreeBSD[:$]', lines[num]): - error('rcsid', num, filename) - - num += 1 - while lines[num] == '#' or lines[num] == '': num += 1 - - logging.debug('Checking rcorder order and sucking in names') - if not re.match('# [PRBK]', lines[num]): - error('rcorder_missing', num, filename) - orders = ['provide', 'require', 'before', 'keyword'] - index = 0 - rcorder = {o: [] for o in orders} - while index < 4: - order = orders[index] - try: - for result in re.match('# %s: (.*)' % order.upper(), - lines[num]).group(1).split(' '): - rcorder[order].append(result) - num += 1 - except: - index += 1 - - if 'FreeBSD' in rcorder['keyword']: - error('rcorder_keyword_freebsd', num, filename) - - if re.match('# [PRBK]', lines[num]): - error('rcorder_order', num, filename) - - return num - -def check_intro(lines, num, filename): - logging.debug('Checking sourcing lines') - while lines[num] == '' or lines[num][0] == '#': - num += 1 - - if lines[num] != '. /etc/rc.subr': - error('rc_subr_late', num, filename) - - logging.debug('Checking name assignment') - while lines[num] == '' or lines[num][0] == '#' or lines[num][0] == '.': - num += 1 - - name = get_value('name', lines[num]) - if not name: - error('name_missing', num, filename) - elif check_quoted(name): - error('name_quoted', num, filename) - else: - logging.debug('name discovered as %s' % name) - num += 1 - - logging.debug('Checking rcvar') - rcvar = get_value('rcvar', lines[num]) - logging.debug('rcvar discovered as %s' % rcvar if rcvar else 'rcvar not discovered') - - if not rcvar: - error('rcvar_missing', num, filename) - elif check_quoted(rcvar): - error('rcvar_quoted', num, filename) - elif rcvar != '%s_enable' % name: - error('rcvar_incorrect', num, filename) - else: - num += 1 - - logging.debug('Checking load_rc_config') - if lines[num] == '': - num += 1 - else: - error('rcvar_extra', num, filename) - - if re.match('load_rc_config (?:\$name|%s)' % name, lines[num]): - num += 1 - else: - error('load_rc_config_missing', num, filename) - - if lines[num] == '': - num += 1 - else: - error('load_rc_config_extra', num, filename) - - return num - -def check_defaults(lines, num, filename): - logging.debug('Checking defaults set') + def error(self, key): + return self._get(key, 1) - default = { } - try: - while lines[num]: - while lines[num][0] == '#' or lines[num][:4] == 'eval': - num += 1 - if lines[num][0] == ':': - # Shorthand set self-default assignment - (target, operator, value) = re.match(': \${([^:=]+)(:?=)([^}]+)}', lines[num]).groups() - if operator == ':=' and not mandatory(target): - error('defaults_non_mandatory_colon', num, filename) - elif operator == '=' and mandatory(target): - error('defaults_mandatory_colon', num, filename) - - else: - # Longhand set default assignment - (target, source, operator, value) = re.match('([^=]+)=\${([^:-]+)(:?-)([^}]+)}', lines[num]).groups() - if target == source: - error('defaults_old_style', num, filename) - - if operator == ':-' and not mandatory(target): - error('defaults_non_mandatory_colon', num, filename) - elif operator == '-' and mandatory(target): - error('defaults_mandatory_colon', num, filename) + def explanation(self, key): + return self._get(key, 2) - if check_quoted(value): - error('defaults_value_quoted', num, filename) - - num += 1 - except: - error('defaults_invalid', num, filename) + def give(self, key, num): + err = self.error(key) + if err: + logging.error('[%d]: %s ' % (num+1, err)) + if verbosity > 0: + print textwrap.fill(self.explanation(key), + initial_indent='==> ', + subsequent_indent=' ') + else: + logging.error('No such error: %s' % key) + +class Statement: + def __init__(self, line, number): + types = {'.': 'source', 'load_rc_config': 'load_rc_config', + 'run_rc_command': 'run_rc_command'} + spl = line.split(' ') + if spl[0] in types: + self.name = spl[0] + self.type = types[spl[0]] + self.value = ' '.join(spl[1:]) + self.line = number + else: + self.value = False + + def quoted(self): + if self.value and (self.value[0] == '"' or self.value[0] == '\''): + return True + else: + return False + + def pointless_quoted(self): + if self.quoted(): + if self.type == 'shorthand': + return True + elif ' ' not in self.value and '\t' not in self.value: + return True + return False - # Allow line breaks in the middle; if we put - # gaps in that's usually good style. Lookahead! - if lines[num+1] and (':' in lines[num+1] or '-' in lines[num+1]): - return check_defaults(lines, num, filename) - else: - return num - -def check_definitions(lines, num, filename): - logging.debug('Checking the basic definitions') - - num += 1 - - while lines[num]: - while lines[num][0] == '#' or lines[num][:4] == 'eval': num += 1 - try: - (var, value) = get_assignment(lines[num]) - except: - error('definitions_missing', num, filename) - return num - - if check_quoted(value): - if ' ' not in lines[num] and ' ' not in lines[num]: - error('definitions_quoted', num, filename) - num += 1 - - # As in check_defaults, allow line breaks in the middle; if we put - # gaps in that's usually good style. Lookahead! - if lines[num+1] and '=' in lines[num+1]: - return check_definitions(lines, num, filename) - else: - return num - -def check_functions(lines, num, filename): - logging.debug('Now checking functions') - - num += 1 - func = { } - - while lines[num]: - while not lines[num] or lines[num][0] == '#': - num += 1 - - if lines[num][-2:] != '()': - if lines[num][-1] == '{': - error('functions_brace_inline', num, filename) +class Variable(Statement): + def __init__(self, line, number): + basic = re.compile(r'([^\s=]+)=(.*)') + result = basic.match(line) + if result: + is_longhand = self.is_longhand_default(line) + if is_longhand: + (self.name, self.source, colon, self.value) = is_longhand + self.clobber = True if colon[0] == ':' else False + self.type = 'longhand' else: - logging.debug('No functions left!') - return num - if ' ' in lines[num]: - error('functions_spaces', num, filename) - func['name'] = lines[num][:-2] - func['length'] = 0 - - num += 1 - if lines[num] != '{': - error('functions_brace_missing', num, filename) - - num += 1 - - try: - while lines[num] != '}': - print lines[num] - num += 1 - if lines[num] and lines[num][0] != '#': - func['length'] += 1 - except: - error('functions_neverending', num, filename) - return num - - if func['length'] == 1: - error('functions_short', num, filename) - - print lines[num] - print lines[num+1] - print lines[num+2] - - if lines[num+2] and '{' in lines[num+2]: - return check_functions(lines, num, filename) - else: - return num + (self.name, self.value) = result.groups() + self.type = ( + 'init' if self.name in ('name', 'rcvar') else 'basic') + + elif line[:4] == 'eval': + self.value = line + self.name = line + self.type = 'eval' + else: + is_shorthand = self.is_shorthand_default(line) + if is_shorthand: + (self.name, assignment, self.value) = is_shorthand + self.clobber = True if assignment[0] == ':' else False + self.type = 'shorthand' + + if not hasattr(self, 'value'): + self.value = False + self.line = number + + def is_longhand_default(self, line): + match = re.match(r'([^=\s]+)=\${(^[:-]+)(:?-)([^}]+)', line) + return match.groups() if match else False + + def is_shorthand_default(self, line): + match = re.match(r': \${([^\s:=]+)(:?=)([^}]+)}', line) + return match.groups() if match else False + +class Comment: + def __init__(self, line, number): + self.value = line if line and line[0] == '#' else False + self.line = number + + def match(self, regex): + result = re.match(regex, self.value) + if result: + return result.groups() + else: + return False + +class Shebang: + def __init__(self, comment): + self.line = comment.line + result = comment.match(r'#!(\S+)\s*(.*)') + if result: + self.value = result[0] + self.args = result[1] + else: + self.value = False + +class Rcorder: + def __init__(self, comment): + self.line = comment.line + result = comment.match('# ([A-Z]+): (.+)') + if result: + (self.type, self.value) = (result[0], result[1:]) + else: + self.value = False + +class RcsId: + def __init__(self, comment): + self.line = comment.line + result = comment.match(r'# \$Free' + r'BSD([:$].*)') + if result: + self.value = result[0] + else: + self.value = False + +class Function: + def __init__(self, lines, num): + if lines[1] and lines[1][0] == '{': + try: + self.name = re.match(r'([\S_]+)\(\)$', lines[0]).group(1) + except: + error.give('functions_problem', num) + self.length = 0 + self.line = num + self.value = [] + while lines[self.length] != '}': + self.length += 1 + if self.length >= len(lines): + error.give('functions_neverending', num) + break + self.value.append(lines[self.length]) + # Remove { and } lines from length + self.length -= 2 + logging.debug('Found function %s' % self.name) + else: + self.value = False -def check_run_rc(lines, num, filename): - logging.debug('Checking the last line of the file contains run_rc_command') + def short(self): + return True if self.length <= 1 else False - while not lines[num] or lines[num][0] == '#': - num += 1 + def linenumbers(self): + return range(self.line, self.line+self.length+3) - try: - arg = re.match('run_rc_command (.*)$', lines[num]).group(1) - if check_quoted(arg): - error('run_rc_quoted', num, filename) - elif arg != r'$1': - error('run_rc_argument', num, filename) - - if num < len(lines) - 1: - error('run_rc_followed', num, filename) - except: - error('run_rc_cruft', num, filename) - -def general_checks(lines, filename): - logging.debug('Checking for unrecommended sequences and orphan commands') - # Don't use regex on last line, it must contain run_rc_command, which fails - # unassociated shell command test. We already hacked for load_rc_config - for num in range(0, len(lines) - 1): - for regex in problems.keys(): - if lines[num] and re.search(regex, lines[num]): - logging.warn("[%d]%s: %s " % (num + 1, filename, - problems[regex][0])) - explain(problems[regex]) + def contains_line(self, line): + return True if line in self.linenumbers() else False def do_rclint(filename): logging.debug('Suck in file %s' % filename) try: - lines=[line.rstrip('\n') for line in open(filename)] - except: + lines = [line.rstrip('\n') for line in open(filename)] + except: logging.error('Cannot open %s for testing' % filename) return - lineno = {'begin': 0} - - lineno['header'] = check_header(lines, lineno['begin'], filename) - lineno['intro'] = check_intro(lines, lineno['header'], filename) - lineno['defaults'] = check_defaults(lines, lineno['intro'], filename) - lineno['definitions'] = check_definitions(lines, lineno['defaults'], filename) - lineno['functions'] = check_functions(lines, lineno['definitions'], filename) - check_run_rc(lines, lineno['functions'], filename) - general_checks(lines, filename) + lineobj = {'Variable': [], + 'Comment': [], + 'Statement': []} + + for num in range(0, len(lines)): + for obj in lineobj.keys(): + tmp = eval(obj)(lines[num], num) + if tmp.value != False: + lineobj[obj].append(tmp) + break + + lineobj['Shebang'] = [Shebang(lineobj['Comment'][0])] + lineobj['Function'] = [] + + for num in range(0, len(lines)-1): + tmp = Function(lines[num:], num) + if tmp.value: + lineobj['Function'].append(tmp) + + lineobj.update({'Rcorder': [], 'RcsId': []}) + + for comment in lineobj['Comment']: + tmp = Rcorder(comment) + if tmp.value: + lineobj['Rcorder'].append(tmp) + tmp = RcsId(comment) + if tmp.value: + lineobj['RcsId'] = [tmp] + + logging.debug('OK, done collecting variables. Time to check!') + + logging.debug('Checking shebang') + if len(lineobj['Shebang']) < 1: + error.give('shebang', num) + + logging.debug('Checking order of file') + linenumbers = [] + for obj in ('Shebang', 'RcsId', 'Rcorder'): + for o in lineobj[obj]: + linenumbers.append(o.line) + + for s in lineobj['Statement']: + if s.type == 'source': + linenumbers.append(s.line) + + for v in lineobj['Variable']: + if v.type == 'init': + linenumbers.append(v.line) + + for s in lineobj['Statement']: + if s.type == 'load_rc_config': + linenumbers.append(s.line) + + for v in lineobj['Variable']: + if v.type != 'init': + linenumbers.append(v.line) + + [linenumbers.append(f.line) for f in lineobj['Function']] + + for s in lineobj['Statement']: + if s.type == 'run_rc_command': + linenumbers.append(s.line) + + if sorted(linenumbers) != linenumbers: + error.give('file_order', 0) + + logging.debug('Checking all lines are accounted for') + for obj in lineobj.keys(): + for o in lineobj[obj]: + linenumbers.append(o.line) + for r in range(0, len(lines)): + if r not in linenumbers and lines[r] != '': + if True not in [f.contains_line(r) for f in lineobj['Function']]: + error.give('orphaned_line', r) + + logging.debug('Checking rcorder') + linenumbers = [] + for typ in ('PROVIDE', 'REQUIRE', 'BEFORE', 'KEYWORD'): + for o in lineobj['Rcorder']: + if o.type == typ: + linenumbers.append(o.line) + if sorted(linenumbers) != linenumbers: + error.give('rcorder_order') + + for o in lineobj['Rcorder']: + if o.type == 'KEYWORD' and 'freebsd' in [v.lower() for v in o.value]: + error.give('rcorder_keyword_freebsd', o.line) + + logging.debug('Checking order of variables') + linenumbers = [] + for typ in (('init'), ('longhand', 'shorthand'), ('basic')): + for var in lineobj['Variable']: + if var.type in typ: + linenumbers.append(var.line) + if sorted(linenumbers) != linenumbers: + error.give('variables_order', 0) + + logging.debug('Checking for pointless quoting') + for obj in lineobj['Variable']+lineobj['Statement']: + if obj.pointless_quoted(): + error.give('value_quoted', obj.line) + + logging.debug('Checking for rcvar set correctly') + for var in lineobj['Variable']: + if var.name == 'name': + progname = var.value + elif var.name == 'rcvar': + try: + if progname + '_enable' not in var.value: + error.give('rcvar_incorrect', var.line) + except: + error.give('file_order', var.line) + + logging.debug('Checking for short functions') + for function in lineobj['Function']: + if function.short(): + error.give('functions_short', function.line) + + logging.debug('Checking for defaults clobbering blank values') + for var in lineobj['Variable']: + if var.type in ('longhand', 'shorthand'): + if var.name.split('_')[-1] not in ('enable') and var.clobber: + error.give('variables_defaults_non_mandatory_colon', var.line) + elif not var.clobber and var.name.split('_')[-1] in ('enable'): + error.give('variables_defaults_mandatory_colon', var.line) + if var.type == 'longhand' and var.name == var.source: + error.give('variables_defaults_old_style', var.line) parser = argparse.ArgumentParser() parser.add_argument('filenames', nargs = '+') parser.add_argument('--language', nargs = 1, type=str, default = ['en'], help = 'sets the language that errors are reported in') parser.add_argument('-v', action='count', help='raises debug level; provides detailed explanations of errors') +parser.add_argument('--version', action='version', version='%s.%s.%s-%s'%(MAJOR, MINOR, MICRO, __version__)) args = parser.parse_args() verbosity = args.v logging.basicConfig(level=logging.DEBUG if verbosity > 1 else logging.WARN) -errors = read_db('errors', args.language[0]) -problems = read_db('problems', args.language[0]) +error = Db('errors', args.language[0]) +# problem = Db('problems', args.language[0]) -for file in args.filenames: - do_rclint(file) +for f in args.filenames: + print('Checking %s' % f) + do_rclint(f) From owner-svn-src-user@FreeBSD.ORG Mon Oct 22 20:04:13 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9D13BF; Mon, 22 Oct 2012 20:04:13 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A94898FC17; Mon, 22 Oct 2012 20:04:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9MK4Dh0093472; Mon, 22 Oct 2012 20:04:13 GMT (envelope-from crees@svn.freebsd.org) Received: (from crees@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MK4DZl093470; Mon, 22 Oct 2012 20:04:13 GMT (envelope-from crees@svn.freebsd.org) Message-Id: <201210222004.q9MK4DZl093470@svn.freebsd.org> From: Chris Rees Date: Mon, 22 Oct 2012 20:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241911 - user/crees/rclint X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 20:04:13 -0000 Author: crees (ports committer) Date: Mon Oct 22 20:04:13 2012 New Revision: 241911 URL: http://svn.freebsd.org/changeset/base/241911 Log: Correct errors Modified: user/crees/rclint/errors.en Modified: user/crees/rclint/errors.en ============================================================================== --- user/crees/rclint/errors.en Mon Oct 22 20:02:36 2012 (r241910) +++ user/crees/rclint/errors.en Mon Oct 22 20:04:13 2012 (r241911) @@ -13,7 +13,9 @@ functions_short One-line functions disco orphaned_line Orphaned line Do not put unassociated shell commands inside rc scripts; put them inside functions +rcorder_keyword_freebsd Do not include FreeBSD in the KEYWORD rcorder line Historically FreeBSD scripts were marked in the KEYWORD section. This is no longer necessary rcorder_order rcorder block in the wrong order; should be PROVIDE/REQUIRE/BEFORE/KEYWORD See the article on RC scripting +rcvar_incorrect rcvar is not set correctly rcvar must be directly set to name_enable. Do not quote, and do not use indirection; ${name}_enable is slower than example_enable shebang Incorrect shebang used All rc scripts must start with the correct shebang; #!/bin/sh @@ -27,23 +29,6 @@ value_quoted Do not quote values unless -defaults_invalid Invalid lines in defaults block. Allowed are variable assignments (including eval statements) and comments. A blank line ends the block. - -definitions_missing Definitions block missing Following the default definitions must be other definitions (such as command, command_args) - -load_rc_config_extra load_rc_config not followed by blank line The load_rc_config line must form its own block -load_rc_config_missing load_rc_config is late, incorrect or missing Directly following the name/rcvar block must be load_rc_config $name, unquoted - -name_missing name is set late or not at all Directly following the sourcing of scripts must follow setting of the variable name -name_quoted name is quoted Do not quote the value of name. If it has spaces, use underscores - -rc_subr_late rc.subr sourcing late or nonexistent The first non-comment non-blank line in any rc file must be sourcing /etc/rc.subr - -rcorder_keyword_freebsd Do not include FreeBSD in the KEYWORD rcorder line Historically FreeBSD scripts were marked in the KEYWORD section. This is no longer necessary -rcorder_missing Missing rcorder block Following the FreeBSD RCSId keyword must be nothing but empty comment lines and an rcorder block - -rcvar_extra extra lines in name/rcvar block Order should be [blank line]/name=/rcvar=/[blank line] -rcvar_incorrect rcvar is not set correctly rcvar must be directly set to name_enable. Do not quote, and do not use indirection; ${name}_enable is slower than example_enable rcvar_missing rcvar is set late or not at all Setting rcvar must be done straight after setting name rcvar_quoted rcvar is quoted Do not quote the value of rcvar From owner-svn-src-user@FreeBSD.ORG Mon Oct 22 20:17:59 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 820E473E; Mon, 22 Oct 2012 20:17:59 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 697E68FC18; Mon, 22 Oct 2012 20:17:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9MKHx7c097343; Mon, 22 Oct 2012 20:17:59 GMT (envelope-from crees@svn.freebsd.org) Received: (from crees@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MKHxxo097341; Mon, 22 Oct 2012 20:17:59 GMT (envelope-from crees@svn.freebsd.org) Message-Id: <201210222017.q9MKHxxo097341@svn.freebsd.org> From: Chris Rees Date: Mon, 22 Oct 2012 20:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241912 - user/crees/rclint X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 20:17:59 -0000 Author: crees (ports committer) Date: Mon Oct 22 20:17:58 2012 New Revision: 241912 URL: http://svn.freebsd.org/changeset/base/241912 Log: Allow different DATADIR values to be used Modified: user/crees/rclint/rclint.py Modified: user/crees/rclint/rclint.py ============================================================================== --- user/crees/rclint/rclint.py Mon Oct 22 20:04:13 2012 (r241911) +++ user/crees/rclint/rclint.py Mon Oct 22 20:17:58 2012 (r241912) @@ -30,6 +30,8 @@ MAJOR = 0 MINOR = 0 MICRO = 0 +DATADIR = '.' + import argparse import logging import re @@ -38,7 +40,7 @@ import textwrap class Db: def __init__(self, dbname, language): self._contents = [] - with open('%s.%s' % (dbname, language)) as f: + with open('%s/%s.%s' % (DATADIR, dbname, language)) as f: logging.debug('Sucking in %s database' % dbname) for e in f.readlines(): e = e.rstrip('\n') From owner-svn-src-user@FreeBSD.ORG Mon Oct 22 21:26:40 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D0E36AD; Mon, 22 Oct 2012 21:26:40 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D5C68FC0A; Mon, 22 Oct 2012 21:26:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9MLQd16011189; Mon, 22 Oct 2012 21:26:39 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MLQdtS011152; Mon, 22 Oct 2012 21:26:39 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201210222126.q9MLQdtS011152@svn.freebsd.org> From: Attilio Rao Date: Mon, 22 Oct 2012 21:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241915 - in user/attilio/vmcontention: . bin/date bin/dd bin/ed bin/getfacl bin/ls bin/pax bin/rcp bin/rm bin/setfacl bin/sh cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/l... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 21:26:40 -0000 Author: attilio Date: Mon Oct 22 21:26:36 2012 New Revision: 241915 URL: http://svn.freebsd.org/changeset/base/241915 Log: MFC Added: user/attilio/vmcontention/contrib/bmake/ - copied from r241912, head/contrib/bmake/ user/attilio/vmcontention/contrib/dialog/samples/dft-cancel - copied unchanged from r241912, head/contrib/dialog/samples/dft-cancel user/attilio/vmcontention/contrib/dialog/samples/dft-extra - copied unchanged from r241912, head/contrib/dialog/samples/dft-extra user/attilio/vmcontention/contrib/dialog/samples/dft-help - copied unchanged from r241912, head/contrib/dialog/samples/dft-help user/attilio/vmcontention/contrib/dialog/samples/dft-no - copied unchanged from r241912, head/contrib/dialog/samples/dft-no user/attilio/vmcontention/contrib/dialog/samples/fselect0 - copied unchanged from r241912, head/contrib/dialog/samples/fselect0 user/attilio/vmcontention/contrib/dialog/samples/with-dquotes - copied unchanged from r241912, head/contrib/dialog/samples/with-dquotes user/attilio/vmcontention/contrib/dialog/samples/with-squotes - copied unchanged from r241912, head/contrib/dialog/samples/with-squotes user/attilio/vmcontention/contrib/libc++/CREDITS.TXT - copied unchanged from r241912, head/contrib/libc++/CREDITS.TXT user/attilio/vmcontention/contrib/libc++/LICENSE.TXT - copied unchanged from r241912, head/contrib/libc++/LICENSE.TXT user/attilio/vmcontention/contrib/libc-pwcache/ - copied from r241912, head/contrib/libc-pwcache/ user/attilio/vmcontention/contrib/libpcap/pcap-canusb-linux.c - copied unchanged from r241912, head/contrib/libpcap/pcap-canusb-linux.c user/attilio/vmcontention/contrib/libpcap/pcap-canusb-linux.h - copied unchanged from r241912, head/contrib/libpcap/pcap-canusb-linux.h user/attilio/vmcontention/contrib/libpcap/tests/ - copied from r241912, head/contrib/libpcap/tests/ user/attilio/vmcontention/contrib/mdocml/ - copied from r241912, head/contrib/mdocml/ user/attilio/vmcontention/contrib/tcpdump/print-pfsync.c - copied unchanged from r241912, head/contrib/tcpdump/print-pfsync.c user/attilio/vmcontention/contrib/tcpdump/print-tipc.c - copied unchanged from r241912, head/contrib/tcpdump/print-tipc.c user/attilio/vmcontention/etc/atf/ - copied from r241912, head/etc/atf/ user/attilio/vmcontention/lib/atf/ - copied from r241912, head/lib/atf/ user/attilio/vmcontention/lib/libmandoc/ - copied from r241912, head/lib/libmandoc/ user/attilio/vmcontention/lib/libpmc/pmc.sandybridgexeon.3 - copied unchanged from r241912, head/lib/libpmc/pmc.sandybridgexeon.3 user/attilio/vmcontention/libexec/atf/ - copied from r241912, head/libexec/atf/ user/attilio/vmcontention/libexec/rpc.rusersd/extern.h - copied unchanged from r241912, head/libexec/rpc.rusersd/extern.h user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/early-adopter/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/errata/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/errata/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/common/install.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/installation/common/install.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/common/layout.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/installation/common/layout.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/common/trouble.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/installation/common/trouble.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/common/upgrade.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/installation/common/upgrade.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/i386/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/installation/i386/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/readme/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/readme/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml - copied unchanged from r241912, head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/share/xml/ - copied from r241912, head/release/doc/de_DE.ISO8859-1/share/xml/ user/attilio/vmcontention/release/doc/en_US.ISO8859-1/errata/article.xml - copied unchanged from r241912, head/release/doc/en_US.ISO8859-1/errata/article.xml user/attilio/vmcontention/release/doc/en_US.ISO8859-1/hardware/article.xml - copied unchanged from r241912, head/release/doc/en_US.ISO8859-1/hardware/article.xml user/attilio/vmcontention/release/doc/en_US.ISO8859-1/readme/article.xml - copied unchanged from r241912, head/release/doc/en_US.ISO8859-1/readme/article.xml user/attilio/vmcontention/release/doc/en_US.ISO8859-1/relnotes/article.xml - copied unchanged from r241912, head/release/doc/en_US.ISO8859-1/relnotes/article.xml user/attilio/vmcontention/release/doc/en_US.ISO8859-1/share/xml/ - copied from r241912, head/release/doc/en_US.ISO8859-1/share/xml/ user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/early-adopter/article.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/early-adopter/article.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/errata/article.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/errata/article.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/common/dev.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/common/intro.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/common/intro.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/i386/article.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/alpha/article.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/common/abstract.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/installation/common/abstract.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/common/artheader.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/installation/common/artheader.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/common/install.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/installation/common/install.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/common/layout.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/installation/common/layout.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/common/trouble.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/i386/article.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/installation/i386/article.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/pc98/article.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/relnotes/common/new.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.xml - copied unchanged from r241912, head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.xml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/share/xml/ - copied from r241912, head/release/doc/fr_FR.ISO8859-1/share/xml/ user/attilio/vmcontention/release/doc/ja_JP.eucJP/errata/article.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/errata/article.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/alpha/article.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/alpha/article.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/amd64/article.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/amd64/article.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/common/artheader.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/common/artheader.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/common/dev.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/common/dev.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/common/intro.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/common/intro.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/i386/article.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/i386/article.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/ia64/article.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/ia64/article.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/pc98/article.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/pc98/article.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/sparc64/article.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/sparc64/article.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/alpha/article.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/relnotes/alpha/article.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/amd64/article.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/relnotes/amd64/article.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/common/new.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/relnotes/common/new.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/i386/article.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/relnotes/i386/article.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/ia64/article.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/relnotes/ia64/article.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/pc98/article.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/relnotes/pc98/article.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/sparc64/article.xml - copied unchanged from r241912, head/release/doc/ja_JP.eucJP/relnotes/sparc64/article.xml user/attilio/vmcontention/release/doc/ja_JP.eucJP/share/xml/ - copied from r241912, head/release/doc/ja_JP.eucJP/share/xml/ user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/errata/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/errata/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/alpha/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/alpha/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/amd64/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/amd64/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/common/artheader.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/common/artheader.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/common/dev.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/common/dev.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/common/intro.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/common/intro.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/i386/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/i386/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/ia64/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/ia64/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/pc98/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/pc98/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/alpha/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/installation/alpha/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/amd64/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/installation/amd64/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/common/abstract.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/installation/common/abstract.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/common/artheader.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/installation/common/artheader.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/common/install.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/installation/common/install.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/common/layout.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/installation/common/layout.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/common/trouble.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/installation/common/trouble.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/common/upgrade.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/installation/common/upgrade.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/i386/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/installation/i386/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/ia64/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/installation/ia64/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/pc98/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/installation/pc98/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/sparc64/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/installation/sparc64/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/readme/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/readme/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/common/new.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/relnotes/common/new.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/i386/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/relnotes/i386/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.xml - copied unchanged from r241912, head/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.xml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/share/xml/ - copied from r241912, head/release/doc/ru_RU.KOI8-R/share/xml/ user/attilio/vmcontention/release/doc/share/xml/ - copied from r241912, head/release/doc/share/xml/ user/attilio/vmcontention/release/doc/zh_CN.GB2312/errata/article.xml - copied unchanged from r241912, head/release/doc/zh_CN.GB2312/errata/article.xml user/attilio/vmcontention/release/doc/zh_CN.GB2312/hardware/article.xml - copied unchanged from r241912, head/release/doc/zh_CN.GB2312/hardware/article.xml user/attilio/vmcontention/release/doc/zh_CN.GB2312/readme/article.xml - copied unchanged from r241912, head/release/doc/zh_CN.GB2312/readme/article.xml user/attilio/vmcontention/release/doc/zh_CN.GB2312/relnotes/article.xml - copied unchanged from r241912, head/release/doc/zh_CN.GB2312/relnotes/article.xml user/attilio/vmcontention/release/doc/zh_CN.GB2312/share/xml/ - copied from r241912, head/release/doc/zh_CN.GB2312/share/xml/ user/attilio/vmcontention/sbin/mount_fusefs/ - copied from r241912, head/sbin/mount_fusefs/ user/attilio/vmcontention/share/atf/ - copied from r241912, head/share/atf/ user/attilio/vmcontention/share/doc/atf/ - copied from r241912, head/share/doc/atf/ user/attilio/vmcontention/share/examples/atf/ - copied from r241912, head/share/examples/atf/ user/attilio/vmcontention/share/man/man4/nvd.4 - copied unchanged from r241912, head/share/man/man4/nvd.4 user/attilio/vmcontention/share/man/man4/nvme.4 - copied unchanged from r241912, head/share/man/man4/nvme.4 user/attilio/vmcontention/share/man/man4/virtio_scsi.4 - copied unchanged from r241912, head/share/man/man4/virtio_scsi.4 user/attilio/vmcontention/share/mk/bsd.progs.mk - copied unchanged from r241912, head/share/mk/bsd.progs.mk user/attilio/vmcontention/share/syscons/keymaps/danish.iso.macbook.kbd - copied unchanged from r241912, head/share/syscons/keymaps/danish.iso.macbook.kbd user/attilio/vmcontention/share/xml/ - copied from r241912, head/share/xml/ user/attilio/vmcontention/share/xsl/ - copied from r241912, head/share/xsl/ user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/trim_map.h - copied unchanged from r241912, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/trim_map.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c - copied unchanged from r241912, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c user/attilio/vmcontention/sys/dev/sdhci/sdhci_if.m - copied unchanged from r241912, head/sys/dev/sdhci/sdhci_if.m user/attilio/vmcontention/sys/dev/sdhci/sdhci_pci.c - copied unchanged from r241912, head/sys/dev/sdhci/sdhci_pci.c user/attilio/vmcontention/sys/dev/virtio/scsi/ - copied from r241912, head/sys/dev/virtio/scsi/ user/attilio/vmcontention/sys/fs/fuse/ - copied from r241912, head/sys/fs/fuse/ user/attilio/vmcontention/sys/modules/fuse/ - copied from r241912, head/sys/modules/fuse/ user/attilio/vmcontention/sys/modules/sdhci_pci/ - copied from r241912, head/sys/modules/sdhci_pci/ user/attilio/vmcontention/sys/modules/virtio/scsi/ - copied from r241912, head/sys/modules/virtio/scsi/ user/attilio/vmcontention/sys/powerpc/conf/WII - copied unchanged from r241912, head/sys/powerpc/conf/WII user/attilio/vmcontention/tools/build/options/WITHOUT_ATF - copied unchanged from r241912, head/tools/build/options/WITHOUT_ATF user/attilio/vmcontention/tools/build/options/WITH_BMAKE - copied unchanged from r241912, head/tools/build/options/WITH_BMAKE user/attilio/vmcontention/tools/regression/bin/sh/parser/alias7.0 - copied unchanged from r241912, head/tools/regression/bin/sh/parser/alias7.0 user/attilio/vmcontention/tools/regression/bin/sh/parser/alias8.0 - copied unchanged from r241912, head/tools/regression/bin/sh/parser/alias8.0 user/attilio/vmcontention/tools/regression/net/ - copied from r241912, head/tools/regression/net/ user/attilio/vmcontention/usr.bin/atf/ - copied from r241912, head/usr.bin/atf/ user/attilio/vmcontention/usr.bin/bmake/ - copied from r241912, head/usr.bin/bmake/ user/attilio/vmcontention/usr.bin/mandoc/ - copied from r241912, head/usr.bin/mandoc/ user/attilio/vmcontention/usr.bin/ssh-copy-id/ - copied from r241912, head/usr.bin/ssh-copy-id/ user/attilio/vmcontention/usr.sbin/bsdconfig/include/bsdconfig.hlp - copied unchanged from r241912, head/usr.sbin/bsdconfig/include/bsdconfig.hlp user/attilio/vmcontention/usr.sbin/bsdconfig/include/usage.hlp - copied unchanged from r241912, head/usr.sbin/bsdconfig/include/usage.hlp user/attilio/vmcontention/usr.sbin/bsdconfig/security/include/securelevel.hlp - copied unchanged from r241912, head/usr.sbin/bsdconfig/security/include/securelevel.hlp user/attilio/vmcontention/usr.sbin/pkg_install/lib/pkgng.c - copied unchanged from r241912, head/usr.sbin/pkg_install/lib/pkgng.c user/attilio/vmcontention/usr.sbin/services_mkdb/extern.h - copied unchanged from r241912, head/usr.sbin/services_mkdb/extern.h user/attilio/vmcontention/usr.sbin/sysrc/ - copied from r241912, head/usr.sbin/sysrc/ Deleted: user/attilio/vmcontention/contrib/dialog/samples/dselect user/attilio/vmcontention/contrib/dialog/samples/valgrind.log user/attilio/vmcontention/contrib/gnu-sort/ user/attilio/vmcontention/contrib/libc++/src/support/ user/attilio/vmcontention/contrib/libpcap/net/ user/attilio/vmcontention/contrib/libpcap/test/ user/attilio/vmcontention/gnu/usr.bin/sort/ user/attilio/vmcontention/lib/libc/gen/pwcache.3 user/attilio/vmcontention/lib/libc/gen/pwcache.c user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/errata/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/common/artheader.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/common/dev.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/common/intro.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/common/abstract.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/common/artheader.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/common/install.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/common/trouble.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/common/upgrade.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/sparc64/install.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/readme/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/common/new.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/share/sgml/ user/attilio/vmcontention/release/doc/en_US.ISO8859-1/errata/article.sgml user/attilio/vmcontention/release/doc/en_US.ISO8859-1/hardware/article.sgml user/attilio/vmcontention/release/doc/en_US.ISO8859-1/readme/article.sgml user/attilio/vmcontention/release/doc/en_US.ISO8859-1/relnotes/article.sgml user/attilio/vmcontention/release/doc/en_US.ISO8859-1/share/sgml/ user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/errata/article.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/common/intro.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/common/abstract.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/common/artheader.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/share/sgml/ user/attilio/vmcontention/release/doc/ja_JP.eucJP/errata/article.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/alpha/article.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/amd64/article.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/common/artheader.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/common/dev.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/common/intro.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/i386/article.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/ia64/article.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/pc98/article.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/sparc64/article.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/alpha/article.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/amd64/article.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/common/new.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/i386/article.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/ia64/article.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/pc98/article.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/sparc64/article.sgml user/attilio/vmcontention/release/doc/ja_JP.eucJP/share/sgml/ user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/errata/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/alpha/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/amd64/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/common/artheader.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/common/dev.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/common/intro.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/i386/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/ia64/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/pc98/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/alpha/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/amd64/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/common/abstract.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/common/artheader.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/common/install.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/common/layout.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/common/trouble.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/common/upgrade.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/i386/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/ia64/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/pc98/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/sparc64/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/readme/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/common/new.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/i386/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.sgml user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/share/sgml/ user/attilio/vmcontention/release/doc/share/sgml/ user/attilio/vmcontention/release/doc/zh_CN.GB2312/errata/article.sgml user/attilio/vmcontention/release/doc/zh_CN.GB2312/hardware/article.sgml user/attilio/vmcontention/release/doc/zh_CN.GB2312/readme/article.sgml user/attilio/vmcontention/release/doc/zh_CN.GB2312/relnotes/article.sgml user/attilio/vmcontention/release/doc/zh_CN.GB2312/share/sgml/ user/attilio/vmcontention/share/man/man4/harp.4 user/attilio/vmcontention/share/man/man4/hfa.4 user/attilio/vmcontention/share/man/man4/idt.4 user/attilio/vmcontention/share/man/man9/VFS_LOCK_GIANT.9 user/attilio/vmcontention/sys/dev/mlx/mlx_compat.h user/attilio/vmcontention/tools/build/options/WITH_GNU_SORT Modified: user/attilio/vmcontention/MAINTAINERS (contents, props changed) user/attilio/vmcontention/Makefile user/attilio/vmcontention/Makefile.inc1 user/attilio/vmcontention/ObsoleteFiles.inc user/attilio/vmcontention/UPDATING user/attilio/vmcontention/bin/date/extern.h user/attilio/vmcontention/bin/date/netdate.c user/attilio/vmcontention/bin/dd/conv_tab.c user/attilio/vmcontention/bin/ed/buf.c user/attilio/vmcontention/bin/ed/cbc.c user/attilio/vmcontention/bin/ed/ed.h user/attilio/vmcontention/bin/ed/glbl.c user/attilio/vmcontention/bin/ed/io.c user/attilio/vmcontention/bin/ed/main.c user/attilio/vmcontention/bin/ed/re.c user/attilio/vmcontention/bin/ed/sub.c user/attilio/vmcontention/bin/ed/undo.c user/attilio/vmcontention/bin/getfacl/getfacl.c user/attilio/vmcontention/bin/ls/ls.c user/attilio/vmcontention/bin/ls/print.c user/attilio/vmcontention/bin/pax/ar_io.c user/attilio/vmcontention/bin/pax/ar_subs.c user/attilio/vmcontention/bin/pax/extern.h user/attilio/vmcontention/bin/pax/options.c user/attilio/vmcontention/bin/rcp/rcp.c user/attilio/vmcontention/bin/rm/rm.c user/attilio/vmcontention/bin/setfacl/setfacl.c user/attilio/vmcontention/bin/setfacl/setfacl.h user/attilio/vmcontention/bin/sh/sh.1 user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h user/attilio/vmcontention/cddl/lib/libzpool/Makefile user/attilio/vmcontention/contrib/bind9/CHANGES user/attilio/vmcontention/contrib/bind9/bin/named/query.c user/attilio/vmcontention/contrib/bind9/version user/attilio/vmcontention/contrib/bsnmp/snmp_mibII/mibII.h user/attilio/vmcontention/contrib/bsnmp/snmp_mibII/mibII_route.c user/attilio/vmcontention/contrib/dialog/CHANGES user/attilio/vmcontention/contrib/dialog/VERSION user/attilio/vmcontention/contrib/dialog/aclocal.m4 user/attilio/vmcontention/contrib/dialog/arrows.c user/attilio/vmcontention/contrib/dialog/buttons.c user/attilio/vmcontention/contrib/dialog/calendar.c user/attilio/vmcontention/contrib/dialog/checklist.c user/attilio/vmcontention/contrib/dialog/columns.c user/attilio/vmcontention/contrib/dialog/configure user/attilio/vmcontention/contrib/dialog/configure.in user/attilio/vmcontention/contrib/dialog/dialog.1 user/attilio/vmcontention/contrib/dialog/dialog.3 user/attilio/vmcontention/contrib/dialog/dialog.c user/attilio/vmcontention/contrib/dialog/dialog.h user/attilio/vmcontention/contrib/dialog/dlg_colors.h user/attilio/vmcontention/contrib/dialog/dlg_keys.c user/attilio/vmcontention/contrib/dialog/dlg_keys.h user/attilio/vmcontention/contrib/dialog/editbox.c user/attilio/vmcontention/contrib/dialog/formbox.c user/attilio/vmcontention/contrib/dialog/fselect.c user/attilio/vmcontention/contrib/dialog/guage.c user/attilio/vmcontention/contrib/dialog/headers-sh.in user/attilio/vmcontention/contrib/dialog/inputbox.c user/attilio/vmcontention/contrib/dialog/inputstr.c user/attilio/vmcontention/contrib/dialog/makefile.in user/attilio/vmcontention/contrib/dialog/menubox.c user/attilio/vmcontention/contrib/dialog/mixedform.c user/attilio/vmcontention/contrib/dialog/mixedgauge.c user/attilio/vmcontention/contrib/dialog/msgbox.c user/attilio/vmcontention/contrib/dialog/package/debian/changelog user/attilio/vmcontention/contrib/dialog/package/dialog.spec user/attilio/vmcontention/contrib/dialog/pause.c user/attilio/vmcontention/contrib/dialog/po/cs.po user/attilio/vmcontention/contrib/dialog/po/el.po user/attilio/vmcontention/contrib/dialog/po/hr.po user/attilio/vmcontention/contrib/dialog/po/sr.po user/attilio/vmcontention/contrib/dialog/prgbox.c user/attilio/vmcontention/contrib/dialog/progressbox.c user/attilio/vmcontention/contrib/dialog/rc.c user/attilio/vmcontention/contrib/dialog/samples/copifuncs/admin.funcs user/attilio/vmcontention/contrib/dialog/samples/copifuncs/common.funcs user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.funcs user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.ifman2 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.ifpoll2 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.ifreq2 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.sendifm1 user/attilio/vmcontention/contrib/dialog/samples/copifuncs/copi.wheel user/attilio/vmcontention/contrib/dialog/samples/copismall user/attilio/vmcontention/contrib/dialog/samples/debian.rc user/attilio/vmcontention/contrib/dialog/samples/dialog.py user/attilio/vmcontention/contrib/dialog/samples/form1 user/attilio/vmcontention/contrib/dialog/samples/inputmenu user/attilio/vmcontention/contrib/dialog/samples/inputmenu-stdout user/attilio/vmcontention/contrib/dialog/samples/inputmenu1 user/attilio/vmcontention/contrib/dialog/samples/inputmenu2 user/attilio/vmcontention/contrib/dialog/samples/inputmenu3 user/attilio/vmcontention/contrib/dialog/samples/inputmenu4 user/attilio/vmcontention/contrib/dialog/samples/killall user/attilio/vmcontention/contrib/dialog/samples/prgbox user/attilio/vmcontention/contrib/dialog/samples/prgbox2 user/attilio/vmcontention/contrib/dialog/samples/report-button user/attilio/vmcontention/contrib/dialog/samples/report-edit user/attilio/vmcontention/contrib/dialog/samples/report-string user/attilio/vmcontention/contrib/dialog/samples/report-tempfile user/attilio/vmcontention/contrib/dialog/samples/report-yesno user/attilio/vmcontention/contrib/dialog/samples/setup-edit user/attilio/vmcontention/contrib/dialog/samples/setup-tempfile user/attilio/vmcontention/contrib/dialog/samples/setup-utf8 user/attilio/vmcontention/contrib/dialog/samples/setup-vars user/attilio/vmcontention/contrib/dialog/samples/slackware.rc user/attilio/vmcontention/contrib/dialog/samples/sourcemage.rc user/attilio/vmcontention/contrib/dialog/samples/suse.rc user/attilio/vmcontention/contrib/dialog/samples/tailboxbg user/attilio/vmcontention/contrib/dialog/samples/tailboxbg1 user/attilio/vmcontention/contrib/dialog/samples/tailboxbg2 user/attilio/vmcontention/contrib/dialog/samples/testdata-8bit user/attilio/vmcontention/contrib/dialog/samples/wheel user/attilio/vmcontention/contrib/dialog/samples/whiptail.rc user/attilio/vmcontention/contrib/dialog/tailbox.c user/attilio/vmcontention/contrib/dialog/textbox.c user/attilio/vmcontention/contrib/dialog/timebox.c user/attilio/vmcontention/contrib/dialog/trace.c user/attilio/vmcontention/contrib/dialog/ui_getc.c user/attilio/vmcontention/contrib/dialog/util.c user/attilio/vmcontention/contrib/dialog/yesno.c user/attilio/vmcontention/contrib/groff/tmac/doc-syms user/attilio/vmcontention/contrib/libc++/include/__bit_reference user/attilio/vmcontention/contrib/libc++/include/__config user/attilio/vmcontention/contrib/libc++/include/__hash_table user/attilio/vmcontention/contrib/libc++/include/__locale user/attilio/vmcontention/contrib/libc++/include/__mutex_base user/attilio/vmcontention/contrib/libc++/include/__tree user/attilio/vmcontention/contrib/libc++/include/__tuple user/attilio/vmcontention/contrib/libc++/include/__undef_min_max user/attilio/vmcontention/contrib/libc++/include/algorithm user/attilio/vmcontention/contrib/libc++/include/array user/attilio/vmcontention/contrib/libc++/include/atomic user/attilio/vmcontention/contrib/libc++/include/bitset user/attilio/vmcontention/contrib/libc++/include/chrono user/attilio/vmcontention/contrib/libc++/include/cmath user/attilio/vmcontention/contrib/libc++/include/complex user/attilio/vmcontention/contrib/libc++/include/condition_variable user/attilio/vmcontention/contrib/libc++/include/cstddef user/attilio/vmcontention/contrib/libc++/include/cstdio user/attilio/vmcontention/contrib/libc++/include/cstdlib user/attilio/vmcontention/contrib/libc++/include/deque user/attilio/vmcontention/contrib/libc++/include/exception user/attilio/vmcontention/contrib/libc++/include/forward_list user/attilio/vmcontention/contrib/libc++/include/fstream user/attilio/vmcontention/contrib/libc++/include/functional user/attilio/vmcontention/contrib/libc++/include/future user/attilio/vmcontention/contrib/libc++/include/ios user/attilio/vmcontention/contrib/libc++/include/iosfwd user/attilio/vmcontention/contrib/libc++/include/istream user/attilio/vmcontention/contrib/libc++/include/iterator user/attilio/vmcontention/contrib/libc++/include/list user/attilio/vmcontention/contrib/libc++/include/locale user/attilio/vmcontention/contrib/libc++/include/map user/attilio/vmcontention/contrib/libc++/include/memory user/attilio/vmcontention/contrib/libc++/include/mutex user/attilio/vmcontention/contrib/libc++/include/new user/attilio/vmcontention/contrib/libc++/include/ostream user/attilio/vmcontention/contrib/libc++/include/queue user/attilio/vmcontention/contrib/libc++/include/random user/attilio/vmcontention/contrib/libc++/include/regex user/attilio/vmcontention/contrib/libc++/include/stack user/attilio/vmcontention/contrib/libc++/include/streambuf user/attilio/vmcontention/contrib/libc++/include/string user/attilio/vmcontention/contrib/libc++/include/system_error user/attilio/vmcontention/contrib/libc++/include/thread user/attilio/vmcontention/contrib/libc++/include/tuple user/attilio/vmcontention/contrib/libc++/include/type_traits user/attilio/vmcontention/contrib/libc++/include/unordered_map user/attilio/vmcontention/contrib/libc++/include/utility user/attilio/vmcontention/contrib/libc++/include/valarray user/attilio/vmcontention/contrib/libc++/include/vector user/attilio/vmcontention/contrib/libc++/src/condition_variable.cpp user/attilio/vmcontention/contrib/libc++/src/debug.cpp user/attilio/vmcontention/contrib/libc++/src/exception.cpp user/attilio/vmcontention/contrib/libc++/src/future.cpp user/attilio/vmcontention/contrib/libc++/src/ios.cpp user/attilio/vmcontention/contrib/libc++/src/iostream.cpp user/attilio/vmcontention/contrib/libc++/src/locale.cpp user/attilio/vmcontention/contrib/libc++/src/memory.cpp user/attilio/vmcontention/contrib/libc++/src/mutex.cpp user/attilio/vmcontention/contrib/libc++/src/new.cpp user/attilio/vmcontention/contrib/libc++/src/random.cpp user/attilio/vmcontention/contrib/libc++/src/stdexcept.cpp user/attilio/vmcontention/contrib/libc++/src/thread.cpp user/attilio/vmcontention/contrib/libc++/src/typeinfo.cpp user/attilio/vmcontention/contrib/libpcap/CHANGES user/attilio/vmcontention/contrib/libpcap/CREDITS user/attilio/vmcontention/contrib/libpcap/Makefile.in user/attilio/vmcontention/contrib/libpcap/VERSION user/attilio/vmcontention/contrib/libpcap/config.h.in user/attilio/vmcontention/contrib/libpcap/configure user/attilio/vmcontention/contrib/libpcap/configure.in user/attilio/vmcontention/contrib/libpcap/gencode.c user/attilio/vmcontention/contrib/libpcap/gencode.h user/attilio/vmcontention/contrib/libpcap/optimize.c user/attilio/vmcontention/contrib/libpcap/packaging/pcap.spec.in user/attilio/vmcontention/contrib/libpcap/pcap-bpf.c user/attilio/vmcontention/contrib/libpcap/pcap-common.c user/attilio/vmcontention/contrib/libpcap/pcap-linux.c user/attilio/vmcontention/contrib/libpcap/pcap-netfilter-linux.c user/attilio/vmcontention/contrib/libpcap/pcap.c user/attilio/vmcontention/contrib/libpcap/pcap/bpf.h user/attilio/vmcontention/contrib/llvm/include/llvm/Support/TargetRegistry.h user/attilio/vmcontention/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp user/attilio/vmcontention/contrib/llvm/lib/Support/Host.cpp user/attilio/vmcontention/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp user/attilio/vmcontention/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h user/attilio/vmcontention/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp user/attilio/vmcontention/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.h user/attilio/vmcontention/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp user/attilio/vmcontention/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h user/attilio/vmcontention/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp user/attilio/vmcontention/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h user/attilio/vmcontention/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp user/attilio/vmcontention/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h user/attilio/vmcontention/contrib/llvm/lib/Target/X86/X86.td user/attilio/vmcontention/contrib/llvm/tools/clang/lib/Driver/Tools.cpp user/attilio/vmcontention/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp user/attilio/vmcontention/contrib/llvm/tools/llvm-mc/llvm-mc.cpp user/attilio/vmcontention/contrib/netcat/FREEBSD-vendor user/attilio/vmcontention/contrib/netcat/nc.1 user/attilio/vmcontention/contrib/netcat/netcat.c user/attilio/vmcontention/contrib/netcat/socks.c user/attilio/vmcontention/contrib/tcpdump/CHANGES user/attilio/vmcontention/contrib/tcpdump/CREDITS user/attilio/vmcontention/contrib/tcpdump/Makefile.in user/attilio/vmcontention/contrib/tcpdump/VERSION user/attilio/vmcontention/contrib/tcpdump/configure user/attilio/vmcontention/contrib/tcpdump/configure.in user/attilio/vmcontention/contrib/tcpdump/decode_prefix.h user/attilio/vmcontention/contrib/tcpdump/ethertype.h user/attilio/vmcontention/contrib/tcpdump/forces.h user/attilio/vmcontention/contrib/tcpdump/interface.h user/attilio/vmcontention/contrib/tcpdump/ipproto.c user/attilio/vmcontention/contrib/tcpdump/netdissect.h user/attilio/vmcontention/contrib/tcpdump/print-802_11.c user/attilio/vmcontention/contrib/tcpdump/print-bgp.c user/attilio/vmcontention/contrib/tcpdump/print-ether.c user/attilio/vmcontention/contrib/tcpdump/print-forces.c user/attilio/vmcontention/contrib/tcpdump/print-icmp6.c user/attilio/vmcontention/contrib/tcpdump/print-igmp.c user/attilio/vmcontention/contrib/tcpdump/print-ip.c user/attilio/vmcontention/contrib/tcpdump/print-ip6opts.c user/attilio/vmcontention/contrib/tcpdump/print-ldp.c user/attilio/vmcontention/contrib/tcpdump/print-lldp.c user/attilio/vmcontention/contrib/tcpdump/print-lwapp.c user/attilio/vmcontention/contrib/tcpdump/print-ospf6.c user/attilio/vmcontention/contrib/tcpdump/print-pim.c user/attilio/vmcontention/contrib/tcpdump/print-pppoe.c user/attilio/vmcontention/contrib/tcpdump/print-rrcp.c user/attilio/vmcontention/contrib/tcpdump/tcpdump.1.in user/attilio/vmcontention/contrib/tcpdump/tcpdump.c user/attilio/vmcontention/contrib/telnet/telnetd/state.c user/attilio/vmcontention/contrib/tzdata/asia user/attilio/vmcontention/contrib/tzdata/australasia user/attilio/vmcontention/etc/Makefile user/attilio/vmcontention/etc/defaults/periodic.conf user/attilio/vmcontention/etc/defaults/rc.conf user/attilio/vmcontention/etc/devd.conf user/attilio/vmcontention/etc/devd/usb.conf user/attilio/vmcontention/etc/gettytab user/attilio/vmcontention/etc/group user/attilio/vmcontention/etc/master.passwd user/attilio/vmcontention/etc/motd user/attilio/vmcontention/etc/mtree/BSD.include.dist user/attilio/vmcontention/etc/mtree/BSD.root.dist user/attilio/vmcontention/etc/mtree/BSD.usr.dist user/attilio/vmcontention/etc/periodic/daily/490.status-pkg-changes user/attilio/vmcontention/etc/sendmail/freefall.mc user/attilio/vmcontention/games/bcd/bcd.c user/attilio/vmcontention/games/caesar/caesar.c user/attilio/vmcontention/games/fortune/datfiles/freebsd-tips user/attilio/vmcontention/games/fortune/tools/do_uniq.py user/attilio/vmcontention/games/random/randomize_fd.c user/attilio/vmcontention/gnu/lib/libdialog/dlg_config.h user/attilio/vmcontention/gnu/usr.bin/Makefile user/attilio/vmcontention/gnu/usr.bin/cc/cc_int/Makefile user/attilio/vmcontention/gnu/usr.bin/cc/include/Makefile user/attilio/vmcontention/gnu/usr.bin/send-pr/send-pr.sh user/attilio/vmcontention/include/Makefile user/attilio/vmcontention/include/grp.h user/attilio/vmcontention/include/pwd.h user/attilio/vmcontention/include/rpc/auth.h user/attilio/vmcontention/include/rpc/auth_unix.h user/attilio/vmcontention/include/stdatomic.h user/attilio/vmcontention/kerberos5/Makefile user/attilio/vmcontention/kerberos5/tools/asn1_compile/Makefile user/attilio/vmcontention/kerberos5/tools/slc/Makefile user/attilio/vmcontention/lib/Makefile user/attilio/vmcontention/lib/clang/include/Makefile user/attilio/vmcontention/lib/libc++/Makefile user/attilio/vmcontention/lib/libc/compat-43/killpg.2 user/attilio/vmcontention/lib/libc/gen/Makefile.inc user/attilio/vmcontention/lib/libc/gen/Symbol.map user/attilio/vmcontention/lib/libc/gen/arc4random.c user/attilio/vmcontention/lib/libc/gen/fstab.c user/attilio/vmcontention/lib/libc/gen/fts-compat.c user/attilio/vmcontention/lib/libc/gen/fts.c user/attilio/vmcontention/lib/libc/gen/getcap.c user/attilio/vmcontention/lib/libc/gen/getcwd.c user/attilio/vmcontention/lib/libc/gen/nlist.c user/attilio/vmcontention/lib/libc/gen/opendir.c user/attilio/vmcontention/lib/libc/gen/pututxline.c user/attilio/vmcontention/lib/libc/gen/readpassphrase.c user/attilio/vmcontention/lib/libc/gen/sem_new.c user/attilio/vmcontention/lib/libc/gen/syslog.c user/attilio/vmcontention/lib/libc/locale/ldpart.c user/attilio/vmcontention/lib/libc/net/ip6opt.c user/attilio/vmcontention/lib/libc/nls/msgcat.c user/attilio/vmcontention/lib/libc/rpc/auth_unix.c user/attilio/vmcontention/lib/libc/rpc/authunix_prot.c user/attilio/vmcontention/lib/libc/rpc/clnt_perror.c user/attilio/vmcontention/lib/libc/rpc/rpc_generic.c user/attilio/vmcontention/lib/libc/rpc/rpc_soc.3 user/attilio/vmcontention/lib/libc/rpc/rpcb_clnt.c user/attilio/vmcontention/lib/libc/rpc/svc_auth_unix.c user/attilio/vmcontention/lib/libc/rpc/svc_run.c user/attilio/vmcontention/lib/libc/stdlib/getenv.c user/attilio/vmcontention/lib/libc/stdlib/rand.c user/attilio/vmcontention/lib/libc/stdlib/random.c user/attilio/vmcontention/lib/libc/string/ffs.3 user/attilio/vmcontention/lib/libc/sys/kill.2 user/attilio/vmcontention/lib/libc/sys/listen.2 user/attilio/vmcontention/lib/libc/sys/sigaction.2 user/attilio/vmcontention/lib/libc/sys/sigwait.2 user/attilio/vmcontention/lib/libc/sys/sigwaitinfo.2 user/attilio/vmcontention/lib/libc/yp/yplib.c user/attilio/vmcontention/lib/libdwarf/dwarf_errmsg.c user/attilio/vmcontention/lib/libdwarf/dwarf_init.c user/attilio/vmcontention/lib/libedit/read.c user/attilio/vmcontention/lib/libelf/elf_errmsg.c user/attilio/vmcontention/lib/libfetch/http.c user/attilio/vmcontention/lib/libfetch/http.errors user/attilio/vmcontention/lib/libjail/jail.c user/attilio/vmcontention/lib/libkvm/kvm_proc.c user/attilio/vmcontention/lib/libpam/modules/pam_krb5/pam_krb5.c user/attilio/vmcontention/lib/libpam/modules/pam_radius/pam_radius.c user/attilio/vmcontention/lib/libpcap/config.h user/attilio/vmcontention/lib/libpmc/Makefile user/attilio/vmcontention/lib/libpmc/libpmc.c user/attilio/vmcontention/lib/libpmc/pmc.ivybridge.3 user/attilio/vmcontention/lib/libpmc/pmc.sandybridge.3 user/attilio/vmcontention/lib/libpmc/pmc.sandybridgeuc.3 user/attilio/vmcontention/lib/libprocstat/Makefile user/attilio/vmcontention/lib/libprocstat/common_kvm.h user/attilio/vmcontention/lib/libprocstat/libprocstat.c user/attilio/vmcontention/lib/librpcsec_gss/svc_rpcsec_gss.c user/attilio/vmcontention/lib/libstand/nandfs.c user/attilio/vmcontention/lib/libstand/nfs.c user/attilio/vmcontention/lib/libstdbuf/Makefile user/attilio/vmcontention/lib/libthread_db/libpthread_db.c user/attilio/vmcontention/lib/libthread_db/libthr_db.c user/attilio/vmcontention/lib/msun/ld128/s_expl.c user/attilio/vmcontention/lib/msun/ld80/s_expl.c user/attilio/vmcontention/lib/msun/man/ieee.3 user/attilio/vmcontention/lib/msun/src/math_private.h user/attilio/vmcontention/lib/msun/src/s_cosl.c user/attilio/vmcontention/lib/msun/src/s_sinl.c user/attilio/vmcontention/lib/msun/src/s_tanl.c user/attilio/vmcontention/libexec/Makefile user/attilio/vmcontention/libexec/atrun/atrun.c user/attilio/vmcontention/libexec/rpc.rusersd/Makefile user/attilio/vmcontention/libexec/rpc.rusersd/rusers_proc.c user/attilio/vmcontention/libexec/rpc.rusersd/rusersd.c user/attilio/vmcontention/libexec/rtld-aout/shlib.c user/attilio/vmcontention/libexec/talkd/announce.c user/attilio/vmcontention/libexec/talkd/extern.h user/attilio/vmcontention/libexec/talkd/process.c user/attilio/vmcontention/libexec/talkd/table.c user/attilio/vmcontention/libexec/talkd/talkd.c user/attilio/vmcontention/libexec/tftpd/tftp-io.c user/attilio/vmcontention/libexec/tftpd/tftp-utils.c user/attilio/vmcontention/libexec/tftpd/tftpd.c user/attilio/vmcontention/release/Makefile user/attilio/vmcontention/release/doc/Makefile user/attilio/vmcontention/release/doc/README user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/early-adopter/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/errata/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/alpha/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/common/hw.ent user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/i386/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/ia64/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/pc98/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/hardware/sparc64/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/common/install.ent user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/i386/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/ia64/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/pc98/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/installation/sparc64/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/readme/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/alpha/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/common/relnotes.ent user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/i386/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/ia64/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/pc98/Makefile user/attilio/vmcontention/release/doc/de_DE.ISO8859-1/relnotes/sparc64/Makefile user/attilio/vmcontention/release/doc/en_US.ISO8859-1/errata/Makefile user/attilio/vmcontention/release/doc/en_US.ISO8859-1/hardware/Makefile user/attilio/vmcontention/release/doc/en_US.ISO8859-1/readme/Makefile user/attilio/vmcontention/release/doc/en_US.ISO8859-1/relnotes/Makefile user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/early-adopter/Makefile user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/errata/Makefile user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/alpha/Makefile user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/common/hw.ent user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/i386/Makefile user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/ia64/Makefile user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/pc98/Makefile user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/hardware/sparc64/Makefile user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/alpha/Makefile user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/common/install.ent user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/i386/Makefile user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/pc98/Makefile user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/installation/sparc64/Makefile user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/relnotes/alpha/Makefile user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/relnotes/common/relnotes.ent user/attilio/vmcontention/release/doc/fr_FR.ISO8859-1/relnotes/i386/Makefile user/attilio/vmcontention/release/doc/ja_JP.eucJP/errata/Makefile user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/alpha/Makefile user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/amd64/Makefile user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/common/hw.ent user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/i386/Makefile user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/ia64/Makefile user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/pc98/Makefile user/attilio/vmcontention/release/doc/ja_JP.eucJP/hardware/sparc64/Makefile user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/alpha/Makefile user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/amd64/Makefile user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/common/relnotes.ent user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/i386/Makefile user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/ia64/Makefile user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/pc98/Makefile user/attilio/vmcontention/release/doc/ja_JP.eucJP/relnotes/sparc64/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/errata/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/alpha/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/amd64/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/common/hw.ent user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/i386/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/ia64/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/pc98/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/hardware/sparc64/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/alpha/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/amd64/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/common/install.ent user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/i386/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/ia64/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/pc98/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/installation/sparc64/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/readme/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/alpha/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/amd64/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/common/relnotes.ent user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/i386/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/ia64/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/pc98/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/relnotes/sparc64/Makefile user/attilio/vmcontention/release/doc/ru_RU.KOI8-R/share/examples/dev-auto-translate.pl user/attilio/vmcontention/release/doc/share/mk/doc.relnotes.mk user/attilio/vmcontention/release/doc/zh_CN.GB2312/errata/Makefile user/attilio/vmcontention/release/doc/zh_CN.GB2312/hardware/Makefile user/attilio/vmcontention/release/doc/zh_CN.GB2312/readme/Makefile user/attilio/vmcontention/release/doc/zh_CN.GB2312/relnotes/Makefile user/attilio/vmcontention/release/generate-release.sh user/attilio/vmcontention/rescue/rescue/Makefile user/attilio/vmcontention/sbin/Makefile user/attilio/vmcontention/sbin/camcontrol/camcontrol.c user/attilio/vmcontention/sbin/camcontrol/camcontrol.h user/attilio/vmcontention/sbin/camcontrol/fwdownload.c user/attilio/vmcontention/sbin/camcontrol/modeedit.c user/attilio/vmcontention/sbin/ccdconfig/ccdconfig.c user/attilio/vmcontention/sbin/ddb/ddb.c user/attilio/vmcontention/sbin/devd/devd.cc user/attilio/vmcontention/sbin/devd/devd.conf.5 user/attilio/vmcontention/sbin/dump/traverse.c user/attilio/vmcontention/sbin/dumpfs/dumpfs.c user/attilio/vmcontention/sbin/etherswitchcfg/etherswitchcfg.c user/attilio/vmcontention/sbin/etherswitchcfg/ifmedia.c user/attilio/vmcontention/sbin/fsck/Makefile user/attilio/vmcontention/sbin/fsck/fsck.c user/attilio/vmcontention/sbin/fsck/fsutil.c user/attilio/vmcontention/sbin/fsck/fsutil.h user/attilio/vmcontention/sbin/fsck/preen.c user/attilio/vmcontention/sbin/fsck_ffs/fsutil.c user/attilio/vmcontention/sbin/fsck_ffs/gjournal.c user/attilio/vmcontention/sbin/fsck_ffs/inode.c user/attilio/vmcontention/sbin/fsck_ffs/main.c user/attilio/vmcontention/sbin/fsck_ffs/pass1.c user/attilio/vmcontention/sbin/fsck_ffs/pass2.c user/attilio/vmcontention/sbin/fsck_ffs/pass4.c user/attilio/vmcontention/sbin/fsck_ffs/suj.c user/attilio/vmcontention/sbin/fsck_msdosfs/Makefile user/attilio/vmcontention/sbin/fsck_msdosfs/boot.c user/attilio/vmcontention/sbin/fsck_msdosfs/check.c user/attilio/vmcontention/sbin/fsck_msdosfs/dir.c user/attilio/vmcontention/sbin/fsck_msdosfs/ext.h user/attilio/vmcontention/sbin/fsck_msdosfs/fat.c user/attilio/vmcontention/sbin/fsdb/fsdb.c user/attilio/vmcontention/sbin/fsdb/fsdbutil.c user/attilio/vmcontention/sbin/fsirand/fsirand.c user/attilio/vmcontention/sbin/geom/core/geom.c user/attilio/vmcontention/sbin/ggate/ggatec/ggatec.c user/attilio/vmcontention/sbin/ggate/ggated/ggated.c user/attilio/vmcontention/sbin/ggate/ggatel/ggatel.c user/attilio/vmcontention/sbin/growfs/growfs.c user/attilio/vmcontention/sbin/ipfw/ipv6.c user/attilio/vmcontention/sbin/mount/getmntopts.3 user/attilio/vmcontention/sbin/mount/mount.8 user/attilio/vmcontention/sbin/mount/mount.c user/attilio/vmcontention/sbin/natd/natd.c user/attilio/vmcontention/sbin/newfs/mkfs.c user/attilio/vmcontention/sbin/pfctl/pf_print_state.c user/attilio/vmcontention/sbin/ping/ping.c user/attilio/vmcontention/sbin/ping6/ping6.c user/attilio/vmcontention/sbin/quotacheck/quotacheck.c user/attilio/vmcontention/sbin/rcorder/rcorder.c user/attilio/vmcontention/sbin/restore/dirs.c user/attilio/vmcontention/sbin/restore/interactive.c user/attilio/vmcontention/sbin/restore/restore.c user/attilio/vmcontention/sbin/restore/symtab.c user/attilio/vmcontention/sbin/restore/tape.c user/attilio/vmcontention/sbin/tunefs/tunefs.c user/attilio/vmcontention/share/Makefile user/attilio/vmcontention/share/dict/freebsd user/attilio/vmcontention/share/doc/Makefile user/attilio/vmcontention/share/doc/smm/01.setup/3.t user/attilio/vmcontention/share/doc/smm/01.setup/4.t user/attilio/vmcontention/share/examples/Makefile user/attilio/vmcontention/share/examples/csh/dot.cshrc user/attilio/vmcontention/share/examples/cvsup/ports-supfile user/attilio/vmcontention/share/examples/etc/README.examples user/attilio/vmcontention/share/man/man1/Makefile user/attilio/vmcontention/share/man/man4/Makefile user/attilio/vmcontention/share/man/man4/ata.4 user/attilio/vmcontention/share/man/man4/carp.4 user/attilio/vmcontention/share/man/man4/est.4 user/attilio/vmcontention/share/man/man4/ip.4 user/attilio/vmcontention/share/man/man4/ip6.4 user/attilio/vmcontention/share/man/man4/ktr.4 user/attilio/vmcontention/share/man/man4/ng_netflow.4 user/attilio/vmcontention/share/man/man4/ng_ppp.4 user/attilio/vmcontention/share/man/man4/vale.4 user/attilio/vmcontention/share/man/man4/virtio.4 user/attilio/vmcontention/share/man/man5/Makefile user/attilio/vmcontention/share/man/man5/fstab.5 user/attilio/vmcontention/share/man/man5/make.conf.5 user/attilio/vmcontention/share/man/man5/portindex.5 user/attilio/vmcontention/share/man/man5/src.conf.5 user/attilio/vmcontention/share/man/man7/Makefile user/attilio/vmcontention/share/man/man7/build.7 user/attilio/vmcontention/share/man/man7/development.7 user/attilio/vmcontention/share/man/man7/hier.7 user/attilio/vmcontention/share/man/man9/Makefile user/attilio/vmcontention/share/man/man9/buf_ring.9 user/attilio/vmcontention/share/man/man9/drbr.9 user/attilio/vmcontention/share/man/man9/module.9 user/attilio/vmcontention/share/man/man9/namei.9 user/attilio/vmcontention/share/man/man9/pfil.9 user/attilio/vmcontention/share/misc/bsd-family-tree user/attilio/vmcontention/share/misc/committers-doc.dot user/attilio/vmcontention/share/misc/organization.dot user/attilio/vmcontention/share/mk/bsd.compiler.mk user/attilio/vmcontention/share/mk/bsd.crunchgen.mk user/attilio/vmcontention/share/mk/bsd.dep.mk user/attilio/vmcontention/share/mk/bsd.libnames.mk user/attilio/vmcontention/share/mk/bsd.obj.mk user/attilio/vmcontention/share/mk/bsd.own.mk user/attilio/vmcontention/share/mk/bsd.subdir.mk user/attilio/vmcontention/share/mk/bsd.sys.mk user/attilio/vmcontention/share/mk/sys.mk user/attilio/vmcontention/share/syscons/keymaps/INDEX.keymaps user/attilio/vmcontention/share/syscons/keymaps/Makefile user/attilio/vmcontention/sys/amd64/amd64/identcpu.c user/attilio/vmcontention/sys/amd64/amd64/machdep.c user/attilio/vmcontention/sys/amd64/amd64/mp_machdep.c user/attilio/vmcontention/sys/amd64/amd64/pmap.c user/attilio/vmcontention/sys/amd64/amd64/trap.c user/attilio/vmcontention/sys/amd64/include/atomic.h user/attilio/vmcontention/sys/amd64/include/intr_machdep.h user/attilio/vmcontention/sys/amd64/include/pc/bios.h user/attilio/vmcontention/sys/amd64/pci/pci_cfgreg.c user/attilio/vmcontention/sys/arm/arm/machdep.c user/attilio/vmcontention/sys/arm/arm/pmap-v6.c user/attilio/vmcontention/sys/arm/arm/pmap.c user/attilio/vmcontention/sys/arm/at91/at91_machdep.c user/attilio/vmcontention/sys/arm/at91/at91_rtc.c user/attilio/vmcontention/sys/arm/at91/at91_rtcreg.h user/attilio/vmcontention/sys/arm/broadcom/bcm2835/bcm2835_machdep.c user/attilio/vmcontention/sys/arm/broadcom/bcm2835/bcm2835_systimer.c user/attilio/vmcontention/sys/arm/conf/BEAGLEBONE user/attilio/vmcontention/sys/arm/econa/econa_machdep.c user/attilio/vmcontention/sys/arm/include/atomic.h user/attilio/vmcontention/sys/arm/include/machdep.h user/attilio/vmcontention/sys/arm/include/pmap.h user/attilio/vmcontention/sys/arm/lpc/lpc_machdep.c user/attilio/vmcontention/sys/arm/mv/mv_machdep.c user/attilio/vmcontention/sys/arm/s3c2xx0/s3c24x0_machdep.c user/attilio/vmcontention/sys/arm/sa11x0/assabet_machdep.c user/attilio/vmcontention/sys/arm/tegra/tegra2_machdep.c user/attilio/vmcontention/sys/arm/ti/am335x/am335x_dmtimer.c user/attilio/vmcontention/sys/arm/ti/cpsw/if_cpsw.c user/attilio/vmcontention/sys/arm/ti/ti_machdep.c user/attilio/vmcontention/sys/arm/ti/usb/omap_ehci.c user/attilio/vmcontention/sys/arm/xscale/i80321/ep80219_machdep.c user/attilio/vmcontention/sys/arm/xscale/i80321/iq31244_machdep.c user/attilio/vmcontention/sys/arm/xscale/i8134x/crb_machdep.c user/attilio/vmcontention/sys/arm/xscale/ixp425/avila_machdep.c user/attilio/vmcontention/sys/arm/xscale/pxa/pxa_machdep.c user/attilio/vmcontention/sys/boot/common/bootstrap.h user/attilio/vmcontention/sys/boot/common/console.c user/attilio/vmcontention/sys/boot/common/disk.c user/attilio/vmcontention/sys/boot/common/disk.h user/attilio/vmcontention/sys/boot/common/module.c user/attilio/vmcontention/sys/boot/common/reloc_elf.c user/attilio/vmcontention/sys/boot/efi/Makefile.inc user/attilio/vmcontention/sys/boot/ficl/Makefile user/attilio/vmcontention/sys/boot/forth/beastie.4th user/attilio/vmcontention/sys/boot/forth/color.4th.8 user/attilio/vmcontention/sys/boot/forth/loader.4th user/attilio/vmcontention/sys/boot/forth/loader.conf user/attilio/vmcontention/sys/boot/forth/menu-commands.4th user/attilio/vmcontention/sys/boot/forth/menu.4th user/attilio/vmcontention/sys/boot/forth/menu.rc user/attilio/vmcontention/sys/boot/i386/Makefile.inc user/attilio/vmcontention/sys/boot/i386/boot2/boot2.c user/attilio/vmcontention/sys/boot/i386/boot2/lib.h user/attilio/vmcontention/sys/boot/i386/boot2/sio.S user/attilio/vmcontention/sys/boot/i386/btx/btx/btx.S user/attilio/vmcontention/sys/boot/i386/gptboot/gptboot.c user/attilio/vmcontention/sys/boot/i386/libi386/biosdisk.c user/attilio/vmcontention/sys/boot/i386/libi386/comconsole.c user/attilio/vmcontention/sys/boot/i386/loader/Makefile user/attilio/vmcontention/sys/boot/i386/loader/conf.c user/attilio/vmcontention/sys/boot/i386/loader/main.c user/attilio/vmcontention/sys/boot/i386/zfsboot/zfsboot.c user/attilio/vmcontention/sys/boot/pc98/loader/main.c user/attilio/vmcontention/sys/boot/uboot/lib/disk.c user/attilio/vmcontention/sys/boot/userboot/ficl/Makefile user/attilio/vmcontention/sys/boot/userboot/test/test.c user/attilio/vmcontention/sys/boot/userboot/userboot.h user/attilio/vmcontention/sys/boot/userboot/userboot/libuserboot.h user/attilio/vmcontention/sys/boot/userboot/userboot/main.c user/attilio/vmcontention/sys/boot/userboot/userboot/userboot_disk.c user/attilio/vmcontention/sys/boot/zfs/Makefile user/attilio/vmcontention/sys/boot/zfs/libzfs.h user/attilio/vmcontention/sys/boot/zfs/zfs.c user/attilio/vmcontention/sys/boot/zfs/zfsimpl.c user/attilio/vmcontention/sys/cam/ata/ata_da.c user/attilio/vmcontention/sys/cam/ata/ata_pmp.c user/attilio/vmcontention/sys/cam/ata/ata_xpt.c user/attilio/vmcontention/sys/cam/cam_periph.c user/attilio/vmcontention/sys/cam/cam_queue.c user/attilio/vmcontention/sys/cam/cam_xpt.c user/attilio/vmcontention/sys/cam/ctl/ctl.c user/attilio/vmcontention/sys/cam/ctl/ctl_backend_block.c user/attilio/vmcontention/sys/cam/ctl/ctl_backend_ramdisk.c user/attilio/vmcontention/sys/cam/ctl/ctl_frontend_cam_sim.c user/attilio/vmcontention/sys/cam/ctl/scsi_ctl.c user/attilio/vmcontention/sys/cam/scsi/scsi_cd.c user/attilio/vmcontention/sys/cam/scsi/scsi_ch.c user/attilio/vmcontention/sys/cam/scsi/scsi_da.c user/attilio/vmcontention/sys/cam/scsi/scsi_enc_ses.c user/attilio/vmcontention/sys/cam/scsi/scsi_pass.c user/attilio/vmcontention/sys/cam/scsi/scsi_sa.c user/attilio/vmcontention/sys/cam/scsi/scsi_sg.c user/attilio/vmcontention/sys/cam/scsi/scsi_xpt.c user/attilio/vmcontention/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c user/attilio/vmcontention/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c user/attilio/vmcontention/sys/cddl/compat/opensolaris/sys/dkio.h user/attilio/vmcontention/sys/cddl/compat/opensolaris/sys/vnode.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/sa_impl.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c user/attilio/vmcontention/sys/compat/linprocfs/linprocfs.c user/attilio/vmcontention/sys/compat/linux/linux_file.c user/attilio/vmcontention/sys/compat/linux/linux_misc.c user/attilio/vmcontention/sys/compat/ndis/subr_ndis.c user/attilio/vmcontention/sys/compat/svr4/svr4_misc.c user/attilio/vmcontention/sys/conf/NOTES user/attilio/vmcontention/sys/conf/files user/attilio/vmcontention/sys/conf/files.amd64 user/attilio/vmcontention/sys/conf/files.arm user/attilio/vmcontention/sys/conf/files.i386 user/attilio/vmcontention/sys/conf/files.ia64 user/attilio/vmcontention/sys/conf/files.mips user/attilio/vmcontention/sys/conf/files.pc98 user/attilio/vmcontention/sys/conf/files.powerpc user/attilio/vmcontention/sys/conf/files.sparc64 user/attilio/vmcontention/sys/conf/kern.pre.mk user/attilio/vmcontention/sys/conf/kmod.mk user/attilio/vmcontention/sys/conf/newvers.sh user/attilio/vmcontention/sys/conf/options user/attilio/vmcontention/sys/contrib/altq/altq/altq_priq.c user/attilio/vmcontention/sys/contrib/altq/altq/altq_red.c user/attilio/vmcontention/sys/contrib/altq/altq/altq_rio.c user/attilio/vmcontention/sys/contrib/altq/altq/altq_rmclass.c user/attilio/vmcontention/sys/contrib/ipfilter/netinet/fil.c user/attilio/vmcontention/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c user/attilio/vmcontention/sys/contrib/rdma/rdma_addr.c user/attilio/vmcontention/sys/dev/aac/aac_cam.c user/attilio/vmcontention/sys/dev/acpi_support/acpi_wmi.c user/attilio/vmcontention/sys/dev/acpica/acpi_pcib_acpi.c user/attilio/vmcontention/sys/dev/acpica/acpi_thermal.c user/attilio/vmcontention/sys/dev/acpica/acpi_video.c user/attilio/vmcontention/sys/dev/advansys/adv_eisa.c user/attilio/vmcontention/sys/dev/advansys/adv_isa.c user/attilio/vmcontention/sys/dev/advansys/adv_pci.c user/attilio/vmcontention/sys/dev/advansys/advansys.c user/attilio/vmcontention/sys/dev/advansys/advansys.h user/attilio/vmcontention/sys/dev/advansys/advlib.c user/attilio/vmcontention/sys/dev/advansys/advlib.h user/attilio/vmcontention/sys/dev/advansys/adw_pci.c user/attilio/vmcontention/sys/dev/advansys/adwcam.c user/attilio/vmcontention/sys/dev/advansys/adwlib.c user/attilio/vmcontention/sys/dev/advansys/adwlib.h user/attilio/vmcontention/sys/dev/advansys/adwvar.h user/attilio/vmcontention/sys/dev/aha/aha.c user/attilio/vmcontention/sys/dev/aha/aha_isa.c user/attilio/vmcontention/sys/dev/aha/aha_mca.c user/attilio/vmcontention/sys/dev/aha/ahareg.h user/attilio/vmcontention/sys/dev/ahb/ahb.c user/attilio/vmcontention/sys/dev/ahb/ahbreg.h user/attilio/vmcontention/sys/dev/ahci/ahciem.c user/attilio/vmcontention/sys/dev/aic/aic.c user/attilio/vmcontention/sys/dev/aic/aic_cbus.c user/attilio/vmcontention/sys/dev/aic/aic_isa.c user/attilio/vmcontention/sys/dev/aic/aic_pccard.c user/attilio/vmcontention/sys/dev/aic/aicvar.h user/attilio/vmcontention/sys/dev/ale/if_ale.c user/attilio/vmcontention/sys/dev/amr/amr.c user/attilio/vmcontention/sys/dev/arcmsr/arcmsr.c user/attilio/vmcontention/sys/dev/ata/ata-all.c user/attilio/vmcontention/sys/dev/ata/ata-all.h user/attilio/vmcontention/sys/dev/ata/ata-sata.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar2133.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar9002/ar9280.c user/attilio/vmcontention/sys/dev/ath/if_ath.c user/attilio/vmcontention/sys/dev/ath/if_ath_debug.c user/attilio/vmcontention/sys/dev/ath/if_ath_debug.h user/attilio/vmcontention/sys/dev/ath/if_ath_misc.h user/attilio/vmcontention/sys/dev/ath/if_ath_rx.c user/attilio/vmcontention/sys/dev/ath/if_ath_rx_edma.c user/attilio/vmcontention/sys/dev/ath/if_ath_sysctl.c user/attilio/vmcontention/sys/dev/ath/if_ath_tx.c user/attilio/vmcontention/sys/dev/ath/if_ath_tx.h user/attilio/vmcontention/sys/dev/ath/if_ath_tx_ht.c user/attilio/vmcontention/sys/dev/ath/if_athvar.h user/attilio/vmcontention/sys/dev/bge/if_bge.c user/attilio/vmcontention/sys/dev/bge/if_bgereg.h user/attilio/vmcontention/sys/dev/buslogic/bt.c user/attilio/vmcontention/sys/dev/buslogic/bt_eisa.c user/attilio/vmcontention/sys/dev/buslogic/bt_isa.c user/attilio/vmcontention/sys/dev/buslogic/bt_mca.c user/attilio/vmcontention/sys/dev/buslogic/bt_pci.c user/attilio/vmcontention/sys/dev/buslogic/btreg.h user/attilio/vmcontention/sys/dev/bxe/if_bxe.c user/attilio/vmcontention/sys/dev/cxgb/cxgb_main.c user/attilio/vmcontention/sys/dev/cxgb/ulp/tom/cxgb_tom.h user/attilio/vmcontention/sys/dev/cxgbe/adapter.h user/attilio/vmcontention/sys/dev/cxgbe/common/common.h user/attilio/vmcontention/sys/dev/cxgbe/common/t4_hw.c user/attilio/vmcontention/sys/dev/cxgbe/t4_ioctl.h user/attilio/vmcontention/sys/dev/cxgbe/t4_l2t.h user/attilio/vmcontention/sys/dev/cxgbe/t4_main.c user/attilio/vmcontention/sys/dev/cxgbe/t4_sge.c user/attilio/vmcontention/sys/dev/cxgbe/tom/t4_cpl_io.c user/attilio/vmcontention/sys/dev/cxgbe/tom/t4_listen.c user/attilio/vmcontention/sys/dev/cxgbe/tom/t4_tom.h user/attilio/vmcontention/sys/dev/dpt/dpt.h user/attilio/vmcontention/sys/dev/dpt/dpt_eisa.c user/attilio/vmcontention/sys/dev/dpt/dpt_isa.c user/attilio/vmcontention/sys/dev/dpt/dpt_pci.c user/attilio/vmcontention/sys/dev/dpt/dpt_scsi.c user/attilio/vmcontention/sys/dev/drm2/i915/i915_drv.c user/attilio/vmcontention/sys/dev/e1000/if_em.c user/attilio/vmcontention/sys/dev/e1000/if_igb.c user/attilio/vmcontention/sys/dev/e1000/if_igb.h user/attilio/vmcontention/sys/dev/e1000/if_lem.c user/attilio/vmcontention/sys/dev/etherswitch/arswitch/arswitch.c user/attilio/vmcontention/sys/dev/etherswitch/arswitch/arswitch_phy.c user/attilio/vmcontention/sys/dev/etherswitch/arswitch/arswitch_reg.c user/attilio/vmcontention/sys/dev/etherswitch/arswitch/arswitchvar.h user/attilio/vmcontention/sys/dev/etherswitch/etherswitch.c user/attilio/vmcontention/sys/dev/etherswitch/etherswitch_if.m user/attilio/vmcontention/sys/dev/flash/mx25l.c user/attilio/vmcontention/sys/dev/hpt27xx/os_bsd.c user/attilio/vmcontention/sys/dev/hwpmc/hwpmc_core.c user/attilio/vmcontention/sys/dev/hwpmc/hwpmc_intel.c user/attilio/vmcontention/sys/dev/hwpmc/hwpmc_mod.c user/attilio/vmcontention/sys/dev/hwpmc/pmc_events.h user/attilio/vmcontention/sys/dev/ie/if_ie_isa.c user/attilio/vmcontention/sys/dev/iicbus/pcf8563.c user/attilio/vmcontention/sys/dev/iicbus/s35390a.c user/attilio/vmcontention/sys/dev/ipmi/ipmi_smbios.c user/attilio/vmcontention/sys/dev/isci/isci.c user/attilio/vmcontention/sys/dev/isci/isci.h user/attilio/vmcontention/sys/dev/isci/isci_controller.c user/attilio/vmcontention/sys/dev/isf/isf.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe.h user/attilio/vmcontention/sys/dev/ixgbe/ixv.c user/attilio/vmcontention/sys/dev/md/md.c user/attilio/vmcontention/sys/dev/mfi/mfi.c user/attilio/vmcontention/sys/dev/mii/brgphy.c user/attilio/vmcontention/sys/dev/mii/smscphy.c user/attilio/vmcontention/sys/dev/mlx/mlx.c user/attilio/vmcontention/sys/dev/mlx/mlx_disk.c user/attilio/vmcontention/sys/dev/mlx/mlx_pci.c user/attilio/vmcontention/sys/dev/mlx/mlxvar.h user/attilio/vmcontention/sys/dev/mmc/mmc.c user/attilio/vmcontention/sys/dev/mps/mps_sas.c user/attilio/vmcontention/sys/dev/mps/mps_user.c user/attilio/vmcontention/sys/dev/mpt/mpt.c user/attilio/vmcontention/sys/dev/mpt/mpt.h user/attilio/vmcontention/sys/dev/mpt/mpt_cam.c user/attilio/vmcontention/sys/dev/mpt/mpt_debug.c user/attilio/vmcontention/sys/dev/mpt/mpt_pci.c user/attilio/vmcontention/sys/dev/mpt/mpt_raid.c user/attilio/vmcontention/sys/dev/mxge/if_mxge.c user/attilio/vmcontention/sys/dev/nand/nandsim_swap.c user/attilio/vmcontention/sys/dev/netmap/netmap.c user/attilio/vmcontention/sys/dev/netmap/netmap_kern.h user/attilio/vmcontention/sys/dev/netmap/netmap_mem2.c user/attilio/vmcontention/sys/dev/nvd/nvd.c user/attilio/vmcontention/sys/dev/nve/if_nvereg.h user/attilio/vmcontention/sys/dev/nvme/nvme.c user/attilio/vmcontention/sys/dev/nvme/nvme.h user/attilio/vmcontention/sys/dev/nvme/nvme_ctrlr.c user/attilio/vmcontention/sys/dev/nvme/nvme_ctrlr_cmd.c user/attilio/vmcontention/sys/dev/nvme/nvme_ns.c user/attilio/vmcontention/sys/dev/nvme/nvme_ns_cmd.c user/attilio/vmcontention/sys/dev/nvme/nvme_private.h user/attilio/vmcontention/sys/dev/nvme/nvme_qpair.c user/attilio/vmcontention/sys/dev/nvme/nvme_sysctl.c user/attilio/vmcontention/sys/dev/nvme/nvme_uio.c user/attilio/vmcontention/sys/dev/oce/oce_if.c user/attilio/vmcontention/sys/dev/pci/pci_user.c user/attilio/vmcontention/sys/dev/pci/pcireg.h user/attilio/vmcontention/sys/dev/sdhci/sdhci.c user/attilio/vmcontention/sys/dev/sdhci/sdhci.h user/attilio/vmcontention/sys/dev/sound/pci/hda/hdaa.c user/attilio/vmcontention/sys/dev/sound/pci/hda/hdaa_patches.c user/attilio/vmcontention/sys/dev/sound/pci/hdspe-pcm.c user/attilio/vmcontention/sys/dev/sound/pci/hdspe.c user/attilio/vmcontention/sys/dev/tws/tws.c user/attilio/vmcontention/sys/dev/tws/tws.h user/attilio/vmcontention/sys/dev/tws/tws_cam.c user/attilio/vmcontention/sys/dev/tws/tws_hdm.h user/attilio/vmcontention/sys/dev/tws/tws_user.c user/attilio/vmcontention/sys/dev/usb/controller/at91dci.c user/attilio/vmcontention/sys/dev/usb/controller/atmegadci.c user/attilio/vmcontention/sys/dev/usb/controller/avr32dci.c user/attilio/vmcontention/sys/dev/usb/controller/dwc_otg.c user/attilio/vmcontention/sys/dev/usb/controller/dwc_otg.h user/attilio/vmcontention/sys/dev/usb/controller/dwc_otgreg.h user/attilio/vmcontention/sys/dev/usb/controller/ehci.c user/attilio/vmcontention/sys/dev/usb/controller/musb_otg.c user/attilio/vmcontention/sys/dev/usb/controller/ohci.c user/attilio/vmcontention/sys/dev/usb/controller/uhci.c user/attilio/vmcontention/sys/dev/usb/controller/uss820dci.c user/attilio/vmcontention/sys/dev/usb/controller/xhci.c user/attilio/vmcontention/sys/dev/usb/input/uhid.c user/attilio/vmcontention/sys/dev/usb/net/if_ipheth.c user/attilio/vmcontention/sys/dev/usb/net/if_smsc.c user/attilio/vmcontention/sys/dev/usb/quirk/usb_quirk.c user/attilio/vmcontention/sys/dev/usb/serial/u3g.c user/attilio/vmcontention/sys/dev/usb/serial/uchcom.c user/attilio/vmcontention/sys/dev/usb/storage/umass.c user/attilio/vmcontention/sys/dev/usb/usb_hub.c user/attilio/vmcontention/sys/dev/usb/usb_pf.c user/attilio/vmcontention/sys/dev/usb/usbdevs user/attilio/vmcontention/sys/dev/virtio/virtio.c user/attilio/vmcontention/sys/dev/virtio/virtio.h user/attilio/vmcontention/sys/dev/virtio/virtqueue.c user/attilio/vmcontention/sys/dev/vxge/vxge.c user/attilio/vmcontention/sys/dev/xen/blkback/blkback.c user/attilio/vmcontention/sys/fs/coda/coda_subr.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_alloc.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_inode_cnv.c user/attilio/vmcontention/sys/fs/hpfs/hpfs_vfsops.c user/attilio/vmcontention/sys/fs/nandfs/nandfs_subr.c user/attilio/vmcontention/sys/fs/nfs/nfs_commonport.c user/attilio/vmcontention/sys/fs/nfsserver/nfs_nfsdkrpc.c user/attilio/vmcontention/sys/fs/nfsserver/nfs_nfsdport.c user/attilio/vmcontention/sys/fs/ntfs/ntfs_subr.c user/attilio/vmcontention/sys/fs/ntfs/ntfs_vfsops.c user/attilio/vmcontention/sys/fs/ntfs/ntfs_vnops.c user/attilio/vmcontention/sys/fs/nullfs/null_vnops.c user/attilio/vmcontention/sys/fs/procfs/procfs_map.c user/attilio/vmcontention/sys/fs/tmpfs/tmpfs_vfsops.c user/attilio/vmcontention/sys/fs/unionfs/union_subr.c user/attilio/vmcontention/sys/geom/geom_disk.c user/attilio/vmcontention/sys/geom/geom_vfs.c user/attilio/vmcontention/sys/geom/journal/g_journal.c user/attilio/vmcontention/sys/geom/part/g_part.c user/attilio/vmcontention/sys/geom/raid/g_raid_ctl.c user/attilio/vmcontention/sys/geom/raid/md_ddf.c user/attilio/vmcontention/sys/geom/raid/md_intel.c user/attilio/vmcontention/sys/geom/raid/md_promise.c user/attilio/vmcontention/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h user/attilio/vmcontention/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd.h user/attilio/vmcontention/sys/i386/bios/smapi.c user/attilio/vmcontention/sys/i386/conf/GENERIC user/attilio/vmcontention/sys/i386/i386/identcpu.c user/attilio/vmcontention/sys/i386/i386/machdep.c user/attilio/vmcontention/sys/i386/i386/mp_machdep.c user/attilio/vmcontention/sys/i386/i386/pmap.c user/attilio/vmcontention/sys/i386/i386/trap.c user/attilio/vmcontention/sys/i386/ibcs2/ibcs2_misc.c user/attilio/vmcontention/sys/i386/include/atomic.h user/attilio/vmcontention/sys/i386/include/intr_machdep.h user/attilio/vmcontention/sys/i386/include/pc/bios.h user/attilio/vmcontention/sys/i386/pci/pci_cfgreg.c user/attilio/vmcontention/sys/i386/xen/mp_machdep.c user/attilio/vmcontention/sys/i386/xen/pmap.c user/attilio/vmcontention/sys/i386/xen/xen_machdep.c user/attilio/vmcontention/sys/ia64/ia64/pmap.c user/attilio/vmcontention/sys/kern/Make.tags.inc user/attilio/vmcontention/sys/kern/dtio_kdtrace.c user/attilio/vmcontention/sys/kern/imgact_elf.c user/attilio/vmcontention/sys/kern/kern_acct.c user/attilio/vmcontention/sys/kern/kern_alq.c user/attilio/vmcontention/sys/kern/kern_clocksource.c user/attilio/vmcontention/sys/kern/kern_cons.c user/attilio/vmcontention/sys/kern/kern_ctf.c user/attilio/vmcontention/sys/kern/kern_descrip.c user/attilio/vmcontention/sys/kern/kern_exec.c user/attilio/vmcontention/sys/kern/kern_exit.c user/attilio/vmcontention/sys/kern/kern_gzio.c user/attilio/vmcontention/sys/kern/kern_intr.c user/attilio/vmcontention/sys/kern/kern_jail.c user/attilio/vmcontention/sys/kern/kern_ktrace.c user/attilio/vmcontention/sys/kern/kern_linker.c user/attilio/vmcontention/sys/kern/kern_proc.c user/attilio/vmcontention/sys/kern/kern_rmlock.c user/attilio/vmcontention/sys/kern/kern_sig.c user/attilio/vmcontention/sys/kern/kern_thread.c user/attilio/vmcontention/sys/kern/link_elf.c user/attilio/vmcontention/sys/kern/link_elf_obj.c user/attilio/vmcontention/sys/kern/sched_ule.c user/attilio/vmcontention/sys/kern/subr_bus.c user/attilio/vmcontention/sys/kern/subr_trap.c user/attilio/vmcontention/sys/kern/sys_generic.c user/attilio/vmcontention/sys/kern/sys_process.c user/attilio/vmcontention/sys/kern/tty_ttydisc.c user/attilio/vmcontention/sys/kern/uipc_domain.c user/attilio/vmcontention/sys/kern/uipc_mqueue.c user/attilio/vmcontention/sys/kern/uipc_socket.c user/attilio/vmcontention/sys/kern/uipc_syscalls.c user/attilio/vmcontention/sys/kern/uipc_usrreq.c user/attilio/vmcontention/sys/kern/vfs_acl.c user/attilio/vmcontention/sys/kern/vfs_aio.c user/attilio/vmcontention/sys/kern/vfs_bio.c user/attilio/vmcontention/sys/kern/vfs_cache.c user/attilio/vmcontention/sys/kern/vfs_default.c user/attilio/vmcontention/sys/kern/vfs_extattr.c user/attilio/vmcontention/sys/kern/vfs_init.c user/attilio/vmcontention/sys/kern/vfs_lookup.c user/attilio/vmcontention/sys/kern/vfs_mount.c user/attilio/vmcontention/sys/kern/vfs_mountroot.c user/attilio/vmcontention/sys/kern/vfs_subr.c user/attilio/vmcontention/sys/kern/vfs_syscalls.c user/attilio/vmcontention/sys/kern/vfs_vnops.c user/attilio/vmcontention/sys/kern/vnode_if.src user/attilio/vmcontention/sys/mips/cavium/usb/octusb.c user/attilio/vmcontention/sys/mips/conf/RT305X user/attilio/vmcontention/sys/mips/include/cpufunc.h user/attilio/vmcontention/sys/mips/include/tlb.h user/attilio/vmcontention/sys/mips/mips/pmap.c user/attilio/vmcontention/sys/mips/mips/tlb.c user/attilio/vmcontention/sys/mips/rmi/rootfs_list.txt user/attilio/vmcontention/sys/mips/rmi/xlr_i2c.c user/attilio/vmcontention/sys/modules/3dfx/Makefile user/attilio/vmcontention/sys/modules/Makefile user/attilio/vmcontention/sys/modules/cmx/Makefile user/attilio/vmcontention/sys/modules/filemon/Makefile user/attilio/vmcontention/sys/modules/sdhci/Makefile user/attilio/vmcontention/sys/modules/virtio/Makefile user/attilio/vmcontention/sys/modules/zfs/Makefile user/attilio/vmcontention/sys/net/bpf.h user/attilio/vmcontention/sys/net/if.c user/attilio/vmcontention/sys/net/if.h user/attilio/vmcontention/sys/net/if_bridge.c user/attilio/vmcontention/sys/net/if_clone.c user/attilio/vmcontention/sys/net/if_clone.h user/attilio/vmcontention/sys/net/if_disc.c user/attilio/vmcontention/sys/net/if_edsc.c user/attilio/vmcontention/sys/net/if_ef.c user/attilio/vmcontention/sys/net/if_enc.c user/attilio/vmcontention/sys/net/if_epair.c user/attilio/vmcontention/sys/net/if_faith.c user/attilio/vmcontention/sys/net/if_gif.c user/attilio/vmcontention/sys/net/if_gre.c user/attilio/vmcontention/sys/net/if_lagg.c user/attilio/vmcontention/sys/net/if_loop.c user/attilio/vmcontention/sys/net/if_spppsubr.c user/attilio/vmcontention/sys/net/if_stf.c user/attilio/vmcontention/sys/net/if_tap.c user/attilio/vmcontention/sys/net/if_tun.c user/attilio/vmcontention/sys/net/if_var.h user/attilio/vmcontention/sys/net/if_vlan.c user/attilio/vmcontention/sys/net/netmap_user.h user/attilio/vmcontention/sys/net/pfil.c user/attilio/vmcontention/sys/net/pfil.h user/attilio/vmcontention/sys/net/rtsock.c user/attilio/vmcontention/sys/net80211/ieee80211_adhoc.c user/attilio/vmcontention/sys/net80211/ieee80211_freebsd.c user/attilio/vmcontention/sys/net80211/ieee80211_hostap.c user/attilio/vmcontention/sys/net80211/ieee80211_hostap.h user/attilio/vmcontention/sys/net80211/ieee80211_power.c user/attilio/vmcontention/sys/net80211/ieee80211_power.h user/attilio/vmcontention/sys/net80211/ieee80211_scan.c user/attilio/vmcontention/sys/net80211/ieee80211_sta.c user/attilio/vmcontention/sys/net80211/ieee80211_var.h user/attilio/vmcontention/sys/netgraph/atm/ccatm/ng_ccatm.c user/attilio/vmcontention/sys/netgraph/atm/sscfu/ng_sscfu.c user/attilio/vmcontention/sys/netgraph/atm/sscop/ng_sscop.c user/attilio/vmcontention/sys/netgraph/atm/uni/ng_uni.c user/attilio/vmcontention/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c user/attilio/vmcontention/sys/netgraph/netflow/netflow_v9.c user/attilio/vmcontention/sys/netgraph/netflow/ng_netflow.c user/attilio/vmcontention/sys/netgraph/netflow/ng_netflow.h user/attilio/vmcontention/sys/netgraph/ng_base.c user/attilio/vmcontention/sys/netgraph/ng_eiface.c user/attilio/vmcontention/sys/netgraph/ng_ether.c user/attilio/vmcontention/sys/netgraph/ng_fec.c user/attilio/vmcontention/sys/netgraph/ng_gif.c user/attilio/vmcontention/sys/netgraph/ng_ksocket.c user/attilio/vmcontention/sys/netgraph/ng_nat.c user/attilio/vmcontention/sys/netgraph/ng_source.c user/attilio/vmcontention/sys/netinet/in_pcb.c user/attilio/vmcontention/sys/netinet/in_pcb.h user/attilio/vmcontention/sys/netinet/in_rmx.c user/attilio/vmcontention/sys/netinet/in_var.h user/attilio/vmcontention/sys/netinet/ip_carp.c user/attilio/vmcontention/sys/netinet/ip_divert.c user/attilio/vmcontention/sys/netinet/ip_fastfwd.c user/attilio/vmcontention/sys/netinet/ip_icmp.c user/attilio/vmcontention/sys/netinet/ip_input.c user/attilio/vmcontention/sys/netinet/ip_ipsec.c user/attilio/vmcontention/sys/netinet/ip_mroute.c user/attilio/vmcontention/sys/netinet/ip_options.c user/attilio/vmcontention/sys/netinet/ip_options.h user/attilio/vmcontention/sys/netinet/ip_output.c user/attilio/vmcontention/sys/netinet/ip_var.h user/attilio/vmcontention/sys/netinet/libalias/alias_proxy.c user/attilio/vmcontention/sys/netinet/sctp_input.c user/attilio/vmcontention/sys/netinet/sctp_output.c user/attilio/vmcontention/sys/netinet/sctp_output.h user/attilio/vmcontention/sys/netinet/sctp_pcb.c user/attilio/vmcontention/sys/netinet/tcp_hostcache.c user/attilio/vmcontention/sys/netinet/tcp_input.c user/attilio/vmcontention/sys/netinet/tcp_usrreq.c user/attilio/vmcontention/sys/netinet/udp_usrreq.c user/attilio/vmcontention/sys/netinet6/in6.c user/attilio/vmcontention/sys/netinet6/in6_rmx.c user/attilio/vmcontention/sys/netinet6/ip6_ipsec.c user/attilio/vmcontention/sys/netinet6/nd6.c user/attilio/vmcontention/sys/netinet6/nd6_nbr.c user/attilio/vmcontention/sys/netinet6/nd6_rtr.c user/attilio/vmcontention/sys/netinet6/udp6_usrreq.c user/attilio/vmcontention/sys/netipsec/key.c user/attilio/vmcontention/sys/netpfil/ipfw/ip_dn_glue.c user/attilio/vmcontention/sys/netpfil/ipfw/ip_fw_log.c user/attilio/vmcontention/sys/netpfil/ipfw/ip_fw_nat.c user/attilio/vmcontention/sys/netpfil/ipfw/ip_fw_pfil.c user/attilio/vmcontention/sys/netpfil/pf/if_pflog.c user/attilio/vmcontention/sys/netpfil/pf/if_pfsync.c user/attilio/vmcontention/sys/netpfil/pf/pf.c user/attilio/vmcontention/sys/netpfil/pf/pf_ioctl.c user/attilio/vmcontention/sys/netpfil/pf/pf_table.c user/attilio/vmcontention/sys/nfs/nfs_nfssvc.c user/attilio/vmcontention/sys/nfs/nfssvc.h user/attilio/vmcontention/sys/nfsserver/nfs.h user/attilio/vmcontention/sys/nfsserver/nfs_serv.c user/attilio/vmcontention/sys/nfsserver/nfs_srvsubs.c user/attilio/vmcontention/sys/nlm/nlm_prot_impl.c user/attilio/vmcontention/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c user/attilio/vmcontention/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c user/attilio/vmcontention/sys/ofed/drivers/net/mlx4/en_netdev.c user/attilio/vmcontention/sys/ofed/drivers/net/mlx4/en_rx.c user/attilio/vmcontention/sys/ofed/drivers/net/mlx4/en_tx.c user/attilio/vmcontention/sys/ofed/include/rdma/ib_addr.h user/attilio/vmcontention/sys/pc98/include/bus.h user/attilio/vmcontention/sys/pc98/pc98/machdep.c user/attilio/vmcontention/sys/powerpc/aim/mmu_oea.c user/attilio/vmcontention/sys/powerpc/aim/mmu_oea64.c user/attilio/vmcontention/sys/powerpc/conf/NOTES user/attilio/vmcontention/sys/powerpc/include/cpu.h user/attilio/vmcontention/sys/powerpc/include/pcb.h user/attilio/vmcontention/sys/powerpc/ofw/ofw_real.c user/attilio/vmcontention/sys/powerpc/wii/platform_wii.c user/attilio/vmcontention/sys/powerpc/wii/wii_ipcreg.h user/attilio/vmcontention/sys/rpc/auth.h user/attilio/vmcontention/sys/rpc/rpcb_clnt.c user/attilio/vmcontention/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c user/attilio/vmcontention/sys/security/audit/audit_arg.c user/attilio/vmcontention/sys/security/audit/audit_syscalls.c user/attilio/vmcontention/sys/security/audit/audit_worker.c user/attilio/vmcontention/sys/security/mac/mac_process.c user/attilio/vmcontention/sys/security/mac/mac_syscalls.c user/attilio/vmcontention/sys/sparc64/include/atomic.h user/attilio/vmcontention/sys/sparc64/include/intr_machdep.h user/attilio/vmcontention/sys/sparc64/sparc64/interrupt.S user/attilio/vmcontention/sys/sparc64/sparc64/intr_machdep.c user/attilio/vmcontention/sys/sparc64/sparc64/machdep.c user/attilio/vmcontention/sys/sparc64/sparc64/pmap.c user/attilio/vmcontention/sys/sparc64/sparc64/tick.c user/attilio/vmcontention/sys/sys/buf.h user/attilio/vmcontention/sys/sys/buf_ring.h user/attilio/vmcontention/sys/sys/bufobj.h user/attilio/vmcontention/sys/sys/capability.h user/attilio/vmcontention/sys/sys/cdefs.h user/attilio/vmcontention/sys/sys/ipc.h user/attilio/vmcontention/sys/sys/kernel.h user/attilio/vmcontention/sys/sys/mount.h user/attilio/vmcontention/sys/sys/namei.h user/attilio/vmcontention/sys/sys/param.h user/attilio/vmcontention/sys/sys/pmc.h user/attilio/vmcontention/sys/sys/proc.h user/attilio/vmcontention/sys/sys/socketvar.h user/attilio/vmcontention/sys/sys/vnode.h user/attilio/vmcontention/sys/ufs/ffs/ffs_alloc.c user/attilio/vmcontention/sys/ufs/ffs/ffs_snapshot.c user/attilio/vmcontention/sys/ufs/ffs/ffs_softdep.c user/attilio/vmcontention/sys/ufs/ufs/inode.h user/attilio/vmcontention/sys/ufs/ufs/ufs_acl.c user/attilio/vmcontention/sys/ufs/ufs/ufs_lookup.c user/attilio/vmcontention/sys/ufs/ufs/ufs_quota.c user/attilio/vmcontention/sys/ufs/ufs/ufs_vnops.c user/attilio/vmcontention/sys/vm/uma_core.c user/attilio/vmcontention/sys/vm/vm_fault.c user/attilio/vmcontention/sys/vm/vm_mmap.c user/attilio/vmcontention/sys/vm/vm_object.c user/attilio/vmcontention/sys/vm/vm_page.c user/attilio/vmcontention/sys/vm/vm_page.h user/attilio/vmcontention/sys/vm/vm_pageout.c user/attilio/vmcontention/sys/vm/vnode_pager.c user/attilio/vmcontention/sys/x86/bios/smbios.c user/attilio/vmcontention/sys/x86/include/bus.h user/attilio/vmcontention/sys/x86/x86/intr_machdep.c user/attilio/vmcontention/sys/xen/interface/foreign/mkheader.py user/attilio/vmcontention/tools/build/make_check/Makefile user/attilio/vmcontention/tools/build/mk/OptionalObsoleteFiles.inc user/attilio/vmcontention/tools/regression/lib/libc/nss/test-gethostby.c user/attilio/vmcontention/tools/regression/netinet/ip_id_period/ip_id_period.py user/attilio/vmcontention/tools/regression/sockets/unix_cmsg/unix_cmsg.c user/attilio/vmcontention/tools/test/hwpmc/pmctest.py user/attilio/vmcontention/tools/tools/cxgbetool/cxgbetool.c user/attilio/vmcontention/tools/tools/netmap/pcap.c user/attilio/vmcontention/tools/tools/sysdoc/Makefile user/attilio/vmcontention/usr.bin/Makefile user/attilio/vmcontention/usr.bin/Makefile.amd64 user/attilio/vmcontention/usr.bin/Makefile.i386 user/attilio/vmcontention/usr.bin/Makefile.ia64 user/attilio/vmcontention/usr.bin/Makefile.powerpc user/attilio/vmcontention/usr.bin/Makefile.sparc64 user/attilio/vmcontention/usr.bin/ar/ar.h user/attilio/vmcontention/usr.bin/at/parsetime.c user/attilio/vmcontention/usr.bin/at/privs.h user/attilio/vmcontention/usr.bin/calendar/calendar.1 user/attilio/vmcontention/usr.bin/calendar/calendar.c user/attilio/vmcontention/usr.bin/calendar/dates.c user/attilio/vmcontention/usr.bin/calendar/day.c user/attilio/vmcontention/usr.bin/calendar/io.c user/attilio/vmcontention/usr.bin/chat/chat.c user/attilio/vmcontention/usr.bin/cksum/extern.h user/attilio/vmcontention/usr.bin/csup/lister.c user/attilio/vmcontention/usr.bin/csup/proto.c user/attilio/vmcontention/usr.bin/ctlstat/ctlstat.c user/attilio/vmcontention/usr.bin/elfdump/elfdump.c user/attilio/vmcontention/usr.bin/fetch/fetch.c user/attilio/vmcontention/usr.bin/find/ls.c user/attilio/vmcontention/usr.bin/find/main.c user/attilio/vmcontention/usr.bin/finger/finger.c user/attilio/vmcontention/usr.bin/gencat/gencat.c user/attilio/vmcontention/usr.bin/getent/getent.c user/attilio/vmcontention/usr.bin/grep/grep.c user/attilio/vmcontention/usr.bin/grep/regex/xmalloc.c user/attilio/vmcontention/usr.bin/gzip/zuncompress.c user/attilio/vmcontention/usr.bin/kdump/kdump.c user/attilio/vmcontention/usr.bin/kdump/mksubr user/attilio/vmcontention/usr.bin/lock/lock.c user/attilio/vmcontention/usr.bin/logger/logger.c user/attilio/vmcontention/usr.bin/m4/Makefile user/attilio/vmcontention/usr.bin/m4/expr.c user/attilio/vmcontention/usr.bin/m4/extern.h user/attilio/vmcontention/usr.bin/m4/gnum4.c user/attilio/vmcontention/usr.bin/m4/lib/ohash_init.3 user/attilio/vmcontention/usr.bin/m4/m4.1 user/attilio/vmcontention/usr.bin/m4/main.c user/attilio/vmcontention/usr.bin/m4/parser.y user/attilio/vmcontention/usr.bin/make/var.c user/attilio/vmcontention/usr.bin/mktemp/mktemp.1 user/attilio/vmcontention/usr.bin/mktemp/mktemp.c user/attilio/vmcontention/usr.bin/msgs/msgs.c user/attilio/vmcontention/usr.bin/ncal/ncal.c user/attilio/vmcontention/usr.bin/netstat/route.c user/attilio/vmcontention/usr.bin/procstat/procstat.1 user/attilio/vmcontention/usr.bin/rlogin/rlogin.c user/attilio/vmcontention/usr.bin/rpcgen/rpc_main.c user/attilio/vmcontention/usr.bin/rpcgen/rpc_svcout.c user/attilio/vmcontention/usr.bin/rpcgen/rpc_util.c user/attilio/vmcontention/usr.bin/script/script.1 user/attilio/vmcontention/usr.bin/sort/Makefile user/attilio/vmcontention/usr.bin/sort/sort.c user/attilio/vmcontention/usr.bin/stat/stat.c user/attilio/vmcontention/usr.bin/tftp/main.c user/attilio/vmcontention/usr.bin/top/machine.c user/attilio/vmcontention/usr.bin/tset/extern.h user/attilio/vmcontention/usr.bin/tset/map.c user/attilio/vmcontention/usr.bin/tset/term.c user/attilio/vmcontention/usr.bin/unzip/unzip.1 user/attilio/vmcontention/usr.bin/w/w.c user/attilio/vmcontention/usr.bin/wall/wall.c user/attilio/vmcontention/usr.bin/who/who.1 user/attilio/vmcontention/usr.sbin/Makefile user/attilio/vmcontention/usr.sbin/Makefile.amd64 user/attilio/vmcontention/usr.sbin/Makefile.i386 user/attilio/vmcontention/usr.sbin/Makefile.ia64 user/attilio/vmcontention/usr.sbin/Makefile.powerpc user/attilio/vmcontention/usr.sbin/Makefile.sparc64 user/attilio/vmcontention/usr.sbin/acpi/acpidump/acpi.c user/attilio/vmcontention/usr.sbin/acpi/acpidump/acpi_user.c user/attilio/vmcontention/usr.sbin/bluetooth/btpand/client.c user/attilio/vmcontention/usr.sbin/bluetooth/btpand/server.c user/attilio/vmcontention/usr.sbin/bsdconfig/bsdconfig user/attilio/vmcontention/usr.sbin/bsdconfig/bsdconfig.8 user/attilio/vmcontention/usr.sbin/bsdconfig/console/ttys user/attilio/vmcontention/usr.sbin/bsdconfig/dot/dot user/attilio/vmcontention/usr.sbin/bsdconfig/include/Makefile user/attilio/vmcontention/usr.sbin/bsdconfig/include/messages.subr user/attilio/vmcontention/usr.sbin/bsdconfig/mouse/enable user/attilio/vmcontention/usr.sbin/bsdconfig/networking/devices user/attilio/vmcontention/usr.sbin/bsdconfig/networking/share/device.subr user/attilio/vmcontention/usr.sbin/bsdconfig/networking/share/ipaddr.subr user/attilio/vmcontention/usr.sbin/bsdconfig/networking/share/media.subr user/attilio/vmcontention/usr.sbin/bsdconfig/networking/share/netmask.subr user/attilio/vmcontention/usr.sbin/bsdconfig/networking/share/resolv.subr user/attilio/vmcontention/usr.sbin/bsdconfig/networking/share/routing.subr user/attilio/vmcontention/usr.sbin/bsdconfig/security/include/Makefile user/attilio/vmcontention/usr.sbin/bsdconfig/security/kern_securelevel user/attilio/vmcontention/usr.sbin/bsdconfig/share/common.subr user/attilio/vmcontention/usr.sbin/bsdconfig/share/dialog.subr user/attilio/vmcontention/usr.sbin/bsdconfig/share/mustberoot.subr user/attilio/vmcontention/usr.sbin/bsdconfig/share/strings.subr user/attilio/vmcontention/usr.sbin/bsdconfig/share/sysrc.subr user/attilio/vmcontention/usr.sbin/bsdconfig/startup/rcadd user/attilio/vmcontention/usr.sbin/bsdconfig/startup/rcconf user/attilio/vmcontention/usr.sbin/bsdconfig/startup/rcdelete user/attilio/vmcontention/usr.sbin/bsdconfig/startup/rcvar user/attilio/vmcontention/usr.sbin/bsdconfig/startup/share/rcconf.subr user/attilio/vmcontention/usr.sbin/bsdconfig/timezone/share/zones.subr user/attilio/vmcontention/usr.sbin/bsdconfig/usermgmt/share/user_input.subr user/attilio/vmcontention/usr.sbin/bsdinstall/bsdinstall user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/auto user/attilio/vmcontention/usr.sbin/chroot/chroot.8 user/attilio/vmcontention/usr.sbin/config/mkmakefile.c user/attilio/vmcontention/usr.sbin/cpucontrol/cpucontrol.c user/attilio/vmcontention/usr.sbin/cron/cron/cron.c user/attilio/vmcontention/usr.sbin/cron/lib/misc.c user/attilio/vmcontention/usr.sbin/crunch/examples/Makefile user/attilio/vmcontention/usr.sbin/crunch/examples/really-big.conf user/attilio/vmcontention/usr.sbin/ctladm/ctladm.c user/attilio/vmcontention/usr.sbin/ctladm/util.c user/attilio/vmcontention/usr.sbin/diskinfo/diskinfo.c user/attilio/vmcontention/usr.sbin/edquota/edquota.c user/attilio/vmcontention/usr.sbin/fifolog/fifolog_create/fifolog.1 user/attilio/vmcontention/usr.sbin/gpioctl/gpioctl.c user/attilio/vmcontention/usr.sbin/ip6addrctl/Makefile user/attilio/vmcontention/usr.sbin/ip6addrctl/ip6addrctl.c user/attilio/vmcontention/usr.sbin/jail/config.c user/attilio/vmcontention/usr.sbin/kgmon/kgmon.c user/attilio/vmcontention/usr.sbin/lpr/common_source/common.c user/attilio/vmcontention/usr.sbin/lpr/common_source/displayq.c user/attilio/vmcontention/usr.sbin/lpr/common_source/lp.h user/attilio/vmcontention/usr.sbin/lpr/common_source/net.c user/attilio/vmcontention/usr.sbin/lpr/common_source/rmjob.c user/attilio/vmcontention/usr.sbin/lpr/common_source/startdaemon.c user/attilio/vmcontention/usr.sbin/lpr/lpc/cmds.c user/attilio/vmcontention/usr.sbin/lpr/lpc/lpc.c user/attilio/vmcontention/usr.sbin/lpr/lpc/movejobs.c user/attilio/vmcontention/usr.sbin/lpr/lpd/printjob.c user/attilio/vmcontention/usr.sbin/lpr/lpq/lpq.c user/attilio/vmcontention/usr.sbin/lpr/lpr/lpr.c user/attilio/vmcontention/usr.sbin/lpr/lprm/lprm.c user/attilio/vmcontention/usr.sbin/makefs/ffs/ffs_alloc.c user/attilio/vmcontention/usr.sbin/memcontrol/memcontrol.c user/attilio/vmcontention/usr.sbin/mergemaster/mergemaster.sh user/attilio/vmcontention/usr.sbin/mfiutil/mfi_flash.c user/attilio/vmcontention/usr.sbin/mfiutil/mfi_show.c user/attilio/vmcontention/usr.sbin/mfiutil/mfiutil.c user/attilio/vmcontention/usr.sbin/mfiutil/mfiutil.h user/attilio/vmcontention/usr.sbin/mountd/exports.5 user/attilio/vmcontention/usr.sbin/mountd/mountd.8 user/attilio/vmcontention/usr.sbin/mountd/mountd.c user/attilio/vmcontention/usr.sbin/moused/moused.c user/attilio/vmcontention/usr.sbin/mtree/mtree.c user/attilio/vmcontention/usr.sbin/newsyslog/newsyslog.c user/attilio/vmcontention/usr.sbin/nfscbd/nfscbd.c user/attilio/vmcontention/usr.sbin/nfsd/nfsd.c user/attilio/vmcontention/usr.sbin/pciconf/cap.c user/attilio/vmcontention/usr.sbin/pkg/elf_tables.h user/attilio/vmcontention/usr.sbin/pkg_install/add/main.c user/attilio/vmcontention/usr.sbin/pkg_install/create/main.c user/attilio/vmcontention/usr.sbin/pkg_install/delete/main.c user/attilio/vmcontention/usr.sbin/pkg_install/info/main.c user/attilio/vmcontention/usr.sbin/pkg_install/lib/Makefile user/attilio/vmcontention/usr.sbin/pkg_install/lib/exec.c user/attilio/vmcontention/usr.sbin/pkg_install/lib/lib.h user/attilio/vmcontention/usr.sbin/pkg_install/updating/main.c user/attilio/vmcontention/usr.sbin/pkg_install/version/main.c user/attilio/vmcontention/usr.sbin/pkg_install/version/perform.c user/attilio/vmcontention/usr.sbin/pmccontrol/pmccontrol.c user/attilio/vmcontention/usr.sbin/pmcstat/pmcpl_calltree.c user/attilio/vmcontention/usr.sbin/pmcstat/pmcstat.c user/attilio/vmcontention/usr.sbin/pmcstat/pmcstat_log.c user/attilio/vmcontention/usr.sbin/pmcstat/pmcstat_log.h user/attilio/vmcontention/usr.sbin/portsnap/portsnap/portsnap.8 user/attilio/vmcontention/usr.sbin/ppp/lqr.c user/attilio/vmcontention/usr.sbin/ppp/radius.c user/attilio/vmcontention/usr.sbin/pw/pw_user.c user/attilio/vmcontention/usr.sbin/pw/pwupd.c user/attilio/vmcontention/usr.sbin/quot/quot.c user/attilio/vmcontention/usr.sbin/quotaon/quotaon.c user/attilio/vmcontention/usr.sbin/repquota/repquota.c user/attilio/vmcontention/usr.sbin/rtprio/rtprio.1 user/attilio/vmcontention/usr.sbin/services_mkdb/Makefile user/attilio/vmcontention/usr.sbin/services_mkdb/services_mkdb.c user/attilio/vmcontention/usr.sbin/services_mkdb/uniq.c user/attilio/vmcontention/usr.sbin/snapinfo/snapinfo.c user/attilio/vmcontention/usr.sbin/syslogd/syslogd.c user/attilio/vmcontention/usr.sbin/tcpdump/tcpdump/Makefile user/attilio/vmcontention/usr.sbin/tcpdump/tcpdump/tcpdump.1 user/attilio/vmcontention/usr.sbin/vidcontrol/vidcontrol.c Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/ (props changed) user/attilio/vmcontention/contrib/bind9/ (props changed) user/attilio/vmcontention/contrib/dialog/ (props changed) user/attilio/vmcontention/contrib/groff/ (props changed) user/attilio/vmcontention/contrib/libc++/ (props changed) user/attilio/vmcontention/contrib/libpcap/ (props changed) user/attilio/vmcontention/contrib/llvm/ (props changed) user/attilio/vmcontention/contrib/llvm/tools/clang/ (props changed) user/attilio/vmcontention/contrib/netcat/ (props changed) user/attilio/vmcontention/contrib/tcpdump/ (props changed) user/attilio/vmcontention/contrib/tzdata/ (props changed) user/attilio/vmcontention/gnu/lib/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/sbin/ (props changed) user/attilio/vmcontention/sbin/ipfw/ (props changed) user/attilio/vmcontention/share/man/man4/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/boot/ (props changed) user/attilio/vmcontention/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/sys/conf/ (props changed) user/attilio/vmcontention/usr.bin/calendar/ (props changed) user/attilio/vmcontention/usr.bin/csup/ (props changed) user/attilio/vmcontention/usr.bin/procstat/ (props changed) user/attilio/vmcontention/usr.sbin/jail/ (props changed) Modified: user/attilio/vmcontention/MAINTAINERS ============================================================================== --- user/attilio/vmcontention/MAINTAINERS Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/MAINTAINERS Mon Oct 22 21:26:36 2012 (r241915) @@ -21,7 +21,6 @@ It is not a registry of 'turf' or privat subsystem login notes ----------------------------- kqueue jmg Pre-commit review requested. -mergemaster dougb Prefers to pre-approve commits libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. UFS EAs rwatson Pre-commit review requested. @@ -75,8 +74,6 @@ drm rnoland Just keep me informed of ch unifdef(1) fanf Pre-commit review requested. ntp roberto Pre-commit review requested. inetd dwmalone Recommends pre-commit review. -nwfs bp In case of functional changes pre-commit review - requested. contrib/smbfs bp Open for in-tree committs. In case of functional changes pre-commit review requested. contrib/pf mlaier Pre-commit review requested. @@ -101,8 +98,6 @@ nfs alfred Will be happy to review code rpc.lockd alfred Will be happy to review code, but not mandatory. truss alfred Will be happy to review code, but not mandatory. rpc alfred Pre-commit review requested. -xfs kan@FreeBSD.org,rodrigc@FreeBSD.org,cattelan@xfs.org - Pre-commit review preferred. pkg_install portmgr Pre-commit review or approval from portmgr@ requested. linux emul emulation Please discuss changes here. bs{diff,patch} cperciva Pre-commit review requested. @@ -125,16 +120,7 @@ lib/libc/stdtime edwin Heads-up apprec is maintained by a third party source. sbin/routed bms Pre-commit review; notify vendor at rhyolite.com isci(4) jimharris Pre-commit review requested. - -Following are the entries from the Makefiles, and a few other sources. -Please remove stale entries from both their origin, and this file. - -Please also consider removing the lines from the files listed below and -stating your preferences here instead. - -List below generated with: -$ cd /usr/src; find */* -type f|xargs egrep 'MAINTAINER[ ]*=' - -sys/modules/3dfx/Makefile:MAINTAINER= cokane@FreeBSD.org -sys/modules/urio/Makefile:MAINTAINER= Iwasa Kazmi -tools/tools/sysdoc/Makefile:MAINTAINER= trhodes@FreeBSD.org +3dfx cokane Pre-commit review preferred. +cmx daniel@roe.ch Pre-commit review preferred. +filemon obrien Pre-commit review preferred. +sysdoc trhodes Pre-commit review preferred. Modified: user/attilio/vmcontention/Makefile ============================================================================== --- user/attilio/vmcontention/Makefile Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/Makefile Mon Oct 22 21:26:36 2012 (r241915) @@ -280,12 +280,14 @@ kernel: buildkernel installkernel # for building the world. # upgrade_checks: +.if !defined(.PARSEDIR) @if ! (cd ${.CURDIR}/tools/build/make_check && \ PATH=${PATH} ${BINMAKE} obj >/dev/null 2>&1 && \ PATH=${PATH} ${BINMAKE} >/dev/null 2>&1); \ then \ (cd ${.CURDIR} && ${MAKE} make); \ fi +.endif # # Upgrade make(1) to the current version using the installed Modified: user/attilio/vmcontention/Makefile.inc1 ============================================================================== --- user/attilio/vmcontention/Makefile.inc1 Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/Makefile.inc1 Mon Oct 22 21:26:36 2012 (r241915) @@ -16,6 +16,8 @@ # -DNO_CTF do not run the DTrace CTF conversion tools on built objects # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list # LOCAL_LIB_DIRS="list of dirs" to add additional dirs to libraries target +# LOCAL_MTREE="list of mtree files" to process to allow local directories +# to be created before files are installed # LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools # list # TARGET="machine" to crossbuild world for a different machine type @@ -295,9 +297,10 @@ LIB32CPUFLAGS= -march=i686 -mmmx -msse - LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ - MACHINE_CPU="i686 mmx sse sse2" \ - LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ - AS="${AS} --32" + MACHINE_CPU="i686 mmx sse sse2" +LIB32WMAKEFLAGS= \ + AS="${AS} --32" \ + LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" .elif ${TARGET_ARCH} == "powerpc64" .if empty(TARGET_CPUTYPE) @@ -305,7 +308,8 @@ LIB32CPUFLAGS= -mcpu=powerpc .else LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE} .endif -LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc \ +LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc +LIB32WMAKEFLAGS= \ LD="${LD} -m elf32ppc_fbsd" .endif @@ -322,16 +326,20 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} \ - CC="${CC} ${LIB32FLAGS}" \ - CXX="${CXX} ${LIB32FLAGS}" \ LIBDIR=/usr/lib32 \ SHLIBDIR=/usr/lib32 \ COMPILER_TYPE=${WMAKE_COMPILER_TYPE} +LIB32WMAKEFLAGS+= \ + CC="${CC} ${LIB32FLAGS}" \ + CXX="${CXX} ${LIB32FLAGS}" \ + DESTDIR=${LIB32TMP} \ + -DCOMPAT_32BIT \ + -DNO_CPU_CFLAGS \ + -DNO_CTF \ + -DNO_LINT -LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ - -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ - -DWITHOUT_HTML -DNO_CTF -DNO_LINT -ECC -ECXX -EAS -ELD \ - DESTDIR=${LIB32TMP} +LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \ + -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS .endif @@ -401,6 +409,9 @@ _worldtmp: mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \ -p ${WORLDTMP}/usr/include >/dev/null .endif +.for _mtree in ${LOCAL_MTREE} + mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null +.endfor _legacy: @echo @echo "--------------------------------------------------------------" @@ -718,7 +729,8 @@ reinstall: @echo "--------------------------------------------------------------" @echo ">>> Making hierarchy" @echo "--------------------------------------------------------------" - ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 hierarchy + ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 \ + LOCAL_MTREE=${LOCAL_MTREE} hierarchy @echo @echo "--------------------------------------------------------------" @echo ">>> Installing everything" @@ -1215,6 +1227,10 @@ cross-tools: # hierarchy hier: cd ${.CURDIR}/etc; ${MAKE} distrib-dirs +.for _mtree in ${LOCAL_MTREE} + mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/${_mtree} \ + -p ${DESTDIR}/ +.endfor # # libraries - build all libraries, and install them under ${DESTDIR}. @@ -1269,6 +1285,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \ ${_kerberos5_lib_libroken} \ ${_kerberos5_lib_libwind} \ + ${_lib_atf_libatf_c} \ lib/libbz2 ${_libcom_err} lib/libcrypt \ lib/libexpat \ ${_lib_libgssapi} ${_lib_libipx} \ @@ -1281,6 +1298,10 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_secure_lib_libcrypto} ${_secure_lib_libssh} \ ${_secure_lib_libssl} +.if ${MK_ATF} != "no" +_lib_atf_libatf_c= lib/atf/libatf-c +.endif + .if ${MK_LIBTHR} != "no" _lib_libthr= lib/libthr .endif @@ -1563,7 +1584,7 @@ check-old: check-old-files check-old-lib # showconfig - show build configuration. # showconfig: - @${MAKE} -n -f bsd.own.mk -V dummy -dg1 | grep ^MK_ | sort + @${MAKE} -n -f bsd.own.mk -V dummy -dg1 2>&1 | grep ^MK_ | sort .if !empty(KRNLOBJDIR) && !empty(KERNCONF) DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/ Modified: user/attilio/vmcontention/ObsoleteFiles.inc ============================================================================== --- user/attilio/vmcontention/ObsoleteFiles.inc Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/ObsoleteFiles.inc Mon Oct 22 21:26:36 2012 (r241915) @@ -38,6 +38,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20121022: VFS_LOCK_GIANT elimination +OLD_FILES+=usr/share/man/man9/VFS_LOCK_GIANT.9.gz +# 20121004: remove incomplete unwind.h +OLD_FILES+=usr/include/clang/3.2/unwind.h # 20120908: pf cleanup OLD_FILES+=usr/include/net/if_pflow.h # 20120816: new clang import which bumps version from 3.1 to 3.2 Modified: user/attilio/vmcontention/UPDATING ============================================================================== --- user/attilio/vmcontention/UPDATING Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/UPDATING Mon Oct 22 21:26:36 2012 (r241915) @@ -24,6 +24,56 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20121022: + Support for non-MPSAFE filesystems was removed from VFS. The + VFS_VERSION was bumped, all filesystem modules shall be + recompiled. + +20121018: + All the non-MPSAFE filesystems have been disconnected from + the build. The full list includes: codafs, hpfs, ntfs, nwfs, + portalfs, smbfs, xfs. + +20121016: + The interface cloning API and ABI has changed. The following + modules need to be recompiled together with kernel: + ipfw(4), pfsync(4), pflog(4), usb(4), wlan(4), stf(4), + vlan(4), disc(4), edsc(4), if_bridge(4), gif(4), tap(4), + faith(4), epair(4), enc(4), tun(4), if_lagg(4), gre(4). + +20121015: + The sdhci driver was split in two parts: sdhci (generic SD Host + Controller logic) and sdhci_pci (actual hardware driver). + No kernel config modifications are required, but if you + load sdhc as a module you must switch to sdhci_pci instead. + +20121014: + Import the FUSE kernel and userland support into base system. + +20121013: + The GNU sort(1) program has been removed since the BSD-licensed + sort(1) has been the default for quite some time and no serious + problems have been reported. The corresponding WITH_GNU_SORT + knob has also gone. + +20121006: + The pfil(9) API/ABI for AF_INET family has been changed. Packet + filtering modules: pf(4), ipfw(4), ipfilter(4) need to be recompiled + with new kernel. + +20121001: + The net80211(4) ABI has been changed to allow for improved driver + PS-POLL and power-save support. All wireless drivers need to be + recompiled to work with the new kernel. + +20120913: + The random(4) support for the VIA hardware random number + generator (`PADLOCK') is no longer enabled unconditionally. + Add the PADLOCK_RNG option in the custom kernel config if + needed. The GENERIC kernels on i386 and amd64 do include the + option, so the change only affects the custom kernel + configurations. + 20120908: The pf(4) packet filter ABI has been changed. pfctl(8) and snmp_pf module need to be recompiled to work with new kernel. Modified: user/attilio/vmcontention/bin/date/extern.h ============================================================================== --- user/attilio/vmcontention/bin/date/extern.h Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/date/extern.h Mon Oct 22 21:26:36 2012 (r241915) @@ -30,4 +30,6 @@ * $FreeBSD$ */ +extern int retval; + int netsettime(time_t); Modified: user/attilio/vmcontention/bin/date/netdate.c ============================================================================== --- user/attilio/vmcontention/bin/date/netdate.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/date/netdate.c Mon Oct 22 21:26:36 2012 (r241915) @@ -55,8 +55,6 @@ __FBSDID("$FreeBSD$"); #define WAITACK 2 /* seconds */ #define WAITDATEACK 5 /* seconds */ -extern int retval; - /* * Set the date in the machines controlled by timedaemons by communicating the * new date to the local timedaemon. If the timedaemon is in the master state, Modified: user/attilio/vmcontention/bin/dd/conv_tab.c ============================================================================== --- user/attilio/vmcontention/bin/dd/conv_tab.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/dd/conv_tab.c Mon Oct 22 21:26:36 2012 (r241915) @@ -41,6 +41,11 @@ __FBSDID("$FreeBSD$"); #include +#include + +#include "dd.h" +#include "extern.h" + /* * There are currently six tables: * Modified: user/attilio/vmcontention/bin/ed/buf.c ============================================================================== --- user/attilio/vmcontention/bin/ed/buf.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/ed/buf.c Mon Oct 22 21:26:36 2012 (r241915) @@ -35,10 +35,10 @@ __FBSDID("$FreeBSD$"); #include "ed.h" -FILE *sfp; /* scratch file pointer */ -off_t sfseek; /* scratch file position */ -int seek_write; /* seek before writing */ -line_t buffer_head; /* incore buffer */ +static FILE *sfp; /* scratch file pointer */ +static off_t sfseek; /* scratch file position */ +static int seek_write; /* seek before writing */ +static line_t buffer_head; /* incore buffer */ /* get_sbuf_line: get a line of text from the scratch file; return pointer to the text */ @@ -185,10 +185,7 @@ get_addressed_line_node(long n) return lp; } - -extern int newline_added; - -char sfn[15] = ""; /* scratch file name */ +static char sfn[15] = ""; /* scratch file name */ /* open_sbuf: open scratch file */ int @@ -244,7 +241,7 @@ quit(int n) } -unsigned char ctab[256]; /* character translation table */ +static unsigned char ctab[256]; /* character translation table */ /* init_buffers: open scratch buffer; initialize line queue */ void Modified: user/attilio/vmcontention/bin/ed/cbc.c ============================================================================== --- user/attilio/vmcontention/bin/ed/cbc.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/ed/cbc.c Mon Oct 22 21:26:36 2012 (r241915) @@ -68,28 +68,24 @@ __FBSDID("$FreeBSD$"); * global variables and related macros */ -enum { /* encrypt, decrypt, authenticate */ - MODE_ENCRYPT, MODE_DECRYPT, MODE_AUTHENTICATE -} mode = MODE_ENCRYPT; - #ifdef DES -DES_cblock ivec; /* initialization vector */ -DES_cblock pvec; /* padding vector */ +static DES_cblock ivec; /* initialization vector */ +static DES_cblock pvec; /* padding vector */ #endif -char bits[] = { /* used to extract bits from a char */ +static char bits[] = { /* used to extract bits from a char */ '\200', '\100', '\040', '\020', '\010', '\004', '\002', '\001' }; -int pflag; /* 1 to preserve parity bits */ +static int pflag; /* 1 to preserve parity bits */ #ifdef DES -DES_key_schedule schedule; /* expanded DES key */ +static DES_key_schedule schedule; /* expanded DES key */ #endif -unsigned char des_buf[8]; /* shared buffer for get_des_char/put_des_char */ -int des_ct = 0; /* count for get_des_char/put_des_char */ -int des_n = 0; /* index for put_des_char/get_des_char */ +static unsigned char des_buf[8];/* shared buffer for get_des_char/put_des_char */ +static int des_ct = 0; /* count for get_des_char/put_des_char */ +static int des_n = 0; /* index for put_des_char/get_des_char */ /* init_des_cipher: initialize DES */ void Modified: user/attilio/vmcontention/bin/ed/ed.h ============================================================================== --- user/attilio/vmcontention/bin/ed/ed.h Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/ed/ed.h Mon Oct 22 21:26:36 2012 (r241915) @@ -277,3 +277,9 @@ extern int lineno; extern long second_addr; extern long u_addr_last; extern long u_current_addr; +extern long rows; +extern int cols; +extern int newline_added; +extern int des; +extern int scripted; +extern int patlock; Modified: user/attilio/vmcontention/bin/ed/glbl.c ============================================================================== --- user/attilio/vmcontention/bin/ed/glbl.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/ed/glbl.c Mon Oct 22 21:26:36 2012 (r241915) @@ -135,11 +135,11 @@ exec_global(int interact, int gflag) } -line_t **active_list; /* list of lines active in a global command */ -long active_last; /* index of last active line in active_list */ -long active_size; /* size of active_list */ -long active_ptr; /* active_list index (non-decreasing) */ -long active_ndx; /* active_list index (modulo active_last) */ +static line_t **active_list; /* list of lines active in a global command */ +static long active_last; /* index of last active line in active_list */ +static long active_size; /* size of active_list */ +static long active_ptr; /* active_list index (non-decreasing) */ +static long active_ndx; /* active_list index (modulo active_last) */ /* set_active_node: add a line node to the global-active list */ int Modified: user/attilio/vmcontention/bin/ed/io.c ============================================================================== --- user/attilio/vmcontention/bin/ed/io.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/ed/io.c Mon Oct 22 21:26:36 2012 (r241915) @@ -30,9 +30,6 @@ __FBSDID("$FreeBSD$"); #include "ed.h" - -extern int scripted; - /* read_file: read a named file/pipe into the buffer; return line count */ long read_file(char *fn, long n) @@ -58,11 +55,8 @@ read_file(char *fn, long n) return current_addr - n; } - -extern int des; - -char *sbuf; /* file i/o buffer */ -int sbufsz; /* file i/o buffer size */ +static char *sbuf; /* file i/o buffer */ +static int sbufsz; /* file i/o buffer size */ int newline_added; /* if set, newline appended to input file */ /* read_stream: read a stream into the editor buffer; return status */ @@ -298,9 +292,6 @@ get_tty_line(void) #define ESCAPES "\a\b\f\n\r\t\v\\" #define ESCCHARS "abfnrtv\\" -extern int rows; -extern int cols; - /* put_tty_line: print text to stdout */ int put_tty_line(const char *s, int l, long n, int gflag) Modified: user/attilio/vmcontention/bin/ed/main.c ============================================================================== --- user/attilio/vmcontention/bin/ed/main.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/ed/main.c Mon Oct 22 21:26:36 2012 (r241915) @@ -66,40 +66,40 @@ __FBSDID("$FreeBSD$"); #ifdef _POSIX_SOURCE -sigjmp_buf env; +static sigjmp_buf env; #else -jmp_buf env; +static jmp_buf env; #endif /* static buffers */ char stdinbuf[1]; /* stdin buffer */ -char *shcmd; /* shell command buffer */ -int shcmdsz; /* shell command buffer size */ -int shcmdi; /* shell command buffer index */ +static char *shcmd; /* shell command buffer */ +static int shcmdsz; /* shell command buffer size */ +static int shcmdi; /* shell command buffer index */ char *ibuf; /* ed command-line buffer */ int ibufsz; /* ed command-line buffer size */ char *ibufp; /* pointer to ed command-line buffer */ /* global flags */ int des = 0; /* if set, use crypt(3) for i/o */ -int garrulous = 0; /* if set, print all error messages */ +static int garrulous = 0; /* if set, print all error messages */ int isbinary; /* if set, buffer contains ASCII NULs */ int isglobal; /* if set, doing a global command */ int modified; /* if set, buffer modified since last write */ int mutex = 0; /* if set, signals set "sigflags" */ -int red = 0; /* if set, restrict shell/directory access */ +static int red = 0; /* if set, restrict shell/directory access */ int scripted = 0; /* if set, suppress diagnostics */ int sigflags = 0; /* if set, signals received while mutex set */ -int sigactive = 0; /* if set, signal handlers are enabled */ +static int sigactive = 0; /* if set, signal handlers are enabled */ -char old_filename[PATH_MAX] = ""; /* default filename */ +static char old_filename[PATH_MAX] = ""; /* default filename */ long current_addr; /* current address in editor buffer */ long addr_last; /* last address in editor buffer */ int lineno; /* script line number */ -const char *prompt; /* command-line prompt */ -const char *dps = "*"; /* default command-line prompt */ +static const char *prompt; /* command-line prompt */ +static const char *dps = "*"; /* default command-line prompt */ -const char usage[] = "usage: %s [-] [-sx] [-p string] [file]\n"; +static const char *usage = "usage: %s [-] [-sx] [-p string] [file]\n"; /* ed: line editor */ int @@ -254,7 +254,8 @@ top: /*NOTREACHED*/ } -long first_addr, second_addr, addr_cnt; +long first_addr, second_addr; +static long addr_cnt; /* extract_addr_range: get line addresses from the command buffer until an illegal address is seen; return status */ @@ -1241,8 +1242,8 @@ display_lines(long from, long to, int gf #define MAXMARK 26 /* max number of marks */ -line_t *mark[MAXMARK]; /* line markers */ -int markno; /* line marker count */ +static line_t *mark[MAXMARK]; /* line markers */ +static int markno; /* line marker count */ /* mark_line_node: set a line node mark */ int Modified: user/attilio/vmcontention/bin/ed/re.c ============================================================================== --- user/attilio/vmcontention/bin/ed/re.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/ed/re.c Mon Oct 22 21:26:36 2012 (r241915) @@ -31,9 +31,6 @@ __FBSDID("$FreeBSD$"); #include "ed.h" - -extern int patlock; - const char *errmsg = ""; /* get_compiled_pattern: return pointer to compiled pattern from command Modified: user/attilio/vmcontention/bin/ed/sub.c ============================================================================== --- user/attilio/vmcontention/bin/ed/sub.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/ed/sub.c Mon Oct 22 21:26:36 2012 (r241915) @@ -32,9 +32,9 @@ __FBSDID("$FreeBSD$"); #include "ed.h" -char *rhbuf; /* rhs substitution buffer */ -int rhbufsz; /* rhs substitution buffer size */ -int rhbufi; /* rhs substitution buffer index */ +static char *rhbuf; /* rhs substitution buffer */ +static int rhbufsz; /* rhs substitution buffer size */ +static int rhbufi; /* rhs substitution buffer index */ /* extract_subst_tail: extract substitution tail from the command buffer */ int @@ -105,8 +105,8 @@ extract_subst_template(void) } -char *rbuf; /* substitute_matching_text buffer */ -int rbufsz; /* substitute_matching_text buffer size */ +static char *rbuf; /* substitute_matching_text buffer */ +static int rbufsz; /* substitute_matching_text buffer size */ /* search_and_replace: for each line in a range, change text matching a pattern according to a substitution template; return status */ Modified: user/attilio/vmcontention/bin/ed/undo.c ============================================================================== --- user/attilio/vmcontention/bin/ed/undo.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/ed/undo.c Mon Oct 22 21:26:36 2012 (r241915) @@ -32,9 +32,9 @@ __FBSDID("$FreeBSD$"); #define USIZE 100 /* undo stack size */ -undo_t *ustack = NULL; /* undo stack */ -long usize = 0; /* stack size variable */ -long u_p = 0; /* undo stack pointer */ +static undo_t *ustack = NULL; /* undo stack */ +static long usize = 0; /* stack size variable */ +static long u_p = 0; /* undo stack pointer */ /* push_undo_stack: return pointer to initialized undo node */ undo_t * Modified: user/attilio/vmcontention/bin/getfacl/getfacl.c ============================================================================== --- user/attilio/vmcontention/bin/getfacl/getfacl.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/getfacl/getfacl.c Mon Oct 22 21:26:36 2012 (r241915) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include -int more_than_one = 0; +static int more_than_one = 0; static void usage(void) Modified: user/attilio/vmcontention/bin/ls/ls.c ============================================================================== --- user/attilio/vmcontention/bin/ls/ls.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/ls/ls.c Mon Oct 22 21:26:36 2012 (r241915) @@ -561,7 +561,8 @@ display(const FTSENT *p, FTSENT *list, i NAMES *np; off_t maxsize; long maxblock; - u_long btotal, labelstrlen, maxinode, maxlen, maxnlink; + uintmax_t maxinode; + u_long btotal, labelstrlen, maxlen, maxnlink; u_long maxlabelstr; u_int sizelen; int maxflags; @@ -580,8 +581,9 @@ display(const FTSENT *p, FTSENT *list, i btotal = 0; initmax = getenv("LS_COLWIDTHS"); /* Fields match -lios order. New ones should be added at the end. */ - maxlabelstr = maxblock = maxinode = maxlen = maxnlink = - maxuser = maxgroup = maxflags = maxsize = 0; + maxlabelstr = maxblock = maxlen = maxnlink = 0; + maxuser = maxgroup = maxflags = maxsize = 0; + maxinode = 0; if (initmax != NULL && *initmax != '\0') { char *initmax2, *jinitmax; int ninitmax; @@ -609,7 +611,7 @@ display(const FTSENT *p, FTSENT *list, i strcpy(initmax2, "0"); ninitmax = sscanf(jinitmax, - " %lu : %ld : %lu : %u : %u : %i : %jd : %lu : %lu ", + " %ju : %ld : %lu : %u : %u : %i : %jd : %lu : %lu ", &maxinode, &maxblock, &maxnlink, &maxuser, &maxgroup, &maxflags, &maxsize, &maxlen, &maxlabelstr); f_notabs = 1; @@ -839,7 +841,7 @@ label_out: d.s_flags = maxflags; d.s_label = maxlabelstr; d.s_group = maxgroup; - d.s_inode = snprintf(NULL, 0, "%lu", maxinode); + d.s_inode = snprintf(NULL, 0, "%ju", maxinode); d.s_nlink = snprintf(NULL, 0, "%lu", maxnlink); sizelen = f_humanval ? HUMANVALSTR_LEN : snprintf(NULL, 0, "%ju", maxsize); Modified: user/attilio/vmcontention/bin/ls/print.c ============================================================================== --- user/attilio/vmcontention/bin/ls/print.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/ls/print.c Mon Oct 22 21:26:36 2012 (r241915) @@ -152,7 +152,8 @@ printlong(const DISPLAY *dp) continue; sp = p->fts_statp; if (f_inode) - (void)printf("%*lu ", dp->s_inode, (u_long)sp->st_ino); + (void)printf("%*ju ", + dp->s_inode, (uintmax_t)sp->st_ino); if (f_size) (void)printf("%*jd ", dp->s_block, howmany(sp->st_blocks, blocksize)); @@ -328,7 +329,8 @@ printaname(const FTSENT *p, u_long inode sp = p->fts_statp; chcnt = 0; if (f_inode) - chcnt += printf("%*lu ", (int)inodefield, (u_long)sp->st_ino); + chcnt += printf("%*ju ", + (int)inodefield, (uintmax_t)sp->st_ino); if (f_size) chcnt += printf("%*jd ", (int)sizefield, howmany(sp->st_blocks, blocksize)); Modified: user/attilio/vmcontention/bin/pax/ar_io.c ============================================================================== --- user/attilio/vmcontention/bin/pax/ar_io.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/pax/ar_io.c Mon Oct 22 21:26:36 2012 (r241915) @@ -85,7 +85,6 @@ const char *gzip_program; /* name of gz static pid_t zpid = -1; /* pid of child process */ static int get_phys(void); -extern sigset_t s_mask; static void ar_start_gzip(int, const char *, int); /* Modified: user/attilio/vmcontention/bin/pax/ar_subs.c ============================================================================== --- user/attilio/vmcontention/bin/pax/ar_subs.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/pax/ar_subs.c Mon Oct 22 21:26:36 2012 (r241915) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); static void wr_archive(ARCHD *, int is_app); static int get_arc(void); static int next_head(ARCHD *); -extern sigset_t s_mask; /* * Routines which control the overall operation modes of pax as specified by Modified: user/attilio/vmcontention/bin/pax/extern.h ============================================================================== --- user/attilio/vmcontention/bin/pax/extern.h Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/pax/extern.h Mon Oct 22 21:26:36 2012 (r241915) @@ -186,7 +186,7 @@ void options(int, char **); OPLIST * opt_next(void); int opt_add(const char *); int bad_opt(void); -char *chdname; +extern char *chdname; /* * pat_rep.c @@ -231,6 +231,7 @@ extern int exit_val; extern int docrc; extern char *dirptr; extern const char *argv0; +extern sigset_t s_mask; extern FILE *listf; extern char *tempfile; extern char *tempbase; Modified: user/attilio/vmcontention/bin/pax/options.c ============================================================================== --- user/attilio/vmcontention/bin/pax/options.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/pax/options.c Mon Oct 22 21:26:36 2012 (r241915) @@ -81,6 +81,7 @@ static void cpio_usage(void); #define GETLINE_OUT_OF_MEM 2 static int getline_error; +char *chdname; #define GZIP_CMD "gzip" /* command to run as gzip */ #define COMPRESS_CMD "compress" /* command to run as compress */ Modified: user/attilio/vmcontention/bin/rcp/rcp.c ============================================================================== --- user/attilio/vmcontention/bin/rcp/rcp.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/rcp/rcp.c Mon Oct 22 21:26:36 2012 (r241915) @@ -76,12 +76,13 @@ __FBSDID("$FreeBSD$"); #define OPTIONS "46dfprt" -struct passwd *pwd; -u_short port; -uid_t userid; -int errs, rem; -int pflag, iamremote, iamrecursive, targetshouldbedirectory; -int family = PF_UNSPEC; +static struct passwd *pwd; +static u_short port; +static uid_t userid; +static int errs, rem; +int iamremote; +static int pflag, iamrecursive, targetshouldbedirectory; +static int family = PF_UNSPEC; static int argc_copy; static const char **argv_copy; @@ -89,7 +90,7 @@ static const char **argv_copy; static char period[] = "."; #define CMDNEEDS 64 -char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */ +static char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */ int response(void); void rsource(char *, struct stat *); Modified: user/attilio/vmcontention/bin/rm/rm.c ============================================================================== --- user/attilio/vmcontention/bin/rm/rm.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/rm/rm.c Mon Oct 22 21:26:36 2012 (r241915) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -429,8 +430,8 @@ rm_overwrite(char *file, struct stat *sb if (!S_ISREG(sbp->st_mode)) return (1); if (sbp->st_nlink > 1 && !fflag) { - warnx("%s (inode %u): not overwritten due to multiple links", - file, sbp->st_ino); + warnx("%s (inode %ju): not overwritten due to multiple links", + file, (uintmax_t)sbp->st_ino); return (0); } if ((fd = open(file, O_WRONLY|O_NONBLOCK|O_NOFOLLOW, 0)) == -1) Modified: user/attilio/vmcontention/bin/setfacl/setfacl.c ============================================================================== --- user/attilio/vmcontention/bin/setfacl/setfacl.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/setfacl/setfacl.c Mon Oct 22 21:26:36 2012 (r241915) @@ -42,6 +42,35 @@ __FBSDID("$FreeBSD$"); #include "setfacl.h" +/* file operations */ +#define OP_MERGE_ACL 0x00 /* merge acl's (-mM) */ +#define OP_REMOVE_DEF 0x01 /* remove default acl's (-k) */ +#define OP_REMOVE_EXT 0x02 /* remove extended acl's (-b) */ +#define OP_REMOVE_ACL 0x03 /* remove acl's (-xX) */ +#define OP_REMOVE_BY_NUMBER 0x04 /* remove acl's (-xX) by acl entry number */ +#define OP_ADD_ACL 0x05 /* add acls entries at a given position */ + +/* TAILQ entry for acl operations */ +struct sf_entry { + uint op; + acl_t acl; + uint entry_number; + TAILQ_ENTRY(sf_entry) next; +}; +static TAILQ_HEAD(, sf_entry) entrylist; + +/* TAILQ entry for files */ +struct sf_file { + const char *filename; + TAILQ_ENTRY(sf_file) next; +}; +static TAILQ_HEAD(, sf_file) filelist; + +uint have_mask; +uint need_mask; +uint have_stdin; +uint n_flag; + static void add_filename(const char *filename); static void usage(void); Modified: user/attilio/vmcontention/bin/setfacl/setfacl.h ============================================================================== --- user/attilio/vmcontention/bin/setfacl/setfacl.h Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/setfacl/setfacl.h Mon Oct 22 21:26:36 2012 (r241915) @@ -33,30 +33,6 @@ #include #include -/* file operations */ -#define OP_MERGE_ACL 0x00 /* merge acl's (-mM) */ -#define OP_REMOVE_DEF 0x01 /* remove default acl's (-k) */ -#define OP_REMOVE_EXT 0x02 /* remove extended acl's (-b) */ -#define OP_REMOVE_ACL 0x03 /* remove acl's (-xX) */ -#define OP_REMOVE_BY_NUMBER 0x04 /* remove acl's (-xX) by acl entry number */ -#define OP_ADD_ACL 0x05 /* add acls entries at a given position */ - -/* TAILQ entry for acl operations */ -struct sf_entry { - uint op; - acl_t acl; - uint entry_number; - TAILQ_ENTRY(sf_entry) next; -}; -TAILQ_HEAD(, sf_entry) entrylist; - -/* TAILQ entry for files */ -struct sf_file { - const char *filename; - TAILQ_ENTRY(sf_file) next; -}; -TAILQ_HEAD(, sf_file) filelist; - /* files.c */ acl_t get_acl_from_file(const char *filename); /* merge.c */ @@ -74,9 +50,9 @@ void *zmalloc(size_t size); const char *brand_name(int brand); int branding_mismatch(int brand1, int brand2); -uint have_mask; -uint need_mask; -uint have_stdin; -uint n_flag; +extern uint have_mask; +extern uint need_mask; +extern uint have_stdin; +extern uint n_flag; #endif /* _SETFACL_H */ Modified: user/attilio/vmcontention/bin/sh/sh.1 ============================================================================== --- user/attilio/vmcontention/bin/sh/sh.1 Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/bin/sh/sh.1 Mon Oct 22 21:26:36 2012 (r241915) @@ -649,8 +649,8 @@ The following redirection is often calle .Dq here-document . .Bd -unfilled -offset indent .Oo Ar n Oc Ns Li << Ar delimiter -.D1 Ar here-doc-text -.D1 ... +.Ar here-doc-text +.Ar ... .Ar delimiter .Ed .Pp Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Oct 22 21:26:36 2012 (r241915) @@ -174,7 +174,7 @@ .Fl a | Ar filesystem Ns | Ns Ar mountpoint .Nm .Cm send -.Op Fl DnPpRrv +.Op Fl DnPpRv .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Nm @@ -2196,7 +2196,7 @@ file system shared on the system. .It Xo .Nm .Cm send -.Op Fl DnPpRrv +.Op Fl DnPpRv .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Xc @@ -2269,13 +2269,6 @@ be used regardless of the dataset's property, but performance will be much better if the filesystem uses a dedup-capable checksum (eg. .Sy sha256 ) . -.It Fl r -Recursively send all descendant snapshots. This is similar to the -.Fl R -flag, but information about deleted and renamed datasets is not included, and -property information is only included if the -.Fl p -flag is specified. .It Fl p Include the dataset's properties in the stream. This flag is implicit when .Fl R Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Oct 22 21:26:36 2012 (r241915) @@ -267,7 +267,7 @@ get_usage(zfs_help_t idx) case HELP_ROLLBACK: return (gettext("\trollback [-rRf] \n")); case HELP_SEND: - return (gettext("\tsend [-DnPpRrv] " + return (gettext("\tsend [-DnPpRv] " "[-i snapshot | -I snapshot] \n")); case HELP_SET: return (gettext("\tset " @@ -3081,6 +3081,7 @@ zfs_do_rename(int argc, char **argv) int ret = 0; int types; boolean_t parents = B_FALSE; + char *snapshot = NULL; /* check options */ while ((c = getopt(argc, argv, "fpru")) != -1) { @@ -3149,6 +3150,19 @@ zfs_do_rename(int argc, char **argv) else types = ZFS_TYPE_DATASET; + if (flags.recurse) { + /* + * When we do recursive rename we are fine when the given + * snapshot for the given dataset doesn't exist - it can + * still exists below. + */ + + snapshot = strchr(argv[0], '@'); + assert(snapshot != NULL); + *snapshot = '\0'; + snapshot++; + } + if ((zhp = zfs_open(g_zfs, argv[0], types)) == NULL) return (1); @@ -3159,7 +3173,7 @@ zfs_do_rename(int argc, char **argv) return (1); } - ret = (zfs_rename(zhp, argv[1], flags) != 0); + ret = (zfs_rename(zhp, snapshot, argv[1], flags) != 0); zfs_close(zhp); return (ret); Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c Mon Oct 22 21:26:36 2012 (r241915) @@ -678,6 +678,7 @@ dt_printf(dtrace_hdl_t *dtp, FILE *fp, c dtp->dt_buffered_offs += needed; assert(dtp->dt_buffered_buf[dtp->dt_buffered_offs] == '\0'); + va_end(ap); return (0); } Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Oct 22 21:26:36 2012 (r241915) @@ -571,7 +571,8 @@ typedef struct renameflags { int forceunmount : 1; } renameflags_t; -extern int zfs_rename(zfs_handle_t *, const char *, renameflags_t flags); +extern int zfs_rename(zfs_handle_t *, const char *, const char *, + renameflags_t flags); typedef struct sendflags { /* print informational messages (ie, -v was specified) */ Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Oct 22 21:14:26 2012 (r241914) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Oct 22 21:26:36 2012 (r241915) @@ -611,6 +611,22 @@ zfs_open(libzfs_handle_t *hdl, const cha return (NULL); } + if (zhp == NULL) { + char *at = strchr(path, '@'); + + if (at != NULL) + *at = '\0'; + errno = 0; + if ((zhp = make_dataset_handle(hdl, path)) == NULL) { + (void) zfs_standard_error(hdl, errno, errbuf); + return (NULL); + } + if (at != NULL) + *at = '@'; + (void) strlcpy(zhp->zfs_name, path, sizeof (zhp->zfs_name)); + zhp->zfs_type = ZFS_TYPE_SNAPSHOT; + } + if (!(types & zhp->zfs_type)) { (void) zfs_error(hdl, EZFS_BADTYPE, errbuf); zfs_close(zhp); @@ -1430,7 +1446,7 @@ zfs_prop_set(zfs_handle_t *zhp, const ch libzfs_handle_t *hdl = zhp->zfs_hdl; nvlist_t *nvl = NULL, *realprops; zfs_prop_t prop; - boolean_t do_prefix; + boolean_t do_prefix = B_TRUE; uint64_t idx; int added_resv; @@ -3614,7 +3630,8 @@ zfs_rollback(zfs_handle_t *zhp, zfs_hand * Renames the given dataset. */ int -zfs_rename(zfs_handle_t *zhp, const char *target, renameflags_t flags) +zfs_rename(zfs_handle_t *zhp, const char *source, const char *target, + renameflags_t flags) { int ret; zfs_cmd_t zc = { 0 }; @@ -3634,6 +3651,18 @@ zfs_rename(zfs_handle_t *zhp, const char (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot rename to '%s'"), target); + if (source != NULL) { + /* + * This is recursive snapshots rename, put snapshot name + * (that might not exist) into zfs_name. + */ + assert(flags.recurse); + + (void) strlcat(zhp->zfs_name, "@", sizeof(zhp->zfs_name)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Oct 23 09:35:15 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1D3399EB for ; Tue, 23 Oct 2012 09:35:15 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 62CD28FC0C for ; Tue, 23 Oct 2012 09:35:14 +0000 (UTC) Received: (qmail 84931 invoked from network); 23 Oct 2012 11:13:16 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 23 Oct 2012 11:13:16 -0000 Message-ID: <508664C7.3080206@freebsd.org> Date: Tue, 23 Oct 2012 11:35:03 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... References: <201210221418.q9MEINkr026751@svn.freebsd.org> <20121023032743.K2804@besplex.bde.org> In-Reply-To: <20121023032743.K2804@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 09:35:15 -0000 On 22.10.2012 19:10, Bruce Evans wrote: > On Mon, 22 Oct 2012, Andre Oppermann wrote: > >> Log: >> Second pass at making global mutexes use MTX_DEF_SYSINIT(). > >> Modified: user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c >> ============================================================================== >> --- user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Mon Oct 22 14:10:17 2012 (r241888) >> +++ user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Mon Oct 22 14:18:22 2012 (r241889) >> @@ -163,9 +163,7 @@ static TAILQ_HEAD(,bus_dmamap) dmamap_fr >> #define BUSDMA_STATIC_MAPS 500 >> static struct bus_dmamap map_pool[BUSDMA_STATIC_MAPS]; >> >> -static struct mtx busdma_mtx; >> - >> -MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF); >> +static MTX_DEF_SYSINIT(busdma_mtx, "busdma lock", MTX_DEF); > > The verboser (sic) name is uglier. > > But once it says DEF, the arg list shouldn't say DEF. Either this is > DEF for something unrelated to MTX_DEF, in which case it is confusing > and the confusion is made worse by having MTX_ precede DEF in both, > or it is the same DEF and the arg is redundant, or it implies MTX_DEF > by default but this can be changed, in which case it is confusing. You're right, it is a bit confusing. However the DEF in MTX_DEF_SYSINIT stands for DEFining the global variable whereas MTX_DEF stands for a default type mutex. Unfortunately I couldn't come up with a bette short name for MTX_DEF_SYSINIT. I'm open for suggestions though. > The first seems to apply, since some calls use MTX_SPIN: > >> ... >> Modified: user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c >> ============================================================================== >> --- user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c Mon Oct 22 14:10:17 2012 (r241888) >> +++ user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c Mon Oct 22 14:18:22 2012 (r241889) >> @@ -70,9 +70,7 @@ >> * XXX This is a global lock for now; it should be pushed to >> * a per-device lock in some platform-independent fashion. >> */ >> -struct mtx ah_regser_mtx; >> -MTX_SYSINIT(ah_regser, &ah_regser_mtx, "Atheros register access mutex", >> - MTX_SPIN); >> +MTX_DEF_SYSINIT(ah_regser_mtx, "Atheros register access mutex", MTX_SPIN); > > So this is an MTX_DEF that gives MTX_SPIN but not MTX_DEF?! > > Always aligning to the cache line size can't be quite right. It over-uses > addresses that are zero modulo the line size, especially if the alignment > is used for objects smaller than the line size. It doesn't give > determinism, since cache collisions are still possible due to shortages > of tags, especially with lots of objects at the same alignment, and > especially with caches of limited associativity. And without a special > section for the global aligned objects, you might be unlucky and have > them all have offset 0 modulo PAGE_SIZE or similar, and thus have more > than the average number of tag collisions. The alignment is on a cache line. It doesn't overuse zero modulo addresses because for all addresses within a cache line their lower bits are being truncated anyway. If it were aligned to page size I'd agree on the collision part, but it's not. Getting unlucky by having two mutexes collide by associativity is less of a chance than having two mutexes on the same cache line. Also, should this rare event happen, associativity is being improved in every future generation of high-powered CPU's. And that is where is matters because of high rates of items processed and thus locks obtained. > In a test program in userland, I notices many very large performance > differences from alignment, and sometimes even larger performance > losses from trying tpo hard to line things up. The program is a > relatively simple floating point benchmark. The problems are largest > in long double precisions. Long doubles take 16 bytes each, and are > rather exessively aligned by default, and gcc uses far too much stack > space for them. Despite the stack being 16-byte aligned, modifying > the environment using something like CFLAGS=-O would change the alignment > mod 64 or something significantly enough to give performance differences > of up to 50%. The following didn't quite work to give determinism: > - -mpreferred-stack-boundary=6 or more. This gives 64-byte or more > stack alignment, except it is not supported by clang (clang generally > handles stack alignment better, but you can't control it). This also > takes much more stack, and sometimes makes the problem worse. But it > does make the problem harder to hit by modifiying the environment. > Now larger environment changes are normally need to move the stack > to the next 64-byte boundary. > - align the stack initially to PAGE_SIZE, then try all adjustments of > that are multiples of 8 mod PAGE_SIZE. Don't use > -mpreferred-stack-boundary now. The best multiples seemed to be > 44 * 8 for amd64 and 43 * 8 for i386. (This is on core2 (ref*).). > This works better than the above, and is fairly deterministic. > But there are still some subtests that run much slower than they > should and run at full speed with a different multiple. Their > stack use is not signifcantly different, so I suspect some collision > with aligned addresses in the data or text sections. The tests are > very repetitive, so any cache collisions would probably give the > 20-50% slowdowns if the repeated. These tests are neither relevant nor correct for the issue at hand. > Some caching schemes use random replacement since nothing is worse than > eaccidentally excessive alignment that causes a cache collision > repeatedly. The reason for mutex cache line alignment is totally different. Whenever a mutex is aquired there is a value written to its memory location with appropriate memory bus locking semantics. Depending on the architecture it is handled in memory and cache coherency hardware or it hits main memory and invalidates all other CPU caches. Both are very expensive operations. If a lock is successfully obtained its cache line has become invalid on all other CPU's. The same for when it is released. A lock that is frequently obtained on multiple CPU's causes a great deal of cache line invalidation and bouncing coupled with expensive bus locked instructions. With a spin lock it gets even worse as all blocked CPU's constantly try write to write to the memory location. The worst case is two or even more distinct locks sharing the same cache line. There every operation on one lock causes the other to get evicted from the cache line as well. Add in some contention for the other lock and performance goes down the drain. This false sharing of cache lines by multiple locks is what the cache line alignment tries to solve. -- Andre From owner-svn-src-user@FreeBSD.ORG Tue Oct 23 09:59:47 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 908DA203; Tue, 23 Oct 2012 09:59:47 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 751AE8FC12; Tue, 23 Oct 2012 09:59:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9N9xlkK035139; Tue, 23 Oct 2012 09:59:47 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9N9xk7e035114; Tue, 23 Oct 2012 09:59:46 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210230959.q9N9xk7e035114@svn.freebsd.org> From: Andre Oppermann Date: Tue, 23 Oct 2012 09:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241924 - in user/andre/tcp_workqueue/sys: cam/ctl cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs compat/linprocfs compat/linux comp... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 09:59:47 -0000 Author: andre Date: Tue Oct 23 09:59:46 2012 New Revision: 241924 URL: http://svn.freebsd.org/changeset/base/241924 Log: Integrate from HEAD @241923. Modified: user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_block.c user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/sys/vnode.h user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c user/andre/tcp_workqueue/sys/compat/linprocfs/linprocfs.c user/andre/tcp_workqueue/sys/compat/linux/linux_file.c user/andre/tcp_workqueue/sys/compat/linux/linux_misc.c user/andre/tcp_workqueue/sys/compat/ndis/subr_ndis.c user/andre/tcp_workqueue/sys/compat/svr4/svr4_misc.c user/andre/tcp_workqueue/sys/conf/NOTES user/andre/tcp_workqueue/sys/conf/options user/andre/tcp_workqueue/sys/dev/e1000/if_lem.c user/andre/tcp_workqueue/sys/dev/etherswitch/arswitch/arswitch_reg.c user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_mod.c user/andre/tcp_workqueue/sys/dev/ixgbe/ixgbe.c user/andre/tcp_workqueue/sys/dev/ixgbe/ixv.c user/andre/tcp_workqueue/sys/dev/md/md.c user/andre/tcp_workqueue/sys/dev/nand/nandsim_swap.c user/andre/tcp_workqueue/sys/dev/sound/pci/emu10kx.c user/andre/tcp_workqueue/sys/dev/xen/blkback/blkback.c user/andre/tcp_workqueue/sys/fs/nfs/nfs_commonport.c user/andre/tcp_workqueue/sys/fs/nfsserver/nfs_nfsdport.c user/andre/tcp_workqueue/sys/fs/procfs/procfs_map.c user/andre/tcp_workqueue/sys/fs/unionfs/union_subr.c user/andre/tcp_workqueue/sys/geom/geom_vfs.c user/andre/tcp_workqueue/sys/geom/journal/g_journal.c user/andre/tcp_workqueue/sys/i386/ibcs2/ibcs2_misc.c user/andre/tcp_workqueue/sys/kern/imgact_elf.c user/andre/tcp_workqueue/sys/kern/kern_acct.c user/andre/tcp_workqueue/sys/kern/kern_alq.c user/andre/tcp_workqueue/sys/kern/kern_ctf.c user/andre/tcp_workqueue/sys/kern/kern_descrip.c user/andre/tcp_workqueue/sys/kern/kern_exec.c user/andre/tcp_workqueue/sys/kern/kern_exit.c user/andre/tcp_workqueue/sys/kern/kern_gzio.c user/andre/tcp_workqueue/sys/kern/kern_jail.c user/andre/tcp_workqueue/sys/kern/kern_ktrace.c user/andre/tcp_workqueue/sys/kern/kern_linker.c user/andre/tcp_workqueue/sys/kern/kern_proc.c user/andre/tcp_workqueue/sys/kern/kern_sig.c user/andre/tcp_workqueue/sys/kern/link_elf.c user/andre/tcp_workqueue/sys/kern/link_elf_obj.c user/andre/tcp_workqueue/sys/kern/sys_process.c user/andre/tcp_workqueue/sys/kern/uipc_syscalls.c user/andre/tcp_workqueue/sys/kern/uipc_usrreq.c user/andre/tcp_workqueue/sys/kern/vfs_acl.c user/andre/tcp_workqueue/sys/kern/vfs_aio.c user/andre/tcp_workqueue/sys/kern/vfs_bio.c user/andre/tcp_workqueue/sys/kern/vfs_cache.c user/andre/tcp_workqueue/sys/kern/vfs_default.c user/andre/tcp_workqueue/sys/kern/vfs_extattr.c user/andre/tcp_workqueue/sys/kern/vfs_init.c user/andre/tcp_workqueue/sys/kern/vfs_lookup.c user/andre/tcp_workqueue/sys/kern/vfs_mount.c user/andre/tcp_workqueue/sys/kern/vfs_mountroot.c user/andre/tcp_workqueue/sys/kern/vfs_subr.c user/andre/tcp_workqueue/sys/kern/vfs_syscalls.c user/andre/tcp_workqueue/sys/kern/vfs_vnops.c user/andre/tcp_workqueue/sys/mips/conf/RT305X user/andre/tcp_workqueue/sys/net/if_gre.c user/andre/tcp_workqueue/sys/net/if_stf.c user/andre/tcp_workqueue/sys/netgraph/ng_ipfw.c user/andre/tcp_workqueue/sys/netinet/igmp.c user/andre/tcp_workqueue/sys/netinet/in.h user/andre/tcp_workqueue/sys/netinet/in_gif.c user/andre/tcp_workqueue/sys/netinet/ip_carp.c user/andre/tcp_workqueue/sys/netinet/ip_divert.c user/andre/tcp_workqueue/sys/netinet/ip_gre.c user/andre/tcp_workqueue/sys/netinet/ip_icmp.c user/andre/tcp_workqueue/sys/netinet/ip_input.c user/andre/tcp_workqueue/sys/netinet/ip_ipsec.c user/andre/tcp_workqueue/sys/netinet/ip_mroute.c user/andre/tcp_workqueue/sys/netinet/ip_options.c user/andre/tcp_workqueue/sys/netinet/ip_output.c user/andre/tcp_workqueue/sys/netinet/raw_ip.c user/andre/tcp_workqueue/sys/netinet/sctp_input.c user/andre/tcp_workqueue/sys/netinet/sctp_output.c user/andre/tcp_workqueue/sys/netinet/sctp_uio.h user/andre/tcp_workqueue/sys/netinet/sctp_usrreq.c user/andre/tcp_workqueue/sys/netinet/sctp_var.h user/andre/tcp_workqueue/sys/netinet/sctputil.c user/andre/tcp_workqueue/sys/netinet/siftr.c user/andre/tcp_workqueue/sys/netinet/tcp_debug.c user/andre/tcp_workqueue/sys/netinet/tcp_input.c user/andre/tcp_workqueue/sys/netinet/tcp_output.c user/andre/tcp_workqueue/sys/netinet/tcp_subr.c user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c user/andre/tcp_workqueue/sys/netinet/tcp_timewait.c user/andre/tcp_workqueue/sys/netinet/udp_usrreq.c user/andre/tcp_workqueue/sys/netinet6/icmp6.c user/andre/tcp_workqueue/sys/netinet6/in6.c user/andre/tcp_workqueue/sys/netinet6/in6.h user/andre/tcp_workqueue/sys/netinet6/in6_gif.h user/andre/tcp_workqueue/sys/netinet6/in6_ifattach.h user/andre/tcp_workqueue/sys/netinet6/in6_pcb.h user/andre/tcp_workqueue/sys/netinet6/in6_src.c user/andre/tcp_workqueue/sys/netinet6/in6_var.h user/andre/tcp_workqueue/sys/netinet6/ip6_ipsec.c user/andre/tcp_workqueue/sys/netinet6/ip6_output.c user/andre/tcp_workqueue/sys/netinet6/ip6_var.h user/andre/tcp_workqueue/sys/netinet6/ip6protosw.h user/andre/tcp_workqueue/sys/netinet6/nd6.c user/andre/tcp_workqueue/sys/netinet6/nd6.h user/andre/tcp_workqueue/sys/netinet6/nd6_rtr.c user/andre/tcp_workqueue/sys/netinet6/pim6_var.h user/andre/tcp_workqueue/sys/netinet6/scope6_var.h user/andre/tcp_workqueue/sys/netinet6/sctp6_var.h user/andre/tcp_workqueue/sys/netinet6/tcp6_var.h user/andre/tcp_workqueue/sys/netipsec/ipsec.c user/andre/tcp_workqueue/sys/netipsec/ipsec_input.c user/andre/tcp_workqueue/sys/netipsec/ipsec_output.c user/andre/tcp_workqueue/sys/netipsec/xform_ah.c user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_dn_io.c user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_fw2.c user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_fw_dynamic.c user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_fw_nat.c user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_fw_pfil.c user/andre/tcp_workqueue/sys/netpfil/pf/if_pfsync.c user/andre/tcp_workqueue/sys/netpfil/pf/pf.c user/andre/tcp_workqueue/sys/nfsserver/nfs.h user/andre/tcp_workqueue/sys/nfsserver/nfs_serv.c user/andre/tcp_workqueue/sys/nfsserver/nfs_srvsubs.c user/andre/tcp_workqueue/sys/nlm/nlm_prot_impl.c user/andre/tcp_workqueue/sys/powerpc/conf/WII user/andre/tcp_workqueue/sys/security/audit/audit_arg.c user/andre/tcp_workqueue/sys/security/audit/audit_syscalls.c user/andre/tcp_workqueue/sys/security/audit/audit_worker.c user/andre/tcp_workqueue/sys/security/mac/mac_process.c user/andre/tcp_workqueue/sys/security/mac/mac_syscalls.c user/andre/tcp_workqueue/sys/sys/buf.h user/andre/tcp_workqueue/sys/sys/bufobj.h user/andre/tcp_workqueue/sys/sys/mount.h user/andre/tcp_workqueue/sys/sys/namei.h user/andre/tcp_workqueue/sys/sys/param.h user/andre/tcp_workqueue/sys/ufs/ffs/ffs_alloc.c user/andre/tcp_workqueue/sys/ufs/ffs/ffs_softdep.c user/andre/tcp_workqueue/sys/ufs/ufs/ufs_quota.c user/andre/tcp_workqueue/sys/vm/vm_fault.c user/andre/tcp_workqueue/sys/vm/vm_mmap.c user/andre/tcp_workqueue/sys/vm/vm_object.c user/andre/tcp_workqueue/sys/vm/vm_pageout.c user/andre/tcp_workqueue/sys/vm/vnode_pager.c Directory Properties: user/andre/tcp_workqueue/sys/ (props changed) user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/ (props changed) user/andre/tcp_workqueue/sys/conf/ (props changed) Modified: user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_block.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_block.c Tue Oct 23 09:59:46 2012 (r241924) @@ -594,14 +594,12 @@ ctl_be_block_flush_file(struct ctl_be_bl { union ctl_io *io; struct mount *mountpoint; - int vfs_is_locked, error, lock_flags; + int error, lock_flags; DPRINTF("entered\n"); io = beio->io; - vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount); - (void) vn_start_write(be_lun->vn, &mountpoint, V_WAIT); if (MNT_SHARED_WRITES(mountpoint) @@ -621,8 +619,6 @@ ctl_be_block_flush_file(struct ctl_be_bl vn_finished_write(mountpoint); - VFS_UNLOCK_GIANT(vfs_is_locked); - if (error == 0) ctl_set_success(&io->scsiio); else { @@ -648,7 +644,7 @@ ctl_be_block_dispatch_file(struct ctl_be union ctl_io *io; struct uio xuio; struct iovec *xiovec; - int vfs_is_locked, flags; + int flags; int error, i; DPRINTF("entered\n"); @@ -681,7 +677,6 @@ ctl_be_block_dispatch_file(struct ctl_be xiovec->iov_len = beio->sg_segs[i].len; } - vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount); if (beio->bio_cmd == BIO_READ) { vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); @@ -754,7 +749,6 @@ ctl_be_block_dispatch_file(struct ctl_be vn_finished_write(mountpoint); } - VFS_UNLOCK_GIANT(vfs_is_locked); /* * If we got an error, set the sense data to "MEDIUM ERROR" and @@ -1478,7 +1472,6 @@ ctl_be_block_close(struct ctl_be_block_l DROP_GIANT(); if (be_lun->vn) { int flags = FREAD | FWRITE; - int vfs_is_locked = 0; switch (be_lun->dev_type) { case CTL_BE_BLOCK_DEV: @@ -1490,7 +1483,6 @@ ctl_be_block_close(struct ctl_be_block_l } break; case CTL_BE_BLOCK_FILE: - vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount); break; case CTL_BE_BLOCK_NONE: default: @@ -1505,7 +1497,6 @@ ctl_be_block_close(struct ctl_be_block_l case CTL_BE_BLOCK_DEV: break; case CTL_BE_BLOCK_FILE: - VFS_UNLOCK_GIANT(vfs_is_locked); if (be_lun->backend.file.cred != NULL) { crfree(be_lun->backend.file.cred); be_lun->backend.file.cred = NULL; @@ -1529,7 +1520,6 @@ ctl_be_block_open(struct ctl_be_block_so struct nameidata nd; int flags; int error; - int vfs_is_locked; /* * XXX KDM allow a read-only option? @@ -1587,8 +1577,6 @@ ctl_be_block_open(struct ctl_be_block_so return (error); } - vfs_is_locked = NDHASGIANT(&nd); - NDFREE(&nd, NDF_ONLY_PNBUF); be_lun->vn = nd.ni_vp; @@ -1604,7 +1592,6 @@ ctl_be_block_open(struct ctl_be_block_so "%s is not a disk or file", be_lun->dev_path); } VOP_UNLOCK(be_lun->vn, 0); - VFS_UNLOCK_GIANT(vfs_is_locked); if (error != 0) { ctl_be_block_close(be_lun); @@ -2090,7 +2077,7 @@ ctl_be_block_modify(struct ctl_be_block_ { struct ctl_lun_modify_params *params; struct ctl_be_block_lun *be_lun; - int vfs_is_locked, error; + int error; params = &req->reqdata.modify; @@ -2120,7 +2107,6 @@ ctl_be_block_modify(struct ctl_be_block_ } } - vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount); vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); if (be_lun->vn->v_type == VREG) @@ -2129,7 +2115,6 @@ ctl_be_block_modify(struct ctl_be_block_ error = ctl_be_block_modify_dev(be_lun, req); VOP_UNLOCK(be_lun->vn, 0); - VFS_UNLOCK_GIANT(vfs_is_locked); if (error != 0) goto bailout_error; Modified: user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c Tue Oct 23 09:59:46 2012 (r241924) @@ -69,7 +69,7 @@ kobj_open_file_vnode(const char *file) struct thread *td = curthread; struct filedesc *fd; struct nameidata nd; - int error, flags, vfslocked; + int error, flags; fd = td->td_proc->p_fd; FILEDESC_XLOCK(fd); @@ -84,15 +84,13 @@ kobj_open_file_vnode(const char *file) FILEDESC_XUNLOCK(fd); flags = FREAD | O_NOFOLLOW; - NDINIT(&nd, LOOKUP, MPSAFE, UIO_SYSSPACE, file, td); + NDINIT(&nd, LOOKUP, 0, UIO_SYSSPACE, file, td); error = vn_open_cred(&nd, &flags, 0, 0, curthread->td_ucred, NULL); if (error != 0) return (NULL); - vfslocked = NDHASGIANT(&nd); NDFREE(&nd, NDF_ONLY_PNBUF); /* We just unlock so we hold a reference. */ VOP_UNLOCK(nd.ni_vp, 0); - VFS_UNLOCK_GIANT(vfslocked); return (nd.ni_vp); } @@ -130,15 +128,13 @@ kobj_get_filesize_vnode(struct _buf *fil { struct vnode *vp = file->ptr; struct vattr va; - int error, vfslocked; + int error; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &va, curthread->td_ucred); VOP_UNLOCK(vp, 0); if (error == 0) *size = (uint64_t)va.va_size; - VFS_UNLOCK_GIANT(vfslocked); return (error); } @@ -171,7 +167,7 @@ kobj_read_file_vnode(struct _buf *file, struct thread *td = curthread; struct uio auio; struct iovec aiov; - int error, vfslocked; + int error; bzero(&aiov, sizeof(aiov)); bzero(&auio, sizeof(auio)); @@ -187,11 +183,9 @@ kobj_read_file_vnode(struct _buf *file, auio.uio_resid = size; auio.uio_td = td; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_READ(vp, &auio, IO_UNIT | IO_SYNC, td->td_ucred); VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); return (error != 0 ? -1 : size - auio.uio_resid); } @@ -221,14 +215,7 @@ void kobj_close_file(struct _buf *file) { - if (file->mounted) { - struct vnode *vp = file->ptr; - struct thread *td = curthread; - int vfslocked; - - vfslocked = VFS_LOCK_GIANT(vp->v_mount); - vn_close(vp, FREAD, td->td_ucred, td); - VFS_UNLOCK_GIANT(vfslocked); - } + if (file->mounted) + vn_close(file->ptr, FREAD, curthread->td_ucred, curthread); kmem_free(file, sizeof(*file)); } Modified: user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c Tue Oct 23 09:59:46 2012 (r241924) @@ -54,7 +54,7 @@ lookupnameat(char *dirname, enum uio_seg vref(startvp); ltype = VOP_ISLOCKED(startvp); VOP_UNLOCK(startvp, 0); - NDINIT_ATVP(&nd, LOOKUP, LOCKLEAF | MPSAFE | follow, seg, dirname, + NDINIT_ATVP(&nd, LOOKUP, LOCKLEAF | follow, seg, dirname, startvp, curthread); error = namei(&nd); *compvpp = nd.ni_vp; Modified: user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/sys/vnode.h ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/sys/vnode.h Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/sys/vnode.h Tue Oct 23 09:59:46 2012 (r241924) @@ -193,7 +193,7 @@ vn_openat(char *pnamep, enum uio_seg seg if (startvp != NULL) vref(startvp); - NDINIT_ATVP(&nd, operation, MPSAFE, UIO_SYSSPACE, pnamep, startvp, td); + NDINIT_ATVP(&nd, operation, 0, UIO_SYSSPACE, pnamep, startvp, td); filemode |= O_NOFOLLOW; error = vn_open_cred(&nd, &filemode, createmode, 0, td->td_ucred, NULL); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -223,13 +223,12 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp, ssize_t *residp) { struct thread *td = curthread; - int error, vfslocked; + int error; ssize_t resid; ASSERT(ioflag == 0); ASSERT(ulimit == RLIM64_INFINITY); - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (rw == UIO_WRITE) { ioflag = IO_SYNC; } else { @@ -237,7 +236,6 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp, } error = vn_rdwr(rw, vp, base, len, offset, seg, ioflag, cr, NOCRED, &resid, td); - VFS_UNLOCK_GIANT(vfslocked); if (residp != NULL) *residp = (ssize_t)resid; return (error); @@ -249,11 +247,10 @@ static __inline int zfs_vop_fsync(vnode_t *vp, int flag, cred_t *cr) { struct mount *mp; - int error, vfslocked; + int error; ASSERT(flag == FSYNC); - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) goto drop; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); @@ -261,7 +258,6 @@ zfs_vop_fsync(vnode_t *vp, int flag, cre VOP_UNLOCK(vp, 0); vn_finished_write(mp); drop: - VFS_UNLOCK_GIANT(vfslocked); return (error); } #define VOP_FSYNC(vp, flag, cr, ct) zfs_vop_fsync((vp), (flag), (cr)) @@ -269,14 +265,12 @@ drop: static __inline int zfs_vop_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr) { - int error, vfslocked; + int error; ASSERT(count == 1); ASSERT(offset == 0); - vfslocked = VFS_LOCK_GIANT(vp->v_mount); error = vn_close(vp, flag, cr, curthread); - VFS_UNLOCK_GIANT(vfslocked); return (error); } #define VOP_CLOSE(vp, oflags, count, offset, cr, ct) \ Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Tue Oct 23 09:59:46 2012 (r241924) @@ -54,7 +54,7 @@ vdev_file_open(vdev_t *vd, uint64_t *psi vdev_file_t *vf; vnode_t *vp; vattr_t vattr; - int error, vfslocked; + int error; /* * We must have a pathname, and it must be absolute. @@ -114,11 +114,9 @@ skip_open: * Determine the physical size of the file. */ vattr.va_mask = AT_SIZE; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &vattr, kcred); VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); if (error) { (void) VOP_CLOSE(vp, spa_mode(vd->vdev_spa), 1, 0, kcred, NULL); vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED; Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 23 09:59:46 2012 (r241924) @@ -1092,14 +1092,12 @@ zfs_get_done(zgd_t *zgd, int error) { znode_t *zp = zgd->zgd_private; objset_t *os = zp->z_zfsvfs->z_os; - int vfslocked; if (zgd->zgd_db) dmu_buf_rele(zgd->zgd_db, zgd); zfs_range_unlock(zgd->zgd_rl); - vfslocked = VFS_LOCK_GIANT(zp->z_zfsvfs->z_vfs); /* * Release the vnode asynchronously as we currently have the * txg stopped from syncing. @@ -1110,7 +1108,6 @@ zfs_get_done(zgd_t *zgd, int error) zil_add_block(zgd->zgd_zilog, zgd->zgd_bp); kmem_free(zgd, sizeof (zgd_t)); - VFS_UNLOCK_GIANT(vfslocked); } #ifdef DEBUG @@ -6337,7 +6334,7 @@ vop_getextattr { } flags = FREAD; - NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, attrname, + NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, xvp, td); error = vn_open_cred(&nd, &flags, 0, 0, ap->a_cred, NULL); vp = nd.ni_vp; @@ -6405,7 +6402,7 @@ vop_deleteextattr { return (error); } - NDINIT_ATVP(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF | MPSAFE, + NDINIT_ATVP(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF, UIO_SYSSPACE, attrname, xvp, td); error = namei(&nd); vp = nd.ni_vp; @@ -6472,7 +6469,7 @@ vop_setextattr { } flags = FFLAGS(O_WRONLY | O_CREAT); - NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, attrname, + NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, xvp, td); error = vn_open_cred(&nd, &flags, 0600, 0, ap->a_cred, NULL); vp = nd.ni_vp; @@ -6553,7 +6550,7 @@ vop_listextattr { return (error); } - NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED | MPSAFE, + NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED, UIO_SYSSPACE, ".", xvp, td); error = namei(&nd); vp = nd.ni_vp; Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Oct 23 09:59:46 2012 (r241924) @@ -1404,7 +1404,6 @@ zfs_zinactive(znode_t *zp) vnode_t *vp = ZTOV(zp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; uint64_t z_id = zp->z_id; - int vfslocked; ASSERT(zp->z_sa_hdl); @@ -1437,9 +1436,7 @@ zfs_zinactive(znode_t *zp) ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); ASSERT(vp->v_count == 0); vrecycle(vp); - vfslocked = VFS_LOCK_GIANT(zfsvfs->z_vfs); zfs_rmnode(zp); - VFS_UNLOCK_GIANT(vfslocked); return; } Modified: user/andre/tcp_workqueue/sys/compat/linprocfs/linprocfs.c ============================================================================== --- user/andre/tcp_workqueue/sys/compat/linprocfs/linprocfs.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/compat/linprocfs/linprocfs.c Tue Oct 23 09:59:46 2012 (r241924) @@ -335,7 +335,7 @@ linprocfs_domtab(PFS_FILL_ARGS) int error; /* resolve symlinks etc. in the emulation tree prefix */ - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, linux_emul_path, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); flep = NULL; error = namei(&nd); lep = linux_emul_path; @@ -343,7 +343,6 @@ linprocfs_domtab(PFS_FILL_ARGS) if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0) lep = dlep; vrele(nd.ni_vp); - VFS_UNLOCK_GIANT(NDHASGIANT(&nd)); } lep_len = strlen(lep); @@ -414,7 +413,7 @@ linprocfs_dopartitions(PFS_FILL_ARGS) int major, minor; /* resolve symlinks etc. in the emulation tree prefix */ - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, linux_emul_path, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); flep = NULL; error = namei(&nd); lep = linux_emul_path; @@ -422,7 +421,6 @@ linprocfs_dopartitions(PFS_FILL_ARGS) if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0) lep = dlep; vrele(nd.ni_vp); - VFS_UNLOCK_GIANT(NDHASGIANT(&nd)); } lep_len = strlen(lep); @@ -1012,7 +1010,6 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) int error; struct vnode *vp; struct vattr vat; - int locked; PROC_LOCK(p); error = p_candebug(td, p); @@ -1065,12 +1062,10 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) VM_OBJECT_UNLOCK(obj); if (vp) { vn_fullpath(td, vp, &name, &freename); - locked = VFS_LOCK_GIANT(vp->v_mount); vn_lock(vp, LK_SHARED | LK_RETRY); VOP_GETATTR(vp, &vat, td->td_ucred); ino = vat.va_fileid; vput(vp); - VFS_UNLOCK_GIANT(locked); } } else { flags = 0; Modified: user/andre/tcp_workqueue/sys/compat/linux/linux_file.c ============================================================================== --- user/andre/tcp_workqueue/sys/compat/linux/linux_file.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/compat/linux/linux_file.c Tue Oct 23 09:59:46 2012 (r241924) @@ -337,7 +337,7 @@ getdents_common(struct thread *td, struc struct l_dirent64 *linux_dirent64; int buflen, error, eofflag, nbytes, justone; u_long *cookies = NULL, *cookiep; - int ncookies, vfslocked; + int ncookies; nbytes = args->count; if (nbytes == 1) { @@ -359,9 +359,7 @@ getdents_common(struct thread *td, struc off = foffset_lock(fp, 0); vp = fp->f_vnode; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (vp->v_type != VDIR) { - VFS_UNLOCK_GIANT(vfslocked); foffset_unlock(fp, off, 0); fdrop(fp, td); return (EINVAL); @@ -521,7 +519,6 @@ out: free(cookies, M_TEMP); VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); foffset_unlock(fp, off, 0); fdrop(fp, td); free(buf, M_TEMP); Modified: user/andre/tcp_workqueue/sys/compat/linux/linux_misc.c ============================================================================== --- user/andre/tcp_workqueue/sys/compat/linux/linux_misc.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/compat/linux/linux_misc.c Tue Oct 23 09:59:46 2012 (r241924) @@ -247,7 +247,7 @@ linux_uselib(struct thread *td, struct l char *library; ssize_t aresid; int error; - int locked, vfslocked; + int locked; LCONVPATHEXIST(td, args->library, &library); @@ -257,11 +257,10 @@ linux_uselib(struct thread *td, struct l #endif a_out = NULL; - vfslocked = 0; locked = 0; vp = NULL; - NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | MPSAFE | AUDITVNODE1, + NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_SYSSPACE, library, td); error = namei(&ni); LFREEPATH(library); @@ -269,7 +268,6 @@ linux_uselib(struct thread *td, struct l goto cleanup; vp = ni.ni_vp; - vfslocked = NDHASGIANT(&ni); NDFREE(&ni, NDF_ONLY_PNBUF); /* @@ -393,7 +391,6 @@ linux_uselib(struct thread *td, struct l */ locked = 0; VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); /* * Check if file_offset page aligned. Currently we cannot handle @@ -463,10 +460,8 @@ linux_uselib(struct thread *td, struct l cleanup: /* Unlock vnode if needed */ - if (locked) { + if (locked) VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); - } /* Release the temporary mapping. */ if (a_out) Modified: user/andre/tcp_workqueue/sys/compat/ndis/subr_ndis.c ============================================================================== --- user/andre/tcp_workqueue/sys/compat/ndis/subr_ndis.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/compat/ndis/subr_ndis.c Tue Oct 23 09:59:46 2012 (r241924) @@ -2741,7 +2741,7 @@ NdisOpenFile(status, filehandle, filelen char *afilename = NULL; struct thread *td = curthread; struct nameidata nd; - int flags, error, vfslocked; + int flags, error; struct vattr vat; struct vattr *vap = &vat; ndis_fh *fh; @@ -2821,7 +2821,7 @@ NdisOpenFile(status, filehandle, filelen if (td->td_proc->p_fd->fd_cdir == NULL) td->td_proc->p_fd->fd_cdir = rootvnode; - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, path, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, td); flags = FREAD; error = vn_open(&nd, &flags, 0, NULL); @@ -2833,7 +2833,6 @@ NdisOpenFile(status, filehandle, filelen free(afilename, M_DEVBUF); return; } - vfslocked = NDHASGIANT(&nd); ExFreePool(path); @@ -2842,7 +2841,6 @@ NdisOpenFile(status, filehandle, filelen /* Get the file size. */ VOP_GETATTR(nd.ni_vp, vap, td->td_ucred); VOP_UNLOCK(nd.ni_vp, 0); - VFS_UNLOCK_GIANT(vfslocked); fh->nf_vp = nd.ni_vp; fh->nf_map = NULL; @@ -2862,7 +2860,7 @@ NdisMapFile(status, mappedbuffer, fileha struct thread *td = curthread; linker_file_t lf; caddr_t kldstart; - int error, vfslocked; + int error; ssize_t resid; struct vnode *vp; @@ -2903,10 +2901,8 @@ NdisMapFile(status, mappedbuffer, fileha } vp = fh->nf_vp; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); error = vn_rdwr(UIO_READ, vp, fh->nf_map, fh->nf_maplen, 0, UIO_SYSSPACE, 0, td->td_ucred, NOCRED, &resid, td); - VFS_UNLOCK_GIANT(vfslocked); if (error) *status = NDIS_STATUS_FAILURE; @@ -2937,7 +2933,6 @@ NdisCloseFile(filehandle) { struct thread *td = curthread; ndis_fh *fh; - int vfslocked; struct vnode *vp; if (filehandle == NULL) @@ -2955,9 +2950,7 @@ NdisCloseFile(filehandle) if (fh->nf_type == NDIS_FH_TYPE_VFS) { vp = fh->nf_vp; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_close(vp, FREAD, td->td_ucred, td); - VFS_UNLOCK_GIANT(vfslocked); } fh->nf_vp = NULL; Modified: user/andre/tcp_workqueue/sys/compat/svr4/svr4_misc.c ============================================================================== --- user/andre/tcp_workqueue/sys/compat/svr4/svr4_misc.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/compat/svr4/svr4_misc.c Tue Oct 23 09:59:46 2012 (r241924) @@ -241,7 +241,7 @@ svr4_sys_getdents64(td, uap) struct iovec aiov; off_t off; struct svr4_dirent64 svr4_dirent; - int buflen, error, eofflag, nbytes, justone, vfslocked; + int buflen, error, eofflag, nbytes, justone; u_long *cookies = NULL, *cookiep; int ncookies; @@ -258,9 +258,7 @@ svr4_sys_getdents64(td, uap) } vp = fp->f_vnode; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (vp->v_type != VDIR) { - VFS_UNLOCK_GIANT(vfslocked); fdrop(fp, td); return (EINVAL); } @@ -397,7 +395,6 @@ eof: td->td_retval[0] = nbytes - resid; out: VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); fdrop(fp, td); if (cookies) free(cookies, M_TEMP); @@ -422,7 +419,7 @@ svr4_sys_getdents(td, uap) struct iovec aiov; struct svr4_dirent idb; off_t off; /* true file offset */ - int buflen, error, eofflag, vfslocked; + int buflen, error, eofflag; u_long *cookiebuf = NULL, *cookie; int ncookies = 0, *retval = td->td_retval; @@ -439,9 +436,7 @@ svr4_sys_getdents(td, uap) } vp = fp->f_vnode; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (vp->v_type != VDIR) { - VFS_UNLOCK_GIANT(vfslocked); fdrop(fp, td); return (EINVAL); } @@ -534,7 +529,6 @@ eof: *retval = uap->nbytes - resid; out: VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); fdrop(fp, td); if (cookiebuf) free(cookiebuf, M_TEMP); @@ -614,7 +608,7 @@ svr4_sys_fchroot(td, uap) struct filedesc *fdp = td->td_proc->p_fd; struct vnode *vp; struct file *fp; - int error, vfslocked; + int error; if ((error = priv_check(td, PRIV_VFS_FCHROOT)) != 0) return error; @@ -624,7 +618,6 @@ svr4_sys_fchroot(td, uap) vp = fp->f_vnode; VREF(vp); fdrop(fp, td); - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = change_dir(vp, td); if (error) @@ -637,11 +630,9 @@ svr4_sys_fchroot(td, uap) VOP_UNLOCK(vp, 0); error = change_root(vp, td); vrele(vp); - VFS_UNLOCK_GIANT(vfslocked); return (error); fail: vput(vp); - VFS_UNLOCK_GIANT(vfslocked); return (error); } @@ -1652,13 +1643,12 @@ svr4_sys_resolvepath(td, uap) int error, *retval = td->td_retval; unsigned int ncopy; - NDINIT(&nd, LOOKUP, NOFOLLOW | SAVENAME | MPSAFE, UIO_USERSPACE, + NDINIT(&nd, LOOKUP, NOFOLLOW | SAVENAME, UIO_USERSPACE, uap->path, td); if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_NO_FREE_PNBUF); - VFS_UNLOCK_GIANT(NDHASGIANT(&nd)); ncopy = min(uap->bufsiz, strlen(nd.ni_cnd.cn_pnbuf) + 1); if ((error = copyout(nd.ni_cnd.cn_pnbuf, uap->buf, ncopy)) != 0) Modified: user/andre/tcp_workqueue/sys/conf/NOTES ============================================================================== --- user/andre/tcp_workqueue/sys/conf/NOTES Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/conf/NOTES Tue Oct 23 09:59:46 2012 (r241924) @@ -1088,9 +1088,6 @@ options REISERFS # unsuitable for inclusion on machines with untrusted local users. options VFS_AIO -# Enable mounting of non-MPSAFE filesystems. -options VFS_ALLOW_NONMPSAFE - # Cryptographically secure random number generator; /dev/random device random Modified: user/andre/tcp_workqueue/sys/conf/options ============================================================================== --- user/andre/tcp_workqueue/sys/conf/options Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/conf/options Tue Oct 23 09:59:46 2012 (r241924) @@ -188,7 +188,6 @@ SW_WATCHDOG opt_watchdog.h TURNSTILE_PROFILING UMTX_PROFILING VFS_AIO -VFS_ALLOW_NONMPSAFE VERBOSE_SYSINIT opt_global.h WLCACHE opt_wavelan.h WLDEBUG opt_wavelan.h Modified: user/andre/tcp_workqueue/sys/dev/e1000/if_lem.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/e1000/if_lem.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/dev/e1000/if_lem.c Tue Oct 23 09:59:46 2012 (r241924) @@ -390,11 +390,6 @@ lem_attach(device_t dev) INIT_DEBUGOUT("lem_attach: begin"); - if (resource_disabled("lem", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; EM_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); Modified: user/andre/tcp_workqueue/sys/dev/etherswitch/arswitch/arswitch_reg.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/etherswitch/arswitch/arswitch_reg.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/dev/etherswitch/arswitch/arswitch_reg.c Tue Oct 23 09:59:46 2012 (r241924) @@ -72,10 +72,17 @@ arswitch_split_setpage(device_t dev, uin *phy = (((addr) >> 6) & 0x07) | 0x10; *reg = ((addr) >> 1) & 0x1f; - if (sc->page != page) { - MDIO_WRITEREG(device_get_parent(dev), 0x18, 0, page); - sc->page = page; - } + /* + * The earlier code would only switch the page + * over if the page were different. Experiments have + * shown that this is unstable. + * + * Hence, the page is always set here. + * + * See PR kern/172968 + */ + MDIO_WRITEREG(device_get_parent(dev), 0x18, 0, page); + sc->page = page; } /* Modified: user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_mod.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_mod.c Tue Oct 23 09:59:46 2012 (r241924) @@ -1632,7 +1632,6 @@ pmc_log_kernel_mappings(struct pmc *pm) static void pmc_log_process_mappings(struct pmc_owner *po, struct proc *p) { - int locked; vm_map_t map; struct vnode *vp; struct vmspace *vm; @@ -1742,9 +1741,7 @@ pmc_log_process_mappings(struct pmc_owne pmc_getfilename(vp, &fullpath, &freepath); last_vp = vp; - locked = VFS_LOCK_GIANT(vp->v_mount); vrele(vp); - VFS_UNLOCK_GIANT(locked); vp = NULL; pmclog_process_map_in(po, p->p_pid, start_addr, fullpath); Modified: user/andre/tcp_workqueue/sys/dev/ixgbe/ixgbe.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ixgbe/ixgbe.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/dev/ixgbe/ixgbe.c Tue Oct 23 09:59:46 2012 (r241924) @@ -401,11 +401,6 @@ ixgbe_attach(device_t dev) INIT_DEBUGOUT("ixgbe_attach: begin"); - if (resource_disabled("ixgbe", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - /* Allocate, clear, and link in our adapter structure */ adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; Modified: user/andre/tcp_workqueue/sys/dev/ixgbe/ixv.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ixgbe/ixv.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/dev/ixgbe/ixv.c Tue Oct 23 09:59:46 2012 (r241924) @@ -299,11 +299,6 @@ ixv_attach(device_t dev) INIT_DEBUGOUT("ixv_attach: begin"); - if (resource_disabled("ixgbe", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - /* Allocate, clear, and link in our adapter structure */ adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; Modified: user/andre/tcp_workqueue/sys/dev/md/md.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/md/md.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/dev/md/md.c Tue Oct 23 09:59:46 2012 (r241924) @@ -512,7 +512,7 @@ mdstart_preload(struct md_s *sc, struct static int mdstart_vnode(struct md_s *sc, struct bio *bp) { - int error, vfslocked; + int error; struct uio auio; struct iovec aiov; struct mount *mp; @@ -542,13 +542,11 @@ mdstart_vnode(struct md_s *sc, struct bi */ if (bp->bio_cmd == BIO_FLUSH) { - vfslocked = VFS_LOCK_GIANT(vp->v_mount); (void) vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(vp, MNT_WAIT, td); VOP_UNLOCK(vp, 0); vn_finished_write(mp); - VFS_UNLOCK_GIANT(vfslocked); return (error); } @@ -570,7 +568,6 @@ mdstart_vnode(struct md_s *sc, struct bi auio.uio_rw = UIO_WRITE; auio.uio_td = td; end = bp->bio_offset + bp->bio_length; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); (void) vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = 0; @@ -588,7 +585,6 @@ mdstart_vnode(struct md_s *sc, struct bi VOP_UNLOCK(vp, 0); vn_finished_write(mp); bp->bio_resid = end - auio.uio_offset; - VFS_UNLOCK_GIANT(vfslocked); return (error); } @@ -610,7 +606,6 @@ mdstart_vnode(struct md_s *sc, struct bi * When reading set IO_DIRECT to try to avoid double-caching * the data. When writing IO_DIRECT is not optimal. */ - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (bp->bio_cmd == BIO_READ) { vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_READ(vp, &auio, IO_DIRECT, sc->cred); @@ -623,7 +618,6 @@ mdstart_vnode(struct md_s *sc, struct bi VOP_UNLOCK(vp, 0); vn_finished_write(mp); } - VFS_UNLOCK_GIANT(vfslocked); bp->bio_resid = auio.uio_resid; return (error); } @@ -957,7 +951,7 @@ mdcreate_vnode(struct md_s *sc, struct m struct vattr vattr; struct nameidata nd; char *fname; - int error, flags, vfslocked; + int error, flags; /* * Kernel-originated requests must have the filename appended @@ -976,11 +970,10 @@ mdcreate_vnode(struct md_s *sc, struct m * set the FWRITE mask before trying to open the backing store. */ flags = FREAD | ((mdio->md_options & MD_READONLY) ? 0 : FWRITE); - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, sc->file, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, sc->file, td); error = vn_open(&nd, &flags, 0, NULL); if (error != 0) return (error); - vfslocked = NDHASGIANT(&nd); NDFREE(&nd, NDF_ONLY_PNBUF); if (nd.ni_vp->v_type != VREG) { error = EINVAL; @@ -1016,19 +1009,16 @@ mdcreate_vnode(struct md_s *sc, struct m nd.ni_vp->v_vflag &= ~VV_MD; goto bad; } - VFS_UNLOCK_GIANT(vfslocked); return (0); bad: VOP_UNLOCK(nd.ni_vp, 0); (void)vn_close(nd.ni_vp, flags, td->td_ucred, td); - VFS_UNLOCK_GIANT(vfslocked); return (error); } static int mddestroy(struct md_s *sc, struct thread *td) { - int vfslocked; if (sc->gp) { sc->gp->softc = NULL; @@ -1050,13 +1040,11 @@ mddestroy(struct md_s *sc, struct thread mtx_unlock(&sc->queue_mtx); mtx_destroy(&sc->queue_mtx); if (sc->vnode != NULL) { - vfslocked = VFS_LOCK_GIANT(sc->vnode->v_mount); vn_lock(sc->vnode, LK_EXCLUSIVE | LK_RETRY); sc->vnode->v_vflag &= ~VV_MD; VOP_UNLOCK(sc->vnode, 0); (void)vn_close(sc->vnode, sc->flags & MD_READONLY ? FREAD : (FREAD|FWRITE), sc->cred, td); - VFS_UNLOCK_GIANT(vfslocked); } if (sc->cred != NULL) crfree(sc->cred); Modified: user/andre/tcp_workqueue/sys/dev/nand/nandsim_swap.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/nand/nandsim_swap.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/dev/nand/nandsim_swap.c Tue Oct 23 09:59:46 2012 (r241924) @@ -142,9 +142,9 @@ static int swap_file_open(struct chip_swap *swap, const char *swap_file) { struct nameidata nd; - int vfslocked, flags, error; + int flags, error; - NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, swap_file, + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, swap_file, curthread); flags = FWRITE | FREAD | O_NOFOLLOW | O_CREAT | O_TRUNC; @@ -157,12 +157,10 @@ swap_file_open(struct chip_swap *swap, c } swap->swap_cred = crhold(curthread->td_ucred); - vfslocked = NDHASGIANT(&nd); NDFREE(&nd, NDF_ONLY_PNBUF); /* We just unlock so we hold a reference */ VOP_UNLOCK(nd.ni_vp, 0); - VFS_UNLOCK_GIANT(vfslocked); swap->swap_vp = nd.ni_vp; @@ -192,7 +190,6 @@ swap_file_write(struct chip_swap *swap, struct vnode *vp; struct uio auio; struct iovec aiov; - int vfslocked; if (swap == NULL || blk_state == NULL) return (-1); @@ -222,13 +219,11 @@ swap_file_write(struct chip_swap *swap, auio.uio_resid = swap->blk_size; auio.uio_td = td; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); VOP_WRITE(vp, &auio, IO_UNIT, swap->swap_cred); VOP_UNLOCK(vp, 0); vn_finished_write(mp); - VFS_UNLOCK_GIANT(vfslocked); return (0); } @@ -241,7 +236,6 @@ swap_file_read(struct chip_swap *swap, s struct vnode *vp; struct uio auio; struct iovec aiov; - int vfslocked; if (swap == NULL || blk_state == NULL) return (-1); @@ -267,11 +261,9 @@ swap_file_read(struct chip_swap *swap, s auio.uio_resid = swap->blk_size; auio.uio_td = td; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); VOP_READ(vp, &auio, 0, swap->swap_cred); VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); return (0); } Modified: user/andre/tcp_workqueue/sys/dev/sound/pci/emu10kx.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/sound/pci/emu10kx.c Tue Oct 23 08:33:13 2012 (r241923) +++ user/andre/tcp_workqueue/sys/dev/sound/pci/emu10kx.c Tue Oct 23 09:59:46 2012 (r241924) @@ -3050,11 +3050,6 @@ emu_pci_attach(device_t dev) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Oct 23 14:18:50 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1B8AD72; Tue, 23 Oct 2012 14:18:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id B176C8FC12; Tue, 23 Oct 2012 14:18:50 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 16162B946; Tue, 23 Oct 2012 10:18:50 -0400 (EDT) From: John Baldwin To: Andre Oppermann Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... Date: Tue, 23 Oct 2012 08:53:56 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210221418.q9MEINkr026751@svn.freebsd.org> <20121023032743.K2804@besplex.bde.org> <508664C7.3080206@freebsd.org> In-Reply-To: <508664C7.3080206@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210230853.56549.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 23 Oct 2012 10:18:50 -0400 (EDT) Cc: src-committers@freebsd.org, Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 14:18:51 -0000 On Tuesday, October 23, 2012 5:35:03 am Andre Oppermann wrote: > On 22.10.2012 19:10, Bruce Evans wrote: > > On Mon, 22 Oct 2012, Andre Oppermann wrote: > > > >> Log: > >> Second pass at making global mutexes use MTX_DEF_SYSINIT(). > > > >> Modified: user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c > >> ============================================================================== > >> --- user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Mon Oct 22 14:10:17 2012 (r241888) > >> +++ user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Mon Oct 22 14:18:22 2012 (r241889) > >> @@ -163,9 +163,7 @@ static TAILQ_HEAD(,bus_dmamap) dmamap_fr > >> #define BUSDMA_STATIC_MAPS 500 > >> static struct bus_dmamap map_pool[BUSDMA_STATIC_MAPS]; > >> > >> -static struct mtx busdma_mtx; > >> - > >> -MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF); > >> +static MTX_DEF_SYSINIT(busdma_mtx, "busdma lock", MTX_DEF); > > > > The verboser (sic) name is uglier. > > > > But once it says DEF, the arg list shouldn't say DEF. Either this is > > DEF for something unrelated to MTX_DEF, in which case it is confusing > > and the confusion is made worse by having MTX_ precede DEF in both, > > or it is the same DEF and the arg is redundant, or it implies MTX_DEF > > by default but this can be changed, in which case it is confusing. > > You're right, it is a bit confusing. However the DEF in MTX_DEF_SYSINIT > stands for DEFining the global variable whereas MTX_DEF stands for a > default type mutex. > > Unfortunately I couldn't come up with a bette short name for MTX_DEF_SYSINIT. > I'm open for suggestions though. It's not super clear to me that having one macro to replace 'struct mtx and MTX_SYSINIT' is substantially more readable compared to just adding '__aligned(CACHE_LINE_SIZE)' at the end of global locks. Note, btw, that I have local patches to make mtx_pool's use aligned mutexes, but they have never shown a performance improvement in real-word benchmarks (granted, the last set of benchmarks were run several years ago (the patches are old) by kris@). OTOH, alc@ found a measurable boost by aligning a few global mutexes in the VM system. -- John Baldwin From owner-svn-src-user@FreeBSD.ORG Tue Oct 23 14:39:46 2012 Return-Path: Delivered-To: svn-src-user@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B70CAAC8; Tue, 23 Oct 2012 14:39:46 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 29B4E8FC0C; Tue, 23 Oct 2012 14:39:45 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9NEdi9P086121; Tue, 23 Oct 2012 18:39:44 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9NEdiSU086120; Tue, 23 Oct 2012 18:39:44 +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, 23 Oct 2012 18:39:44 +0400 From: Gleb Smirnoff To: John Baldwin Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... Message-ID: <20121023143944.GW70741@FreeBSD.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <20121023032743.K2804@besplex.bde.org> <508664C7.3080206@freebsd.org> <201210230853.56549.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201210230853.56549.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.org, Andre Oppermann , Bruce Evans , svn-src-user@FreeBSD.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 14:39:46 -0000 On Tue, Oct 23, 2012 at 08:53:56AM -0400, John Baldwin wrote: J> It's not super clear to me that having one macro to replace J> 'struct mtx and MTX_SYSINIT' is substantially more readable compared to just J> adding '__aligned(CACHE_LINE_SIZE)' at the end of global locks. +1 for this -- Totus tuus, Glebius. From owner-svn-src-user@FreeBSD.ORG Tue Oct 23 14:41:36 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A8E4CC23 for ; Tue, 23 Oct 2012 14:41:36 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 1290C8FC0A for ; Tue, 23 Oct 2012 14:41:35 +0000 (UTC) Received: (qmail 85953 invoked from network); 23 Oct 2012 16:19:35 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 23 Oct 2012 16:19:35 -0000 Message-ID: <5086AC94.2090700@freebsd.org> Date: Tue, 23 Oct 2012 16:41:24 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... References: <201210221418.q9MEINkr026751@svn.freebsd.org> <20121023032743.K2804@besplex.bde.org> <508664C7.3080206@freebsd.org> <201210230853.56549.jhb@freebsd.org> In-Reply-To: <201210230853.56549.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 14:41:36 -0000 On 23.10.2012 14:53, John Baldwin wrote: > On Tuesday, October 23, 2012 5:35:03 am Andre Oppermann wrote: >> On 22.10.2012 19:10, Bruce Evans wrote: >>> On Mon, 22 Oct 2012, Andre Oppermann wrote: >>> >>>> Log: >>>> Second pass at making global mutexes use MTX_DEF_SYSINIT(). >>> >>>> Modified: user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c >>>> ============================================================================== >>>> --- user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Mon Oct 22 14:10:17 2012 (r241888) >>>> +++ user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Mon Oct 22 14:18:22 2012 (r241889) >>>> @@ -163,9 +163,7 @@ static TAILQ_HEAD(,bus_dmamap) dmamap_fr >>>> #define BUSDMA_STATIC_MAPS 500 >>>> static struct bus_dmamap map_pool[BUSDMA_STATIC_MAPS]; >>>> >>>> -static struct mtx busdma_mtx; >>>> - >>>> -MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF); >>>> +static MTX_DEF_SYSINIT(busdma_mtx, "busdma lock", MTX_DEF); >>> >>> The verboser (sic) name is uglier. >>> >>> But once it says DEF, the arg list shouldn't say DEF. Either this is >>> DEF for something unrelated to MTX_DEF, in which case it is confusing >>> and the confusion is made worse by having MTX_ precede DEF in both, >>> or it is the same DEF and the arg is redundant, or it implies MTX_DEF >>> by default but this can be changed, in which case it is confusing. >> >> You're right, it is a bit confusing. However the DEF in MTX_DEF_SYSINIT >> stands for DEFining the global variable whereas MTX_DEF stands for a >> default type mutex. >> >> Unfortunately I couldn't come up with a bette short name for MTX_DEF_SYSINIT. >> I'm open for suggestions though. > > It's not super clear to me that having one macro to replace > 'struct mtx and MTX_SYSINIT' is substantially more readable compared to just > adding '__aligned(CACHE_LINE_SIZE)' at the end of global locks. Struct mtx and MTX_SYSINIT always occur as pair next to each other. It's simpler to have merged into one macro. Instead of adding the __aligned() to ever instance it simpler to have it in one place. That way it also can be globally disabled if undesired. > Note, btw, that I have local patches to make mtx_pool's use aligned mutexes, > but they have never shown a performance improvement in real-word benchmarks > (granted, the last set of benchmarks were run several years ago (the patches > are old) by kris@). OTOH, alc@ found a measurable boost by aligning a few > global mutexes in the VM system. Ideally the alignment doesn't show any difference to today's baseline. There have been reports (in private) that random changes to the .bss ordering have caused large drops in measured network performance. With the alignment we gain the confidence that important mutexes do not end up on the same cacheline either due to placement in the source code nor through changes in .bss ordering. -- Andre From owner-svn-src-user@FreeBSD.ORG Tue Oct 23 19:20:51 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 42F147E7; Tue, 23 Oct 2012 19:20:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0415F8FC1A; Tue, 23 Oct 2012 19:20:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9NJKolx038902; Tue, 23 Oct 2012 19:20:50 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NJKo4U038900; Tue, 23 Oct 2012 19:20:50 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210231920.q9NJKo4U038900@svn.freebsd.org> From: Eitan Adler Date: Tue, 23 Oct 2012 19:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241965 - user/crees/rclint X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 19:20:51 -0000 Author: eadler Date: Tue Oct 23 19:20:50 2012 New Revision: 241965 URL: http://svn.freebsd.org/changeset/base/241965 Log: Make this work with python 3 Modified: user/crees/rclint/rclint.py Modified: user/crees/rclint/rclint.py ============================================================================== --- user/crees/rclint/rclint.py Tue Oct 23 19:17:43 2012 (r241964) +++ user/crees/rclint/rclint.py Tue Oct 23 19:20:50 2012 (r241965) @@ -65,9 +65,9 @@ class Db: if err: logging.error('[%d]: %s ' % (num+1, err)) if verbosity > 0: - print textwrap.fill(self.explanation(key), + print(textwrap.fill(self.explanation(key), initial_indent='==> ', - subsequent_indent=' ') + subsequent_indent=' ')) else: logging.error('No such error: %s' % key) @@ -202,7 +202,7 @@ class Function: return True if self.length <= 1 else False def linenumbers(self): - return range(self.line, self.line+self.length+3) + return list(range(self.line, self.line+self.length+3)) def contains_line(self, line): return True if line in self.linenumbers() else False @@ -220,7 +220,7 @@ def do_rclint(filename): 'Statement': []} for num in range(0, len(lines)): - for obj in lineobj.keys(): + for obj in list(lineobj.keys()): tmp = eval(obj)(lines[num], num) if tmp.value != False: lineobj[obj].append(tmp) @@ -282,7 +282,7 @@ def do_rclint(filename): error.give('file_order', 0) logging.debug('Checking all lines are accounted for') - for obj in lineobj.keys(): + for obj in list(lineobj.keys()): for o in lineobj[obj]: linenumbers.append(o.line) for r in range(0, len(lines)): @@ -358,5 +358,5 @@ error = Db('errors', args.language[0]) # problem = Db('problems', args.language[0]) for f in args.filenames: - print('Checking %s' % f) + print(('Checking %s' % f)) do_rclint(f) From owner-svn-src-user@FreeBSD.ORG Tue Oct 23 19:26:49 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC16E988; Tue, 23 Oct 2012 19:26:49 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC0C68FC12; Tue, 23 Oct 2012 19:26:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9NJQnZ7039912; Tue, 23 Oct 2012 19:26:49 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NJQnqu039908; Tue, 23 Oct 2012 19:26:49 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210231926.q9NJQnqu039908@svn.freebsd.org> From: Andre Oppermann Date: Tue, 23 Oct 2012 19:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241966 - user/andre/tcp_workqueue/sys/net X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 19:26:50 -0000 Author: andre Date: Tue Oct 23 19:26:49 2012 New Revision: 241966 URL: http://svn.freebsd.org/changeset/base/241966 Log: Extend PFIL hooks with explicit hook ordering and reinjecting of packets into the chain after a particular hook. Add pfil_add_hook_order() taking a numerical value between 0-255 to specify the relative position of this hook in the list of all hooks. Lower numbers have higher ordering (ie. will run first). Within a particular order value the last added will be the first to run. Three fixed positions are defined: PFIL_ORDER_FIRST 0 PFIL_ORDER_DEFAULT 200 PFIL_ORDER_LAST 255 Previously the order was non-deterministic and dependent on the ordering of the add hook calls. The last added would always become the first to run. Non-ordering aware pfil consumers using the pfil_add_hook() call get PFIL_ORDER_DEFAULT assigned resulting in the previous ordering. The ordering is determined at hookup time by the pfil consumer and no tool for later manual re-ordering is provided. Most well known pfil consumers are expected to have a predetermined preferred position in the order. A tool or sysctl reporting the order of hooked pfil consumers will be provided later. Add pfil_run_inject() taking an opaque cookie value obtained with pfil_get_cookie() after the hook is added. Processing of the hook chain skips all hooks until after the one with the same cookie. The cookie is valid as long as this hook remains hooked. If no cookie is found processing is started with the first hook again. If the cookie is invalid processing of all hooks is effectively skipped. With this pfil hooks consumers can dequeue packets for further processing and later re-inject them with the next hook. Modified: user/andre/tcp_workqueue/sys/net/pfil.c user/andre/tcp_workqueue/sys/net/pfil.h Modified: user/andre/tcp_workqueue/sys/net/pfil.c ============================================================================== --- user/andre/tcp_workqueue/sys/net/pfil.c Tue Oct 23 19:20:50 2012 (r241965) +++ user/andre/tcp_workqueue/sys/net/pfil.c Tue Oct 23 19:26:49 2012 (r241966) @@ -49,7 +49,8 @@ static MTX_DEF_SYSINIT(pfil_global_lock, "pfil_head_list lock", MTX_DEF); -static int pfil_list_add(pfil_list_t *, struct packet_filter_hook *, int); +static int pfil_list_add(pfil_list_t *, struct packet_filter_hook *, int, + uint8_t); static int pfil_list_remove(pfil_list_t *, int (*)(void *, struct mbuf **, struct ifnet *, int, struct inpcb *), @@ -63,11 +64,22 @@ VNET_DEFINE(struct rmlock, pfil_lock); /* * pfil_run_hooks() runs the specified packet filter hooks. + * + * The cookie, if set, skips all hooks before the hook with + * the same cookie and continues with the next hook after it. */ int pfil_run_hooks(struct pfil_head *ph, struct mbuf **mp, struct ifnet *ifp, int dir, struct inpcb *inp) { + + return (pfil_run_inject(ph, mp, ifp, dir, inp, 0)); +} + +int +pfil_run_inject(struct pfil_head *ph, struct mbuf **mp, struct ifnet *ifp, + int dir, struct inpcb *inp, int cookie) +{ struct rm_priotracker rmpt; struct packet_filter_hook *pfh; struct mbuf *m = *mp; @@ -77,6 +89,12 @@ pfil_run_hooks(struct pfil_head *ph, str KASSERT(ph->ph_nhooks >= 0, ("Pfil hook count dropped < 0")); for (pfh = pfil_hook_get(dir, ph); pfh != NULL; pfh = TAILQ_NEXT(pfh, pfil_link)) { + if (cookie != 0) { + /* Continue on the next hook. */ + if (pfh->pfil_cookie == cookie) + cookie = 0; + continue; + } if (pfh->pfil_func != NULL) { rv = (*pfh->pfil_func)(pfh->pfil_arg, &m, ifp, dir, inp); @@ -213,11 +231,21 @@ pfil_head_get(int type, u_long val) * PFIL_OUT call me on outgoing packets * PFIL_ALL call me on all of the above * PFIL_WAITOK OK to call malloc with M_WAITOK. + * + * The cookie is simply is a random value that should be unique. */ int pfil_add_hook(int (*func)(void *, struct mbuf **, struct ifnet *, int, struct inpcb *), void *arg, int flags, struct pfil_head *ph) { + + return (pfil_add_hook_order(func, arg, flags, PFIL_ORDER_DEFAULT, ph)); +} + +int +pfil_add_hook_order(int (*func)(void *, struct mbuf **, struct ifnet *, int, + struct inpcb *), void *arg, int flags, uint8_t order, struct pfil_head *ph) +{ struct packet_filter_hook *pfh1 = NULL; struct packet_filter_hook *pfh2 = NULL; int err; @@ -229,6 +257,10 @@ pfil_add_hook(int (*func)(void *, struct err = ENOMEM; goto error; } + pfh1->pfil_func = func; + pfh1->pfil_arg = arg; + pfh1->pfil_cookie = (int)random(); + pfh1->pfil_order = order; } if (flags & PFIL_OUT) { pfh2 = (struct packet_filter_hook *)malloc(sizeof(*pfh1), @@ -237,20 +269,20 @@ pfil_add_hook(int (*func)(void *, struct err = ENOMEM; goto error; } + pfh2->pfil_func = func; + pfh2->pfil_arg = arg; + pfh2->pfil_cookie = (int)random(); + pfh2->pfil_order = order; } PFIL_WLOCK(ph); if (flags & PFIL_IN) { - pfh1->pfil_func = func; - pfh1->pfil_arg = arg; - err = pfil_list_add(&ph->ph_in, pfh1, flags & ~PFIL_OUT); + err = pfil_list_add(&ph->ph_in, pfh1, flags & ~PFIL_OUT, order); if (err) goto locked_error; ph->ph_nhooks++; } if (flags & PFIL_OUT) { - pfh2->pfil_func = func; - pfh2->pfil_arg = arg; - err = pfil_list_add(&ph->ph_out, pfh2, flags & ~PFIL_IN); + err = pfil_list_add(&ph->ph_out, pfh2, flags & ~PFIL_IN, order); if (err) { if (flags & PFIL_IN) pfil_list_remove(&ph->ph_in, func, arg); @@ -295,8 +327,35 @@ pfil_remove_hook(int (*func)(void *, str return (err); } +int +pfil_get_cookie(int (*func)(void *, struct mbuf **, struct ifnet *, int, + struct inpcb *), void *arg, int flags, struct pfil_head *ph) +{ + pfil_list_t *list; + struct packet_filter_hook *pfh; + struct rm_priotracker tracker; + int cookie = 0; + + PFIL_RLOCK(ph, &tracker); + if (flags & PFIL_IN) + list = &ph->ph_in; + else if (flags & PFIL_OUT) + list = &ph->ph_out; + else + goto out; + + TAILQ_FOREACH(pfh, list, pfil_link) + if (pfh->pfil_func == func && + pfh->pfil_arg == arg) + cookie = pfh->pfil_cookie; +out: + PFIL_RUNLOCK(ph, &tracker); + return (cookie); +} + static int -pfil_list_add(pfil_list_t *list, struct packet_filter_hook *pfh1, int flags) +pfil_list_add(pfil_list_t *list, struct packet_filter_hook *pfh1, int flags, + uint8_t order) { struct packet_filter_hook *pfh; @@ -312,10 +371,24 @@ pfil_list_add(pfil_list_t *list, struct * Insert the input list in reverse order of the output list so that * the same path is followed in or out of the kernel. */ - if (flags & PFIL_IN) - TAILQ_INSERT_HEAD(list, pfh1, pfil_link); - else - TAILQ_INSERT_TAIL(list, pfh1, pfil_link); + if (flags & PFIL_IN) { + TAILQ_FOREACH(pfh, list, pfil_link) { + if (pfh->pfil_order <= order) + break; + } + if (pfh == NULL) + TAILQ_INSERT_HEAD(list, pfh1, pfil_link); + else + TAILQ_INSERT_BEFORE(pfh, pfh1, pfil_link); + } else { + TAILQ_FOREACH_REVERSE(pfh, list, pfil_list, pfil_link) + if (pfh->pfil_order >= order) + break; + if (pfh == NULL) + TAILQ_INSERT_TAIL(list, pfh1, pfil_link); + else + TAILQ_INSERT_AFTER(list, pfh, pfh1, pfil_link); + } return (0); } Modified: user/andre/tcp_workqueue/sys/net/pfil.h ============================================================================== --- user/andre/tcp_workqueue/sys/net/pfil.h Tue Oct 23 19:20:50 2012 (r241965) +++ user/andre/tcp_workqueue/sys/net/pfil.h Tue Oct 23 19:26:49 2012 (r241966) @@ -52,8 +52,14 @@ struct packet_filter_hook { int (*pfil_func)(void *, struct mbuf **, struct ifnet *, int, struct inpcb *); void *pfil_arg; + int pfil_cookie; + uint8_t pfil_order; }; +#define PFIL_ORDER_FIRST 0 +#define PFIL_ORDER_DEFAULT 200 +#define PFIL_ORDER_LAST 255 + #define PFIL_IN 0x00000001 #define PFIL_OUT 0x00000002 #define PFIL_WAITOK 0x00000004 @@ -89,10 +95,16 @@ struct pfil_head { int pfil_add_hook(int (*func)(void *, struct mbuf **, struct ifnet *, int, struct inpcb *), void *, int, struct pfil_head *); +int pfil_add_hook_order(int (*func)(void *, struct mbuf **, struct ifnet *, + int, struct inpcb *), void *, int, uint8_t, struct pfil_head *); +int pfil_get_cookie(int (*func)(void *, struct mbuf **, struct ifnet *, + int, struct inpcb *), void *, int, struct pfil_head *); int pfil_remove_hook(int (*func)(void *, struct mbuf **, struct ifnet *, int, struct inpcb *), void *, int, struct pfil_head *); int pfil_run_hooks(struct pfil_head *, struct mbuf **, struct ifnet *, int, struct inpcb *inp); +int pfil_run_inject(struct pfil_head *, struct mbuf **, struct ifnet *, + int, struct inpcb *inp, int cookie); struct rm_priotracker; /* Do not require including rmlock header */ int pfil_try_rlock(struct pfil_head *, struct rm_priotracker *); From owner-svn-src-user@FreeBSD.ORG Tue Oct 23 19:31:30 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA06BAD1 for ; Tue, 23 Oct 2012 19:31:30 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 41D5E8FC14 for ; Tue, 23 Oct 2012 19:31:29 +0000 (UTC) Received: (qmail 88567 invoked from network); 23 Oct 2012 21:09:26 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 23 Oct 2012 21:09:26 -0000 Message-ID: <5086F086.6080000@freebsd.org> Date: Tue, 23 Oct 2012 21:31:18 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r241966 - user/andre/tcp_workqueue/sys/net References: <201210231926.q9NJQnqu039908@svn.freebsd.org> In-Reply-To: <201210231926.q9NJQnqu039908@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 19:31:31 -0000 On 23.10.2012 21:26, Andre Oppermann wrote: > Author: andre > Date: Tue Oct 23 19:26:49 2012 > New Revision: 241966 > URL: http://svn.freebsd.org/changeset/base/241966 > > Log: > Extend PFIL hooks with explicit hook ordering and reinjecting of > packets into the chain after a particular hook. > > Add pfil_add_hook_order() taking a numerical value between 0-255 > to specify the relative position of this hook in the list of all > hooks. Lower numbers have higher ordering (ie. will run first). > Within a particular order value the last added will be the first > to run. Three fixed positions are defined: > PFIL_ORDER_FIRST 0 > PFIL_ORDER_DEFAULT 200 > PFIL_ORDER_LAST 255 > > Previously the order was non-deterministic and dependent on the > ordering of the add hook calls. The last added would always > become the first to run. > > Non-ordering aware pfil consumers using the pfil_add_hook() call > get PFIL_ORDER_DEFAULT assigned resulting in the previous ordering. > > The ordering is determined at hookup time by the pfil consumer > and no tool for later manual re-ordering is provided. Most well > known pfil consumers are expected to have a predetermined preferred > position in the order. A tool or sysctl reporting the order of > hooked pfil consumers will be provided later. > > Add pfil_run_inject() taking an opaque cookie value obtained with > pfil_get_cookie() after the hook is added. Processing of the hook > chain skips all hooks until after the one with the same cookie. > The cookie is valid as long as this hook remains hooked. If no > cookie is found processing is started with the first hook again. > If the cookie is invalid processing of all hooks is effectively > skipped. > > With this pfil hooks consumers can dequeue packets for further > processing and later re-inject them with the next hook. Besides the obvious ordering solution to the exiting pfil consumers my idea is to explore converting most of ether_input/output and IPsec processing to pfil hooks. This will need some further definitions for the default PFIL_ORDER points but that'll happen when there's some practical experimenting with running it. -- Andre From owner-svn-src-user@FreeBSD.ORG Tue Oct 23 20:29:50 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE64350D; Tue, 23 Oct 2012 20:29:50 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B67398FC18; Tue, 23 Oct 2012 20:29:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9NKTo95050727; Tue, 23 Oct 2012 20:29:50 GMT (envelope-from crees@svn.freebsd.org) Received: (from crees@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NKTofY050724; Tue, 23 Oct 2012 20:29:50 GMT (envelope-from crees@svn.freebsd.org) Message-Id: <201210232029.q9NKTofY050724@svn.freebsd.org> From: Chris Rees Date: Tue, 23 Oct 2012 20:29:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241968 - user/crees/rclint X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 20:29:50 -0000 Author: crees (ports committer) Date: Tue Oct 23 20:29:50 2012 New Revision: 241968 URL: http://svn.freebsd.org/changeset/base/241968 Log: Add simple Makefile for laziness Stop if errors cascade Add warn method for errors Check for empty assignments Add base/ports mode differentiation Added: user/crees/rclint/Makefile (contents, props changed) Modified: user/crees/rclint/errors.en user/crees/rclint/rclint.py Added: user/crees/rclint/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/crees/rclint/Makefile Tue Oct 23 20:29:50 2012 (r241968) @@ -0,0 +1,43 @@ +# $FreeBSD$ + +CP?= /bin/cp +CUT?= /usr/bin/cut +MKDIR?= /bin/mkdir +PYTHON?=/usr/bin/env python +RM?= /bin/rm +SCRIPT= rclint.py +SED?= /usr/bin/sed +TAR?= /usr/bin/tar + +VER!= ${PYTHON} ${SCRIPT} --version 2>&1 +.for V in ${VER} +VERSION?= ${V:C,^([^-]+).*,\1,} +.endfor +VERSION_MAJOR= ${VERSION:C,([0-9]+).*,\1,} +VERSION_MINOR= ${VERSION:C,[0-9]+\.([0-9]+).*,\1,} +VERSION_MICRO= ${VERSION:C,[0-9]+\.[0-9]+\.([0-9]+).*,\1,} + +FILES= ${SCRIPT} errors.en problems.en + +.PHONY: majorbump minorbump microbump release + +majorbump: + M=$$(expr ${VERSION_MAJOR} + 1); \ + ${SED} -i '' -e "s,^\(MAJOR = \).*,\1$$M," ${SCRIPT} + ${SED} -i '' -e "s,^\(MINOR = \).*,\10," ${SCRIPT} + ${SED} -i '' -e "s,^\(MICRO = \).*,\10," ${SCRIPT} + +minorbump: + M=$$(expr ${VERSION_MINOR} + 1); \ + ${SED} -i '' -e "s,^\(MINOR = \).*,\1$$M," ${SCRIPT} + ${SED} -i '' -e "s,^\(MICRO = \).*,\10," ${SCRIPT} + +microbump: + M=$$(expr ${VERSION_MICRO} + 1); \ + ${SED} -i '' -e "s,^\(MICRO = \).*,\1$$M," ${SCRIPT} + +tarball: + ${MKDIR} rclint-${VERSION} && \ + ${CP} ${FILES} rclint-${VERSION} && \ + ${TAR} cvfz rclint-${VERSION}.tar.gz rclint-${VERSION} && \ + ${RM} -rf rclint-${VERSION} Modified: user/crees/rclint/errors.en ============================================================================== --- user/crees/rclint/errors.en Tue Oct 23 19:47:07 2012 (r241967) +++ user/crees/rclint/errors.en Tue Oct 23 20:29:50 2012 (r241968) @@ -1,3 +1,4 @@ +# $FreeBSD$ # Rigid format of this file; tab-separated tuples to define # error messages and explanations. # Yes, tab isn't a great separator; alternatives that aren't @@ -7,16 +8,26 @@ error_id message explanation file_order Order of rc file incorrect Order of the rc file should be shebang/header/$FreeBSD$/sourcing rc_subr/name/rcvar/load_rc_config/setting defaults/setting other definitions/defining functions. Do not include unassociated shell commands, and blocks must be separated by single blank lines. Single blank lines may appear inside the defaults, definitions and functions blocks +functions_chown Useless use of chown? Using chown in functions can nearly always be replaced with appropriate use of install(1) +functions_inline_brace Inline brace in function Put the opening brace for a function ({) on its own line functions_neverending Unclosed function block Functions must end with a closing brace on its own line functions_problem Function incorrectly defined Functions should not have spaces in the definition functions_short One-line functions discouraged; put command directly in variable It is wasteful to write a function just for one command. It is possible to put commands directly inside declarations; name_prestart="install -d -o $name_user /var/run/$name" for example -orphaned_line Orphaned line Do not put unassociated shell commands inside rc scripts; put them inside functions +name_mismatch Mismatched filename/PROVIDE/$name Convention dictates that the filename, PROVIDE line and $name should be the same value + +orphaned_line Orphaned line Do not put unassociated shell commands inside rc scripts; put them inside functions. Normally they can go inside a start_precmd function rcorder_keyword_freebsd Do not include FreeBSD in the KEYWORD rcorder line Historically FreeBSD scripts were marked in the KEYWORD section. This is no longer necessary +rcorder_keyword_shutdown Persistent service? Needs shutdown KEYWORD Missing shutdown KEYWORD; if the script starts a service that is persistent, it should have KEYWORD: shutdown in rcorder block rcorder_order rcorder block in the wrong order; should be PROVIDE/REQUIRE/BEFORE/KEYWORD See the article on RC scripting + +rcsid Missing FreeBSD RCSId keyword All rc scripts must contain a line beginning # $FreeBSD$. Do not include blank lines without comment markers at the beginning (#) until the script begins + rcvar_incorrect rcvar is not set correctly rcvar must be directly set to name_enable. Do not quote, and do not use indirection; ${name}_enable is slower than example_enable +run_rc_argument Incorrect argument to run_rc_command The last line of the file should be run_rc_command $1 + shebang Incorrect shebang used All rc scripts must start with the correct shebang; #!/bin/sh variables_defaults_mandatory_colon Override blanks in mandatory values (:=/:- vs =/-) Values that must not be blank (such as _enable) should be set by default as ${var:=value}; thus disallowing blank values (man sh) @@ -24,17 +35,12 @@ variables_defaults_non_mandatory_colon D variables_defaults_old_style Prefer condensed version for setting default values of variables When setting the default value for a variable, it is much less verbose and clearer to use the : ${variable=var} notation, as well as it being obvious that the source and destination variable are the same variables_order Order of variables incorrect Order of the variables should be setting defaults then setting other variables +value_empty Empty variable assignment There is almost never a need to assign an empty value to a variable; sh does not require initialisation. This line can almost certainly be removed value_quoted Do not quote values unless necessary Unless there are spaces in the value, quotes are unnecessary. With the syntax ${variable=value}, value can even contain spaces and does not need quoting -rcvar_missing rcvar is set late or not at all Setting rcvar must be done straight after setting name -rcvar_quoted rcvar is quoted Do not quote the value of rcvar - -rcsid Missing FreeBSD RCSId keyword All rc scripts must contain a line beginning # $FreeBSD$. Do not include blank lines without comment markers at the beginning (#) until the script begins - -run_rc_argument Incorrect argument to run_rc_command The last line of the file should be run_rc_command $1 run_rc_followed run_rc_command line is not the last line in the file Do not write anything after the run_rc_command line run_rc_quoted Quoted argument to run_rc_command No need to quote the argument to run_rc_command Modified: user/crees/rclint/rclint.py ============================================================================== --- user/crees/rclint/rclint.py Tue Oct 23 19:47:07 2012 (r241967) +++ user/crees/rclint/rclint.py Tue Oct 23 20:29:50 2012 (r241968) @@ -28,7 +28,7 @@ __version__ = '$FreeBSD$' MAJOR = 0 MINOR = 0 -MICRO = 0 +MICRO = 1 DATADIR = '.' @@ -47,6 +47,8 @@ class Db: if not e or e[0] == '#': continue self._contents.append(e.split('\t')) + # Count the errors and bail if too many + self.count = 0 def _get(self, key, index): for c in self._contents: @@ -60,16 +62,27 @@ class Db: def explanation(self, key): return self._get(key, 2) - def give(self, key, num): + def give(self, key, num=-1, level='error'): err = self.error(key) if err: - logging.error('[%d]: %s ' % (num+1, err)) + if level == 'error': + logging.error('[%d]: %s ' % (num+1, err)) + if level == 'warn': + logging.warn('[%d]: %s ' % (num+1, err)) if verbosity > 0: print(textwrap.fill(self.explanation(key), initial_indent='==> ', subsequent_indent=' ')) else: logging.error('No such error: %s' % key) + self.count += 1 + if self.count > 10: + hint = ' Try rerunning with -v option for extra details.' if verbosity == 0 else '' + logging.error('Error threshold reached-- further errors are unlikely to be helpful. Fix the errors and rerun.' + hint) + exit() + + def warn(self, key, num=-1, level='warn'): + self.give(key, num, level) class Statement: def __init__(self, line, number): @@ -136,6 +149,9 @@ class Variable(Statement): match = re.match(r': \${([^\s:=]+)(:?=)([^}]+)}', line) return match.groups() if match else False + def is_empty(self): + return False if re.match('[\'"]?[^\'"]+[\'"]?', self.value) else True + class Comment: def __init__(self, line, number): self.value = line if line and line[0] == '#' else False @@ -178,7 +194,9 @@ class RcsId: class Function: def __init__(self, lines, num): - if lines[1] and lines[1][0] == '{': + if lines[0] and lines[0][-1] == '{': + error.give('functions_inline_brace', num) + elif lines[1] and lines[1][0] == '{': try: self.name = re.match(r'([\S_]+)\(\)$', lines[0]).group(1) except: @@ -195,7 +213,7 @@ class Function: # Remove { and } lines from length self.length -= 2 logging.debug('Found function %s' % self.name) - else: + if not hasattr(self, 'value'): self.value = False def short(self): @@ -207,6 +225,29 @@ class Function: def contains_line(self, line): return True if line in self.linenumbers() else False +def get(objlist, name): + for o in objlist: + if o.name == name: + return o + else: + return False + +def do_ports_checking(lineobj, filename): + logging.debug('Now on ports-specific section') + logging.debug('Checking for defaults clobbering blank values') + for var in lineobj['Variable']: + if var.type in ('longhand', 'shorthand'): + if var.name.split('_')[-1] not in ('enable') and var.clobber: + error.give('variables_defaults_non_mandatory_colon', var.line) + elif not var.clobber and var.name.split('_')[-1] in ('enable'): + error.give('variables_defaults_mandatory_colon', var.line) + if var.type == 'longhand' and var.name == var.source: + error.give('variables_defaults_old_style', var.line) + return + +def do_src_checking(lineobj, filename): + return + def do_rclint(filename): logging.debug('Suck in file %s' % filename) try: @@ -248,7 +289,11 @@ def do_rclint(filename): logging.debug('Checking shebang') if len(lineobj['Shebang']) < 1: - error.give('shebang', num) + error.give('shebang') + + logging.debug('Checking RcsId') + if len(lineobj['RcsId']) < 1: + error.give('rcsid') logging.debug('Checking order of file') linenumbers = [] @@ -279,7 +324,7 @@ def do_rclint(filename): linenumbers.append(s.line) if sorted(linenumbers) != linenumbers: - error.give('file_order', 0) + error.give('file_order') logging.debug('Checking all lines are accounted for') for obj in list(lineobj.keys()): @@ -299,9 +344,16 @@ def do_rclint(filename): if sorted(linenumbers) != linenumbers: error.give('rcorder_order') + shutdownkeyword = False for o in lineobj['Rcorder']: - if o.type == 'KEYWORD' and 'freebsd' in [v.lower() for v in o.value]: - error.give('rcorder_keyword_freebsd', o.line) + if o.type == 'KEYWORD': + if 'freebsd' in [v.lower() for v in o.value]: + error.give('rcorder_keyword_freebsd', o.line) + elif 'shutdown' in o.value: + shutdownkeyword = True + + if not shutdownkeyword: + error.warn('rcorder_keyword_shutdown') logging.debug('Checking order of variables') linenumbers = [] @@ -310,13 +362,17 @@ def do_rclint(filename): if var.type in typ: linenumbers.append(var.line) if sorted(linenumbers) != linenumbers: - error.give('variables_order', 0) + error.give('variables_order') - logging.debug('Checking for pointless quoting') + logging.debug('Checking for pointless quoting and empty variables') for obj in lineobj['Variable']+lineobj['Statement']: if obj.pointless_quoted(): error.give('value_quoted', obj.line) + for v in lineobj['Variable']: + if v.is_empty(): + error.give('value_empty', v.line) + logging.debug('Checking for rcvar set correctly') for var in lineobj['Variable']: if var.name == 'name': @@ -328,28 +384,50 @@ def do_rclint(filename): except: error.give('file_order', var.line) - logging.debug('Checking for short functions') + logging.debug('Checking for function issues') for function in lineobj['Function']: if function.short(): error.give('functions_short', function.line) + for l in function.value: + if 'chown' in l: + error.warn('functions_chown', function.line) + + logging.debug('Checking for run_rc_command') + for s in lineobj['Statement']: + if s.type == 'run_rc_command': + if '$1' not in s.value: + error.give('run_rc_argument', s.line) + + # Strip .in from filename + logging.debug('Checking $name agrees with PROVIDE and filename') + fn = filename[:-3] if filename[-3:] == '.in' else filename + n = get(lineobj['Variable'], 'name').value + rcordervars = [] + for r in lineobj['Rcorder']: + if r.type != 'PROVIDE': + continue + for v in r.value: + rcordervars.append(v) + + if n != fn or n not in rcordervars: + error.give('name_mismatch') + + if mode == 'ports': + do_ports_checking(lineobj, filename) + if mode == 'base': + do_base_checking(lineobj, filename) - logging.debug('Checking for defaults clobbering blank values') - for var in lineobj['Variable']: - if var.type in ('longhand', 'shorthand'): - if var.name.split('_')[-1] not in ('enable') and var.clobber: - error.give('variables_defaults_non_mandatory_colon', var.line) - elif not var.clobber and var.name.split('_')[-1] in ('enable'): - error.give('variables_defaults_mandatory_colon', var.line) - if var.type == 'longhand' and var.name == var.source: - error.give('variables_defaults_old_style', var.line) parser = argparse.ArgumentParser() -parser.add_argument('filenames', nargs = '+') -parser.add_argument('--language', nargs = 1, type=str, default = ['en'], help = 'sets the language that errors are reported in') +parser.add_argument('filenames', nargs='+') +parser.add_argument('--language', nargs=1, type=str, default=['en'], help='sets the language that errors are reported in') parser.add_argument('-v', action='count', help='raises debug level; provides detailed explanations of errors') parser.add_argument('--version', action='version', version='%s.%s.%s-%s'%(MAJOR, MINOR, MICRO, __version__)) +parser.add_argument('-b', action='store_true', help='chooses base RC script mode') +parser.add_argument('-p', action='store_true', help='chooses ports RC script mode (default)') args = parser.parse_args() +mode = 'base' if args.b else 'ports' verbosity = args.v logging.basicConfig(level=logging.DEBUG if verbosity > 1 else logging.WARN) From owner-svn-src-user@FreeBSD.ORG Tue Oct 23 22:15:48 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CFBD1B91; Tue, 23 Oct 2012 22:15:48 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 87F1D8FC12; Tue, 23 Oct 2012 22:15:48 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so816645pbb.13 for ; Tue, 23 Oct 2012 15:15:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=3FuBzZmpRr52OKxljOi4FRQfqHTRj10PfxPfZnyskj8=; b=LF3oiiLmCdat5uxXANTJjILSR833IG/aqLT35P3b2L0YkySN2N5wZ7Qi5Un0BuwHRq 4wXUO5J6tgUocDLAoGSAkVXpfZHQMNg3pP0qNmH+Op/Sl/FQAgyANhYsMXMcgcwQEwIm isxJSroUeVRcOFd3PbjtnGr7MancoOWETMx7C/7mcHDeObDcyDnb/9tmIDqeGOPZ+03s 7YMZ2g5DZ5dZ7wsiMva4N7Jn3D4lhqiumtAHt+b0wxDjLUd4p+C8qfa/XoMnxeU+/WvH /laQqtnddq2YCiwDtxbMwgb+BQz41R+io39eqKhWtwznLKdoN9FbQFIa36T3RtzuCWSU fayQ== MIME-Version: 1.0 Received: by 10.68.189.138 with SMTP id gi10mr43799122pbc.165.1351030548203; Tue, 23 Oct 2012 15:15:48 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.223.105 with HTTP; Tue, 23 Oct 2012 15:15:48 -0700 (PDT) In-Reply-To: <5086AC94.2090700@freebsd.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <20121023032743.K2804@besplex.bde.org> <508664C7.3080206@freebsd.org> <201210230853.56549.jhb@freebsd.org> <5086AC94.2090700@freebsd.org> Date: Tue, 23 Oct 2012 15:15:48 -0700 X-Google-Sender-Auth: 3dcGJSeN8zO7tfD8yhEZqCj8alw Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: mdf@FreeBSD.org To: Andre Oppermann Content-Type: text/plain; charset=ISO-8859-1 Cc: src-committers@freebsd.org, Bruce Evans , John Baldwin , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 22:15:48 -0000 On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann wrote: > Struct mtx and MTX_SYSINIT always occur as pair next to each other. That doesn't matter. Language basics like variable definitions should not be obscured by macros. It either takes longer to figure out what a variable is (because one needs to look up the definition of the macro) or makes it almost impossible (because now e.g. cscope doesn't know this is a variable definition. Thanks, matthew From owner-svn-src-user@FreeBSD.ORG Tue Oct 23 23:20:16 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DFCA33C2 for ; Tue, 23 Oct 2012 23:20:16 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 43C9C8FC0A for ; Tue, 23 Oct 2012 23:20:16 +0000 (UTC) Received: (qmail 89708 invoked from network); 24 Oct 2012 00:58:11 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 24 Oct 2012 00:58:11 -0000 Message-ID: <50872624.6060901@freebsd.org> Date: Wed, 24 Oct 2012 01:20:04 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: mdf@FreeBSD.org Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... References: <201210221418.q9MEINkr026751@svn.freebsd.org> <20121023032743.K2804@besplex.bde.org> <508664C7.3080206@freebsd.org> <201210230853.56549.jhb@freebsd.org> <5086AC94.2090700@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Bruce Evans , John Baldwin , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 23:20:16 -0000 On 24.10.2012 00:15, mdf@FreeBSD.org wrote: > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann wrote: >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. > > That doesn't matter. Language basics like variable definitions should > not be obscured by macros. It either takes longer to figure out what > a variable is (because one needs to look up the definition of the > macro) or makes it almost impossible (because now e.g. cscope doesn't > know this is a variable definition. Sigh, cscope doesn't expand macros? Is there a way to do the cache line alignment in a sane way without littering __aligned(CACHE_LINE_SIZE) all over the place? -- Andre From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 02:32:07 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5CFDF691; Wed, 24 Oct 2012 02:32:07 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4448E8FC0C; Wed, 24 Oct 2012 02:32:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9O2W7QA018183; Wed, 24 Oct 2012 02:32:07 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O2W7WP018181; Wed, 24 Oct 2012 02:32:07 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210240232.q9O2W7WP018181@svn.freebsd.org> From: Eitan Adler Date: Wed, 24 Oct 2012 02:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r241981 - user/crees/rclint X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 02:32:07 -0000 Author: eadler Date: Wed Oct 24 02:32:06 2012 New Revision: 241981 URL: http://svn.freebsd.org/changeset/base/241981 Log: Make this work with python 3 Modified: user/crees/rclint/rclint.py Modified: user/crees/rclint/rclint.py ============================================================================== --- user/crees/rclint/rclint.py Wed Oct 24 02:21:39 2012 (r241980) +++ user/crees/rclint/rclint.py Wed Oct 24 02:32:06 2012 (r241981) @@ -70,9 +70,9 @@ class Db: if level == 'warn': logging.warn('[%d]: %s ' % (num+1, err)) if verbosity > 0: - print(textwrap.fill(self.explanation(key), + print((textwrap.fill(self.explanation(key), initial_indent='==> ', - subsequent_indent=' ')) + subsequent_indent=' '))) else: logging.error('No such error: %s' % key) self.count += 1 From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 12:35:58 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A6B8525; Wed, 24 Oct 2012 12:35:58 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 34C458FC0A; Wed, 24 Oct 2012 12:35:56 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jf20so218566bkc.13 for ; Wed, 24 Oct 2012 05:35:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=6t30xvVauTQlbHQKDmAx1QpI12R1A4QleAVxUIpXhKw=; b=sPvP2ecY5zlMWuaOeCLY9j6SO2xxn4BrlsfnUCxaRjZYrX6DikNGaaUP6ZpfnghpbU DD5tRC2K3ZXBoY38c4vuRXEXBE+fiuCLyXZ74et7O4dM3hidPP93aSml/j0yVtTNilDE ReAzaEEwZf5nUrE61rKbxWLBw6nyZnwj6DqLtCA5ThsStw0N/+gO+SB7aydOqSvcKCPI qKIG/cKUBuqiB55RBXf9JUv85DuiH8EP61iPjvA8S9NztNzyxMjvCex4zKL88LTwz2Y5 O6mqbAh2Cj6MuNHvyMW5P+ZnERobMGBqEsTAcpUNWz4JY8KREV1gRb1733bTl1ZWpFkC wrXw== MIME-Version: 1.0 Received: by 10.204.145.214 with SMTP id e22mr4621270bkv.133.1351082155747; Wed, 24 Oct 2012 05:35:55 -0700 (PDT) Sender: ermal.luci@gmail.com Received: by 10.204.143.148 with HTTP; Wed, 24 Oct 2012 05:35:55 -0700 (PDT) In-Reply-To: <5086F086.6080000@freebsd.org> References: <201210231926.q9NJQnqu039908@svn.freebsd.org> <5086F086.6080000@freebsd.org> Date: Wed, 24 Oct 2012 14:35:55 +0200 X-Google-Sender-Auth: opJ6lVGy1BhwZcdWG_AAWpKPEuo Message-ID: Subject: Re: svn commit: r241966 - user/andre/tcp_workqueue/sys/net From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= To: Andre Oppermann Content-Type: text/plain; charset=ISO-8859-1 Cc: src-committers@freebsd.org, svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 12:35:58 -0000 Hello Andre, i have since forever wanted to merge this but never got to it. https://github.com/bsdperimeter/pfsense-tools/blob/master/patches/RELENG_9_0/pfil.RELENG_9.diff This has been used in pfsense quite sucessfully. It allows to reorder the pfil hooks based on names of registered hooks using sysctl. On Tue, Oct 23, 2012 at 9:31 PM, Andre Oppermann wrote: > On 23.10.2012 21:26, Andre Oppermann wrote: >> >> Author: andre >> Date: Tue Oct 23 19:26:49 2012 >> New Revision: 241966 >> URL: http://svn.freebsd.org/changeset/base/241966 >> >> Log: >> Extend PFIL hooks with explicit hook ordering and reinjecting of >> packets into the chain after a particular hook. >> >> Add pfil_add_hook_order() taking a numerical value between 0-255 >> to specify the relative position of this hook in the list of all >> hooks. Lower numbers have higher ordering (ie. will run first). >> Within a particular order value the last added will be the first >> to run. Three fixed positions are defined: >> PFIL_ORDER_FIRST 0 >> PFIL_ORDER_DEFAULT 200 >> PFIL_ORDER_LAST 255 >> >> Previously the order was non-deterministic and dependent on the >> ordering of the add hook calls. The last added would always >> become the first to run. >> >> Non-ordering aware pfil consumers using the pfil_add_hook() call >> get PFIL_ORDER_DEFAULT assigned resulting in the previous ordering. >> >> The ordering is determined at hookup time by the pfil consumer >> and no tool for later manual re-ordering is provided. Most well >> known pfil consumers are expected to have a predetermined preferred >> position in the order. A tool or sysctl reporting the order of >> hooked pfil consumers will be provided later. >> >> Add pfil_run_inject() taking an opaque cookie value obtained with >> pfil_get_cookie() after the hook is added. Processing of the hook >> chain skips all hooks until after the one with the same cookie. >> The cookie is valid as long as this hook remains hooked. If no >> cookie is found processing is started with the first hook again. >> If the cookie is invalid processing of all hooks is effectively >> skipped. >> >> With this pfil hooks consumers can dequeue packets for further >> processing and later re-inject them with the next hook. > > > Besides the obvious ordering solution to the exiting pfil consumers > my idea is to explore converting most of ether_input/output and IPsec > processing to pfil hooks. This will need some further definitions > for the default PFIL_ORDER points but that'll happen when there's > some practical experimenting with running it. > > -- > Andre > -- Ermal From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 14:14:57 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1F069CE; Wed, 24 Oct 2012 14:14:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 900348FC0C; Wed, 24 Oct 2012 14:14:57 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 008ACB911; Wed, 24 Oct 2012 10:14:56 -0400 (EDT) From: John Baldwin To: Andre Oppermann Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... Date: Wed, 24 Oct 2012 10:05:38 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210221418.q9MEINkr026751@svn.freebsd.org> <50872624.6060901@freebsd.org> In-Reply-To: <50872624.6060901@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210241005.38977.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 24 Oct 2012 10:14:57 -0400 (EDT) Cc: mdf@freebsd.org, src-committers@freebsd.org, Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 14:14:57 -0000 On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: > On 24.10.2012 00:15, mdf@FreeBSD.org wrote: > > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann wrote: > >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. > > > > That doesn't matter. Language basics like variable definitions should > > not be obscured by macros. It either takes longer to figure out what > > a variable is (because one needs to look up the definition of the > > macro) or makes it almost impossible (because now e.g. cscope doesn't > > know this is a variable definition. > > Sigh, cscope doesn't expand macros? > > Is there a way to do the cache line alignment in a sane way without > littering __aligned(CACHE_LINE_SIZE) all over the place? I was hoping to do something with an anonymous union or some such like: union mtx_aligned { struct mtx; char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; } I don't know if there is a useful way to define an 'aligned mutex' type that will transparently map to a 'struct mtx', e.g.: typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; -- John Baldwin From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 14:34:14 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4DA5DF4A; Wed, 24 Oct 2012 14:34:14 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3639F8FC08; Wed, 24 Oct 2012 14:34:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9OEYEtC033097; Wed, 24 Oct 2012 14:34:14 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OEYDP7033095; Wed, 24 Oct 2012 14:34:13 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210241434.q9OEYDP7033095@svn.freebsd.org> From: Andre Oppermann Date: Wed, 24 Oct 2012 14:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242001 - user/andre/tcp_workqueue/sys/netinet X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 14:34:14 -0000 Author: andre Date: Wed Oct 24 14:34:13 2012 New Revision: 242001 URL: http://svn.freebsd.org/changeset/base/242001 Log: Prevent total TSO not only from exceeding IP_MAXPACKET (64K) with IP[46] header, IP[46] options and TCP header and options but also from exceeding the magic 64K in total DMA size by deducting the max_linkhdr length as well. This fixes an edge case in TSO operation when the NIC driver only handles 64K DMA transfers including ethernet link headers. Modified: user/andre/tcp_workqueue/sys/netinet/tcp_output.c Modified: user/andre/tcp_workqueue/sys/netinet/tcp_output.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/tcp_output.c Wed Oct 24 14:06:47 2012 (r242000) +++ user/andre/tcp_workqueue/sys/netinet/tcp_output.c Wed Oct 24 14:34:13 2012 (r242001) @@ -772,9 +772,12 @@ send: * Limit a burst to IP_MAXPACKET minus IP, * TCP and options length to keep ip->ip_len * from overflowing. + * Deduct max_linkhdr as well to prevent the + * eventual DMA chain from exceeding IP_MAXPACKET + * (64K) as well. */ - if (len > IP_MAXPACKET - hdrlen) { - len = IP_MAXPACKET - hdrlen; + if (len > IP_MAXPACKET - (hdrlen + max_linkhdr)) { + len = IP_MAXPACKET - (hdrlen + max_linkhdr); sendalot = 1; } @@ -805,7 +808,7 @@ send: } else tso = 0; - KASSERT(len + hdrlen + ipoptlen <= IP_MAXPACKET, + KASSERT(len + hdrlen + ipoptlen + max_linkhdr <= IP_MAXPACKET, ("%s: len > IP_MAXPACKET", __func__)); /*#ifdef DIAGNOSTIC*/ From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 14:34:36 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E80DADB; Wed, 24 Oct 2012 14:34:36 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1DF3F8FC1B; Wed, 24 Oct 2012 14:34:35 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id v11so757782vbm.13 for ; Wed, 24 Oct 2012 07:34:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=EjOkpqCJkGI3X09OEUp5McJ2GwOR0EYZP+iWmuJCzrs=; b=OyJixg4WQue/n5Hm0iNszQTYe86KejlbWP1L8sTRbqLfLy9bVEG0ws6K7NYRzcKqu2 Pkns5++pwjLmT/z6xOaMDCRXtEUe7iQ1GX67Z6XfZ6QH9v074+ViuCoKAKWJT5UwDBau 6qDTxWVl8JJPNcx7p8l1ivilJ6YeFBdVWvXldr8MijCFD6zL72TDBN61rW1EELH1EkNY A3yGC4CyA5y+P+RqxQ43Gn85CM0jVp4fw2pCtNO7WJjsOIdjELi8C4kgnePX3secxg1I dZpEVqPpvkyt9NCXkXaYnD4UNSp6ggx4EXmGjaVIJMX7RbjsAZ5k7eQ8XE+msJxsYmL6 T//A== MIME-Version: 1.0 Received: by 10.52.35.82 with SMTP id f18mr21399201vdj.99.1351089274927; Wed, 24 Oct 2012 07:34:34 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.150.197 with HTTP; Wed, 24 Oct 2012 07:34:34 -0700 (PDT) In-Reply-To: <201210241005.38977.jhb@freebsd.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <50872624.6060901@freebsd.org> <201210241005.38977.jhb@freebsd.org> Date: Wed, 24 Oct 2012 15:34:34 +0100 X-Google-Sender-Auth: MAgQdehGFWD9luX6O3eh-_ECodE Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 14:34:37 -0000 On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann wrote: >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. >> > >> > That doesn't matter. Language basics like variable definitions should >> > not be obscured by macros. It either takes longer to figure out what >> > a variable is (because one needs to look up the definition of the >> > macro) or makes it almost impossible (because now e.g. cscope doesn't >> > know this is a variable definition. >> >> Sigh, cscope doesn't expand macros? >> >> Is there a way to do the cache line alignment in a sane way without >> littering __aligned(CACHE_LINE_SIZE) all over the place? > > I was hoping to do something with an anonymous union or some such like: > > union mtx_aligned { > struct mtx; > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; > } > > I don't know if there is a useful way to define an 'aligned mutex' type > that will transparently map to a 'struct mtx', e.g.: > > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; Unfortunately that doesn't work as I've verified with alc@ few months ago. The __aligned() attribute only works with structures definition, not objects declaration. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 14:36:26 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E867720F; Wed, 24 Oct 2012 14:36:26 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0D8A8FC08; Wed, 24 Oct 2012 14:36:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9OEaQjk033467; Wed, 24 Oct 2012 14:36:26 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OEaQpB033465; Wed, 24 Oct 2012 14:36:26 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210241436.q9OEaQpB033465@svn.freebsd.org> From: Andre Oppermann Date: Wed, 24 Oct 2012 14:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242002 - user/andre/tcp_workqueue/sys/sys X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 14:36:27 -0000 Author: andre Date: Wed Oct 24 14:36:26 2012 New Revision: 242002 URL: http://svn.freebsd.org/changeset/base/242002 Log: Different approach to mutex alignment with a simple helper macro MTX_ALIGN to insert the proper compiler specific and architecture specific cache line alignment for global mutexes. Modified: user/andre/tcp_workqueue/sys/sys/mutex.h Modified: user/andre/tcp_workqueue/sys/sys/mutex.h ============================================================================== --- user/andre/tcp_workqueue/sys/sys/mutex.h Wed Oct 24 14:34:13 2012 (r242001) +++ user/andre/tcp_workqueue/sys/sys/mutex.h Wed Oct 24 14:36:26 2012 (r242002) @@ -399,6 +399,12 @@ do { \ * on SMP systems. */ #ifdef SMP +#define MTX_ALIGN __aligned(CACHE_LINE_SIZE) +#else +#define MTX_ALIGN +#endif + +#ifdef SMP #define MTX_GLOBAL(name) \ struct mtx __aligned(CACHE_LINE_SIZE) (name) #else /* SMP */ From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 14:45:41 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66EFD4D5; Wed, 24 Oct 2012 14:45:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 323228FC1B; Wed, 24 Oct 2012 14:45:41 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 97807B924; Wed, 24 Oct 2012 10:45:40 -0400 (EDT) From: John Baldwin To: attilio@freebsd.org Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... Date: Wed, 24 Oct 2012 10:45:39 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241005.38977.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210241045.39211.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 24 Oct 2012 10:45:40 -0400 (EDT) Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 14:45:41 -0000 On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: > On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: > > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: > >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: > >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann wrote: > >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. > >> > > >> > That doesn't matter. Language basics like variable definitions should > >> > not be obscured by macros. It either takes longer to figure out what > >> > a variable is (because one needs to look up the definition of the > >> > macro) or makes it almost impossible (because now e.g. cscope doesn't > >> > know this is a variable definition. > >> > >> Sigh, cscope doesn't expand macros? > >> > >> Is there a way to do the cache line alignment in a sane way without > >> littering __aligned(CACHE_LINE_SIZE) all over the place? > > > > I was hoping to do something with an anonymous union or some such like: > > > > union mtx_aligned { > > struct mtx; > > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; > > } > > > > I don't know if there is a useful way to define an 'aligned mutex' type > > that will transparently map to a 'struct mtx', e.g.: > > > > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; > > Unfortunately that doesn't work as I've verified with alc@ few months ago. > The __aligned() attribute only works with structures definition, not > objects declaration. Are you saying that the typedef doesn't (I expect it doesn't), or that this doesn't: struct mtx foo __aligned(CACHE_LINE_SIZE); -- John Baldwin From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:02:40 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 54DC6958; Wed, 24 Oct 2012 15:02:40 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A2188FC14; Wed, 24 Oct 2012 15:02:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9OF2eSh037599; Wed, 24 Oct 2012 15:02:40 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OF2erf037597; Wed, 24 Oct 2012 15:02:40 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210241502.q9OF2erf037597@svn.freebsd.org> From: Andre Oppermann Date: Wed, 24 Oct 2012 15:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242003 - user/andre/tcp_workqueue/sys/netinet X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:02:40 -0000 Author: andre Date: Wed Oct 24 15:02:39 2012 New Revision: 242003 URL: http://svn.freebsd.org/changeset/base/242003 Log: Mark the tcpstat sysctl read-only instead of writeable. Userspace should not write into tcp statistics. Modified: user/andre/tcp_workqueue/sys/netinet/tcp_input.c Modified: user/andre/tcp_workqueue/sys/netinet/tcp_input.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/tcp_input.c Wed Oct 24 14:36:26 2012 (r242002) +++ user/andre/tcp_workqueue/sys/netinet/tcp_input.c Wed Oct 24 15:02:39 2012 (r242003) @@ -121,7 +121,7 @@ __FBSDID("$FreeBSD$"); const int tcprexmtthresh = 3; VNET_DEFINE(struct tcpstat, tcpstat); -SYSCTL_VNET_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RW, +SYSCTL_VNET_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RD, &VNET_NAME(tcpstat), tcpstat, "TCP statistics (struct tcpstat, netinet/tcp_var.h)"); From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:09:25 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8308BF2; Wed, 24 Oct 2012 15:09:25 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9A4888FC08; Wed, 24 Oct 2012 15:09:24 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id fw7so795512vcb.13 for ; Wed, 24 Oct 2012 08:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=oiBwoZsfsAIQHs91TSpH1s288KxR7nb/qdaO9uNjLqQ=; b=QWv5WxrHCsnHRniY7g6a7j3i5i8sPQw1k/31ZWmlSKPZVXRhztzBhIEwd6hc3B1VRz Idck/9fZe44Eg7X+U6I/aXobuhABQ5Qghwwhag9y3CRY8D589A2OHRWnggZafOFIyXcF 9kuRGw/R35JQwEl4Udh3NzwDxurS6SABxSqGE+iyhOpxJXnU4bJwKQKrWvsCz2Hv1c4d Sx3eHzfAzERbs+fYkBqyeznocfo1xF3WOQvjhq3LAYWK7XaM8AR+lFE724EEB/lk6Ws0 jKJlpZD0aOqK1os3XDgaNCWRC21EMqUHvacLVFxh2e9bSw1NJdayv15qiPCnl+IWQ6tN tFPA== MIME-Version: 1.0 Received: by 10.52.35.82 with SMTP id f18mr21527739vdj.99.1351091352497; Wed, 24 Oct 2012 08:09:12 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.150.197 with HTTP; Wed, 24 Oct 2012 08:09:12 -0700 (PDT) In-Reply-To: <201210241045.39211.jhb@freebsd.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241005.38977.jhb@freebsd.org> <201210241045.39211.jhb@freebsd.org> Date: Wed, 24 Oct 2012 16:09:12 +0100 X-Google-Sender-Auth: QdcEWV9pmUei0iwlXqw9SLVVLkM Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:09:26 -0000 On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: > On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: >> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: >> > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: >> >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: >> >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann > wrote: >> >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. >> >> > >> >> > That doesn't matter. Language basics like variable definitions should >> >> > not be obscured by macros. It either takes longer to figure out what >> >> > a variable is (because one needs to look up the definition of the >> >> > macro) or makes it almost impossible (because now e.g. cscope doesn't >> >> > know this is a variable definition. >> >> >> >> Sigh, cscope doesn't expand macros? >> >> >> >> Is there a way to do the cache line alignment in a sane way without >> >> littering __aligned(CACHE_LINE_SIZE) all over the place? >> > >> > I was hoping to do something with an anonymous union or some such like: >> > >> > union mtx_aligned { >> > struct mtx; >> > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >> > } >> > >> > I don't know if there is a useful way to define an 'aligned mutex' type >> > that will transparently map to a 'struct mtx', e.g.: >> > >> > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; >> >> Unfortunately that doesn't work as I've verified with alc@ few months ago. >> The __aligned() attribute only works with structures definition, not >> objects declaration. > > Are you saying that the typedef doesn't (I expect it doesn't), or that this > doesn't: > > struct mtx foo __aligned(CACHE_LINE_SIZE); I meant to say that such notation won't address the padding issue which is as import as the alignment. Infact, for sensitive locks, having just an aligned object is not really useful if the cacheline gets shared. In the end you will need to use explicit padding or use __aligned in the struct definition, which cannot be used as a general pattern. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:12:52 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D866EF0D for ; Wed, 24 Oct 2012 15:12:52 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3C06F8FC0C for ; Wed, 24 Oct 2012 15:12:51 +0000 (UTC) Received: (qmail 33335 invoked from network); 24 Oct 2012 16:50:34 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 24 Oct 2012 16:50:34 -0000 Message-ID: <50880562.8030705@freebsd.org> Date: Wed, 24 Oct 2012 17:12:34 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241005.38977.jhb@freebsd.org> <201210241045.39211.jhb@freebsd.org> In-Reply-To: <201210241045.39211.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: attilio@freebsd.org, mdf@freebsd.org, src-committers@freebsd.org, Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:12:53 -0000 On 24.10.2012 16:45, John Baldwin wrote: > On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: >> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: >>> On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: >>>> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: >>>>> On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann > wrote: >>>>>> Struct mtx and MTX_SYSINIT always occur as pair next to each other. >>>>> >>>>> That doesn't matter. Language basics like variable definitions should >>>>> not be obscured by macros. It either takes longer to figure out what >>>>> a variable is (because one needs to look up the definition of the >>>>> macro) or makes it almost impossible (because now e.g. cscope doesn't >>>>> know this is a variable definition. >>>> >>>> Sigh, cscope doesn't expand macros? >>>> >>>> Is there a way to do the cache line alignment in a sane way without >>>> littering __aligned(CACHE_LINE_SIZE) all over the place? >>> >>> I was hoping to do something with an anonymous union or some such like: >>> >>> union mtx_aligned { >>> struct mtx; >>> char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >>> } >>> >>> I don't know if there is a useful way to define an 'aligned mutex' type >>> that will transparently map to a 'struct mtx', e.g.: >>> >>> typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; >> >> Unfortunately that doesn't work as I've verified with alc@ few months ago. >> The __aligned() attribute only works with structures definition, not >> objects declaration. > > Are you saying that the typedef doesn't (I expect it doesn't), or that this > doesn't: > > struct mtx foo __aligned(CACHE_LINE_SIZE); It has to be: struct mtx __aligned(CACHE_LINE_SIZE) foo; doesn't it? The gcc documentation isn't entirely clear to me. -- Andre From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:24:23 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C803B1F0; Wed, 24 Oct 2012 15:24:23 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 19D6C8FC0A; Wed, 24 Oct 2012 15:24:23 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id v11so833471vbm.13 for ; Wed, 24 Oct 2012 08:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=9ZuwUFsIT6JHjjJFPX9F+KYbaNn40WhrWo2av9DOHR4=; b=a+aYmEWt0TAl5dQLE+jQKzr0pFjtBUk6E0gY6HSDdoXPhQv1Tot2J3JJLEG2ZW9vwo Fkrl2t0V8u3qbb0CWdwsBk/1uImGpFEJt6KK8Nc8ddEU9nwHPSpHWvllRuDM1wGbKBWc WwmGLmZcvhQj1rMqM9kpH961SP5PJqXt+CimIFehl4K4oAwHg2SxW55ndxUjlVgsKsWv Fz9tg6/ugEUWVmFu2di32ew1PDxtoR7/1SbeYdAAWZ0hRmhCZGuMDQk7Tm1XZVDV1/E1 ALVPSWFog2S9+6KsWRZKtvLrGIo4x2/q7ICV+0BK6FUfONQRDwTggAcThuEN+CmJSG4x Ps9A== MIME-Version: 1.0 Received: by 10.221.11.15 with SMTP id pc15mr8542017vcb.70.1351092262606; Wed, 24 Oct 2012 08:24:22 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.150.197 with HTTP; Wed, 24 Oct 2012 08:24:22 -0700 (PDT) In-Reply-To: References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241005.38977.jhb@freebsd.org> <201210241045.39211.jhb@freebsd.org> Date: Wed, 24 Oct 2012 16:24:22 +0100 X-Google-Sender-Auth: _HhjQYkYQqIWXn3WpS3HJFQUStU Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:24:24 -0000 On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao wrote: > On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: >> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: >>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: >>> > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: >>> >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: >>> >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann >> wrote: >>> >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. >>> >> > >>> >> > That doesn't matter. Language basics like variable definitions should >>> >> > not be obscured by macros. It either takes longer to figure out what >>> >> > a variable is (because one needs to look up the definition of the >>> >> > macro) or makes it almost impossible (because now e.g. cscope doesn't >>> >> > know this is a variable definition. >>> >> >>> >> Sigh, cscope doesn't expand macros? >>> >> >>> >> Is there a way to do the cache line alignment in a sane way without >>> >> littering __aligned(CACHE_LINE_SIZE) all over the place? >>> > >>> > I was hoping to do something with an anonymous union or some such like: >>> > >>> > union mtx_aligned { >>> > struct mtx; >>> > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >>> > } >>> > >>> > I don't know if there is a useful way to define an 'aligned mutex' type >>> > that will transparently map to a 'struct mtx', e.g.: >>> > >>> > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; >>> >>> Unfortunately that doesn't work as I've verified with alc@ few months ago. >>> The __aligned() attribute only works with structures definition, not >>> objects declaration. >> >> Are you saying that the typedef doesn't (I expect it doesn't), or that this >> doesn't: >> >> struct mtx foo __aligned(CACHE_LINE_SIZE); > > I meant to say that such notation won't address the padding issue > which is as import as the alignment. Infact, for sensitive locks, > having just an aligned object is not really useful if the cacheline > gets shared. > In the end you will need to use explicit padding or use __aligned in > the struct definition, which cannot be used as a general pattern. The quickest way I see this can be made general is to have a specific struct defined in sys/_mutex.h like that struct mtx_unshare { struct mtx lock; char _pad[CACHE_LINE_SIZE - sizeof(struct mtx)]; } __aligned(CACHE_LINE_SIZE); then let mtx_* functions to accept void ptrs and cast them to struct mtx as long as the functions enter. I think that almost all the static/non-member-of-a-struct mutex should be converted to be struct mtx_unshare, or possibly the most coarse-grained ones. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:28:51 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 06749372; Wed, 24 Oct 2012 15:28:51 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 402348FC18; Wed, 24 Oct 2012 15:28:50 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id v11so840147vbm.13 for ; Wed, 24 Oct 2012 08:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=G4mGrmMGpagXBVQsQE48UMVkeNXzlfKhZ8bxF54A6fE=; b=XMCQGCnUVHci/gRz6JHBA9vfyz23OoJwIUPQn/JT27LrSiqpc7CNm/bcuHDOh1U+cz aaqxaPRQh78GN/rxsdATOFi9IOEI4pYIUrviM8DgrxYcCX/PjgGAmg1/XssEIKdRdalO ne7Bm3BTkXa//gxK/7ljyQ/zrB4eYz9eUBHBoWAOwZ9CAQYbQkSs3J5pOZXV3MgJowYy Ng+6l4kz1zsTKikNv4w+XZ/Vc5NyoRIkuu/0Bwo7mvHUXASKx4APlsyw/v7KCuqZuHOW peKO8PHysOaioUNMvkeMnJVm2OjaXsNkMGKYjNcKHOm1/+LFdQJO9FzIRkwDK9C9p9Mw Ozgg== MIME-Version: 1.0 Received: by 10.52.35.82 with SMTP id f18mr21599621vdj.99.1351092529625; Wed, 24 Oct 2012 08:28:49 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.150.197 with HTTP; Wed, 24 Oct 2012 08:28:49 -0700 (PDT) In-Reply-To: References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241005.38977.jhb@freebsd.org> <201210241045.39211.jhb@freebsd.org> Date: Wed, 24 Oct 2012 16:28:49 +0100 X-Google-Sender-Auth: P8LirSr1Ws4f71bZoyaChouPrd4 Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:28:51 -0000 On Wed, Oct 24, 2012 at 4:24 PM, Attilio Rao wrote: > On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao wrote: >> On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: >>> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: >>>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: >>>> > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: >>>> >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: >>>> >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann >>> wrote: >>>> >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. >>>> >> > >>>> >> > That doesn't matter. Language basics like variable definitions should >>>> >> > not be obscured by macros. It either takes longer to figure out what >>>> >> > a variable is (because one needs to look up the definition of the >>>> >> > macro) or makes it almost impossible (because now e.g. cscope doesn't >>>> >> > know this is a variable definition. >>>> >> >>>> >> Sigh, cscope doesn't expand macros? >>>> >> >>>> >> Is there a way to do the cache line alignment in a sane way without >>>> >> littering __aligned(CACHE_LINE_SIZE) all over the place? >>>> > >>>> > I was hoping to do something with an anonymous union or some such like: >>>> > >>>> > union mtx_aligned { >>>> > struct mtx; >>>> > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >>>> > } >>>> > >>>> > I don't know if there is a useful way to define an 'aligned mutex' type >>>> > that will transparently map to a 'struct mtx', e.g.: >>>> > >>>> > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; >>>> >>>> Unfortunately that doesn't work as I've verified with alc@ few months ago. >>>> The __aligned() attribute only works with structures definition, not >>>> objects declaration. >>> >>> Are you saying that the typedef doesn't (I expect it doesn't), or that this >>> doesn't: >>> >>> struct mtx foo __aligned(CACHE_LINE_SIZE); >> >> I meant to say that such notation won't address the padding issue >> which is as import as the alignment. Infact, for sensitive locks, >> having just an aligned object is not really useful if the cacheline >> gets shared. >> In the end you will need to use explicit padding or use __aligned in >> the struct definition, which cannot be used as a general pattern. > > The quickest way I see this can be made general is to have a specific > struct defined in sys/_mutex.h like that > > struct mtx_unshare { > struct mtx lock; > char _pad[CACHE_LINE_SIZE - sizeof(struct mtx)]; > } __aligned(CACHE_LINE_SIZE); This can be however be dangerous for the KBI because I'm not sure we assume the same CACHE_LINE_SIZE for every family processor within the same architectures. I'm sure x86 supports at least 2 different cacheline sizes, even if I admit I cannot recall (and cannot check right now) if we actually differentiate them in the end. However, if we want to support such mechanism and changing CACHE_LINE_SIZE, likely struct mtx_unshare cannot be used proficiently in modules (but that is however true with current handworking too, so it is not any worse than what we can get today as well). Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:30:34 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6FADB4C7 for ; Wed, 24 Oct 2012 15:30:34 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id C30D48FC21 for ; Wed, 24 Oct 2012 15:30:33 +0000 (UTC) Received: (qmail 33481 invoked from network); 24 Oct 2012 17:08:21 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 24 Oct 2012 17:08:21 -0000 Message-ID: <5088098D.9070206@freebsd.org> Date: Wed, 24 Oct 2012 17:30:21 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: attilio@FreeBSD.org Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241005.38977.jhb@freebsd.org> <201210241045.39211.jhb@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: mdf@freebsd.org, src-committers@freebsd.org, Bruce Evans , John Baldwin , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:30:34 -0000 On 24.10.2012 17:09, Attilio Rao wrote: > On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: >> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: >>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: >>>> On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: >>>>> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: >>>>>> On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann >> wrote: >>>>>>> Struct mtx and MTX_SYSINIT always occur as pair next to each other. >>>>>> >>>>>> That doesn't matter. Language basics like variable definitions should >>>>>> not be obscured by macros. It either takes longer to figure out what >>>>>> a variable is (because one needs to look up the definition of the >>>>>> macro) or makes it almost impossible (because now e.g. cscope doesn't >>>>>> know this is a variable definition. >>>>> >>>>> Sigh, cscope doesn't expand macros? >>>>> >>>>> Is there a way to do the cache line alignment in a sane way without >>>>> littering __aligned(CACHE_LINE_SIZE) all over the place? >>>> >>>> I was hoping to do something with an anonymous union or some such like: >>>> >>>> union mtx_aligned { >>>> struct mtx; >>>> char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >>>> } >>>> >>>> I don't know if there is a useful way to define an 'aligned mutex' type >>>> that will transparently map to a 'struct mtx', e.g.: >>>> >>>> typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; >>> >>> Unfortunately that doesn't work as I've verified with alc@ few months ago. >>> The __aligned() attribute only works with structures definition, not >>> objects declaration. >> >> Are you saying that the typedef doesn't (I expect it doesn't), or that this >> doesn't: >> >> struct mtx foo __aligned(CACHE_LINE_SIZE); > > I meant to say that such notation won't address the padding issue > which is as import as the alignment. Infact, for sensitive locks, > having just an aligned object is not really useful if the cacheline > gets shared. As far as I understand __aligned() not only aligns the start of the object but also ensures that is padded on a multiple of the alignment after the object. So explicit padding after it is not necessary. > In the end you will need to use explicit padding or use __aligned in > the struct definition, which cannot be used as a general pattern. -- Andre From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:32:52 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DD32B629; Wed, 24 Oct 2012 15:32:51 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id A7A0C8FC0A; Wed, 24 Oct 2012 15:32:50 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id fw7so829779vcb.13 for ; Wed, 24 Oct 2012 08:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=XiF9Vj4wBr4Vkr12KwVVfEIGHvf+AXq/lUS1KxqT+eQ=; b=RyEtCX1CyDaNQAh1r9nGFJ68t8cr9VVzqEQ+qcLxA1O7OpnApusfgCNfPTuJadx3Lm teEsj7IWMhjruWasWC80dh04Df+I/lfvVs3Cb5EyPvJgAMIPyriYpL9qo7FF7L02v0bs 2A7GDx/0AEq0vUMNU6vhczLVAAa5WyQaJ1D0rOW3oDjwb+2GREpTvN8Nigw3xn/rRe2R x3MJkVWU4QHkiHSMQho+mt2nBNOm4wv8OxYAGQ/pdUMgqz5d8JooBUmFy35OdmCYXB7z 95ice2AsI6S4wFCnp8b3HT1jCC3ftXP49xusqqRGkmcP/Ed6XvY1VQ4ShYk+mCFysed8 26xA== MIME-Version: 1.0 Received: by 10.52.179.231 with SMTP id dj7mr21644955vdc.108.1351092767998; Wed, 24 Oct 2012 08:32:47 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.150.197 with HTTP; Wed, 24 Oct 2012 08:32:47 -0700 (PDT) In-Reply-To: <5088098D.9070206@freebsd.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241005.38977.jhb@freebsd.org> <201210241045.39211.jhb@freebsd.org> <5088098D.9070206@freebsd.org> Date: Wed, 24 Oct 2012 16:32:47 +0100 X-Google-Sender-Auth: ws9Sj4X4pYqdwpeByH7ehfDUXV8 Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: Andre Oppermann Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, Bruce Evans , John Baldwin , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:32:52 -0000 On Wed, Oct 24, 2012 at 4:30 PM, Andre Oppermann wrote: > On 24.10.2012 17:09, Attilio Rao wrote: >> >> On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: >>> >>> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: >>>> >>>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: >>>>> >>>>> On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: >>>>>> >>>>>> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: >>>>>>> >>>>>>> On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann >>> >>> wrote: >>>>>>>> >>>>>>>> Struct mtx and MTX_SYSINIT always occur as pair next to each other. >>>>>>> >>>>>>> >>>>>>> That doesn't matter. Language basics like variable definitions >>>>>>> should >>>>>>> not be obscured by macros. It either takes longer to figure out what >>>>>>> a variable is (because one needs to look up the definition of the >>>>>>> macro) or makes it almost impossible (because now e.g. cscope doesn't >>>>>>> know this is a variable definition. >>>>>> >>>>>> >>>>>> Sigh, cscope doesn't expand macros? >>>>>> >>>>>> Is there a way to do the cache line alignment in a sane way without >>>>>> littering __aligned(CACHE_LINE_SIZE) all over the place? >>>>> >>>>> >>>>> I was hoping to do something with an anonymous union or some such like: >>>>> >>>>> union mtx_aligned { >>>>> struct mtx; >>>>> char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >>>>> } >>>>> >>>>> I don't know if there is a useful way to define an 'aligned mutex' type >>>>> that will transparently map to a 'struct mtx', e.g.: >>>>> >>>>> typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; >>>> >>>> >>>> Unfortunately that doesn't work as I've verified with alc@ few months >>>> ago. >>>> The __aligned() attribute only works with structures definition, not >>>> objects declaration. >>> >>> >>> Are you saying that the typedef doesn't (I expect it doesn't), or that >>> this >>> doesn't: >>> >>> struct mtx foo __aligned(CACHE_LINE_SIZE); >> >> >> I meant to say that such notation won't address the padding issue >> which is as import as the alignment. Infact, for sensitive locks, >> having just an aligned object is not really useful if the cacheline >> gets shared. > > > As far as I understand __aligned() not only aligns the start of the > object but also ensures that is padded on a multiple of the alignment > after the object. So explicit padding after it is not necessary. As I said it only works if you specify it in the struct definition, otherwise it doesn't work. You can try it yourself. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:33:54 2012 Return-Path: Delivered-To: svn-src-user@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A671756; Wed, 24 Oct 2012 15:33:54 +0000 (UTC) (envelope-from maxim.konovalov@gmail.com) Received: from mp2.macomnet.net (ipv6.irc.int.ru [IPv6:2a02:28:1:2::1b:2]) by mx1.freebsd.org (Postfix) with ESMTP id 4F9DD8FC16; Wed, 24 Oct 2012 15:33:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.14.5/8.14.5) with ESMTP id q9OFXjTq065425; Wed, 24 Oct 2012 19:33:45 +0400 (MSK) (envelope-from maxim.konovalov@gmail.com) Date: Wed, 24 Oct 2012 19:33:45 +0400 (MSK) From: Maxim Konovalov To: Andre Oppermann Subject: Re: svn commit: r242003 - user/andre/tcp_workqueue/sys/netinet In-Reply-To: <201210241502.q9OF2erf037597@svn.freebsd.org> Message-ID: References: <201210241502.q9OF2erf037597@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: src-committers@FreeBSD.ORG, svn-src-user@FreeBSD.ORG X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:33:54 -0000 On Wed, 24 Oct 2012, 15:02-0000, Andre Oppermann wrote: > Author: andre > Date: Wed Oct 24 15:02:39 2012 > New Revision: 242003 > URL: http://svn.freebsd.org/changeset/base/242003 > > Log: > Mark the tcpstat sysctl read-only instead of writeable. Userspace > should not write into tcp statistics. > Why? "netstat -z -p tcp" does that and this is a nice feature. -- Maxim Konovalov From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:37:07 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DDABA8E0; Wed, 24 Oct 2012 15:37:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id A8E4B8FC0C; Wed, 24 Oct 2012 15:37:06 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 163DAB911; Wed, 24 Oct 2012 11:37:06 -0400 (EDT) From: John Baldwin To: attilio@freebsd.org Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... Date: Wed, 24 Oct 2012 11:36:06 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210221418.q9MEINkr026751@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210241136.06154.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 24 Oct 2012 11:37:06 -0400 (EDT) Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:37:07 -0000 On Wednesday, October 24, 2012 11:24:22 am Attilio Rao wrote: > On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao wrote: > > On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: > >> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: > >>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: > >>> > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: > >>> >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: > >>> >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann > >> wrote: > >>> >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. > >>> >> > > >>> >> > That doesn't matter. Language basics like variable definitions should > >>> >> > not be obscured by macros. It either takes longer to figure out what > >>> >> > a variable is (because one needs to look up the definition of the > >>> >> > macro) or makes it almost impossible (because now e.g. cscope doesn't > >>> >> > know this is a variable definition. > >>> >> > >>> >> Sigh, cscope doesn't expand macros? > >>> >> > >>> >> Is there a way to do the cache line alignment in a sane way without > >>> >> littering __aligned(CACHE_LINE_SIZE) all over the place? > >>> > > >>> > I was hoping to do something with an anonymous union or some such like: > >>> > > >>> > union mtx_aligned { > >>> > struct mtx; > >>> > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; > >>> > } > >>> > > >>> > I don't know if there is a useful way to define an 'aligned mutex' type > >>> > that will transparently map to a 'struct mtx', e.g.: > >>> > > >>> > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; > >>> > >>> Unfortunately that doesn't work as I've verified with alc@ few months ago. > >>> The __aligned() attribute only works with structures definition, not > >>> objects declaration. > >> > >> Are you saying that the typedef doesn't (I expect it doesn't), or that this > >> doesn't: > >> > >> struct mtx foo __aligned(CACHE_LINE_SIZE); > > > > I meant to say that such notation won't address the padding issue > > which is as import as the alignment. Infact, for sensitive locks, > > having just an aligned object is not really useful if the cacheline > > gets shared. > > In the end you will need to use explicit padding or use __aligned in > > the struct definition, which cannot be used as a general pattern. > > The quickest way I see this can be made general is to have a specific > struct defined in sys/_mutex.h like that > > struct mtx_unshare { > struct mtx lock; > char _pad[CACHE_LINE_SIZE - sizeof(struct mtx)]; > } __aligned(CACHE_LINE_SIZE); I think instead you want my union above that uses roundup2 in case a lock eats up multiple cache lines: union mtx_foo { struct mtx lock; char junk[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; } __aligned_CACHE_LINE_SIZE; > then let mtx_* functions to accept void ptrs and cast them to struct > mtx as long as the functions enter. Eh, that removes all compile time type checks. That seems very dubious to me. -- John Baldwin From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:41:25 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B667EE54; Wed, 24 Oct 2012 15:41:25 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id E7F7B8FC1E; Wed, 24 Oct 2012 15:41:24 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id v11so860471vbm.13 for ; Wed, 24 Oct 2012 08:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=TGYjDtdXWhONM3mRvqg+zjum9uRZn23u/rdjd4+4OBM=; b=xmLLMEU7cxp28HWYRs06sng54+wdOQnSlCxxNyYMWS0H9idB/z+IyhMhSabHnv6vlO l+ywHFv0UzpvTJJanAM2ckpd4RXENUYhsGkJo51YBQB/5gZr71p+b+M1eDsjQOUZNVTk rg9ORC9YpcwPxhBJYtGW8mrNevuYuCUKFMEVQImH3r7QR69WDlOZIsZ2GbdQm0AslKCc JzGyMEH2jqrsJJ1C0OfGuIcQD+P/XONE76/p50+/puQUHQU+/wstQu1OFEBRI04fHAzY M+OcbPhmy0w4X/PNtdXtDNeYwpgDI/7+FVvc0Zw7hy1VZaQpEZiztNYnjjma4cfHY+8z 5RbQ== MIME-Version: 1.0 Received: by 10.52.89.172 with SMTP id bp12mr22030964vdb.19.1351093284273; Wed, 24 Oct 2012 08:41:24 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.150.197 with HTTP; Wed, 24 Oct 2012 08:41:24 -0700 (PDT) In-Reply-To: <201210241136.06154.jhb@freebsd.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> Date: Wed, 24 Oct 2012 16:41:24 +0100 X-Google-Sender-Auth: 3BuSjfLVIpAZV-8ZpenyeefsdhM Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:41:25 -0000 On Wed, Oct 24, 2012 at 4:36 PM, John Baldwin wrote: > On Wednesday, October 24, 2012 11:24:22 am Attilio Rao wrote: >> On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao wrote: >> > On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: >> >> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: >> >>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: >> >>> > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: >> >>> >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: >> >>> >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann >> >> wrote: >> >>> >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. >> >>> >> > >> >>> >> > That doesn't matter. Language basics like variable definitions should >> >>> >> > not be obscured by macros. It either takes longer to figure out what >> >>> >> > a variable is (because one needs to look up the definition of the >> >>> >> > macro) or makes it almost impossible (because now e.g. cscope doesn't >> >>> >> > know this is a variable definition. >> >>> >> >> >>> >> Sigh, cscope doesn't expand macros? >> >>> >> >> >>> >> Is there a way to do the cache line alignment in a sane way without >> >>> >> littering __aligned(CACHE_LINE_SIZE) all over the place? >> >>> > >> >>> > I was hoping to do something with an anonymous union or some such like: >> >>> > >> >>> > union mtx_aligned { >> >>> > struct mtx; >> >>> > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >> >>> > } >> >>> > >> >>> > I don't know if there is a useful way to define an 'aligned mutex' type >> >>> > that will transparently map to a 'struct mtx', e.g.: >> >>> > >> >>> > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; >> >>> >> >>> Unfortunately that doesn't work as I've verified with alc@ few months ago. >> >>> The __aligned() attribute only works with structures definition, not >> >>> objects declaration. >> >> >> >> Are you saying that the typedef doesn't (I expect it doesn't), or that this >> >> doesn't: >> >> >> >> struct mtx foo __aligned(CACHE_LINE_SIZE); >> > >> > I meant to say that such notation won't address the padding issue >> > which is as import as the alignment. Infact, for sensitive locks, >> > having just an aligned object is not really useful if the cacheline >> > gets shared. >> > In the end you will need to use explicit padding or use __aligned in >> > the struct definition, which cannot be used as a general pattern. >> >> The quickest way I see this can be made general is to have a specific >> struct defined in sys/_mutex.h like that >> >> struct mtx_unshare { >> struct mtx lock; >> char _pad[CACHE_LINE_SIZE - sizeof(struct mtx)]; >> } __aligned(CACHE_LINE_SIZE); > > I think instead you want my union above that uses roundup2 in case a lock > eats up multiple cache lines: Do you think locks can eat more than one cacheline? This would be absolutely killer for performance. > union mtx_foo { > struct mtx lock; > char junk[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; > } __aligned_CACHE_LINE_SIZE; > >> then let mtx_* functions to accept void ptrs and cast them to struct >> mtx as long as the functions enter. > > Eh, that removes all compile time type checks. That seems very dubious to me. Well right now fast path already has a fair amount of macros wrapping the operations, which don't really enforce any type checks. Another way to do this would be to forsee an helper function to extract the struct mtx from the mtx_unshare and pass it to underlying mtx_* functions. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:43:04 2012 Return-Path: Delivered-To: svn-src-user@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 92623F9B; Wed, 24 Oct 2012 15:43:04 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 15B6F8FC14; Wed, 24 Oct 2012 15:43:03 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9OFh2iq095774; Wed, 24 Oct 2012 19:43:02 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9OFh2IE095773; Wed, 24 Oct 2012 19:43:02 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 24 Oct 2012 19:43:02 +0400 From: Gleb Smirnoff To: John Baldwin Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... Message-ID: <20121024154302.GH70741@FreeBSD.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201210241136.06154.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: mdf@FreeBSD.org, src-committers@FreeBSD.org, Andre Oppermann , svn-src-user@FreeBSD.org, attilio@FreeBSD.org, Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:43:05 -0000 On Wed, Oct 24, 2012 at 11:36:06AM -0400, John Baldwin wrote: J> On Wednesday, October 24, 2012 11:24:22 am Attilio Rao wrote: J> > On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao wrote: J> > > On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: J> > >> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: J> > >>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: J> > >>> > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: J> > >>> >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: J> > >>> >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann J> > >> wrote: J> > >>> >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. J> > >>> >> > J> > >>> >> > That doesn't matter. Language basics like variable definitions should J> > >>> >> > not be obscured by macros. It either takes longer to figure out what J> > >>> >> > a variable is (because one needs to look up the definition of the J> > >>> >> > macro) or makes it almost impossible (because now e.g. cscope doesn't J> > >>> >> > know this is a variable definition. J> > >>> >> J> > >>> >> Sigh, cscope doesn't expand macros? J> > >>> >> J> > >>> >> Is there a way to do the cache line alignment in a sane way without J> > >>> >> littering __aligned(CACHE_LINE_SIZE) all over the place? J> > >>> > J> > >>> > I was hoping to do something with an anonymous union or some such like: J> > >>> > J> > >>> > union mtx_aligned { J> > >>> > struct mtx; J> > >>> > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; J> > >>> > } J> > >>> > J> > >>> > I don't know if there is a useful way to define an 'aligned mutex' type J> > >>> > that will transparently map to a 'struct mtx', e.g.: J> > >>> > J> > >>> > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; J> > >>> J> > >>> Unfortunately that doesn't work as I've verified with alc@ few months ago. J> > >>> The __aligned() attribute only works with structures definition, not J> > >>> objects declaration. J> > >> J> > >> Are you saying that the typedef doesn't (I expect it doesn't), or that this J> > >> doesn't: J> > >> J> > >> struct mtx foo __aligned(CACHE_LINE_SIZE); J> > > J> > > I meant to say that such notation won't address the padding issue J> > > which is as import as the alignment. Infact, for sensitive locks, J> > > having just an aligned object is not really useful if the cacheline J> > > gets shared. J> > > In the end you will need to use explicit padding or use __aligned in J> > > the struct definition, which cannot be used as a general pattern. J> > J> > The quickest way I see this can be made general is to have a specific J> > struct defined in sys/_mutex.h like that J> > J> > struct mtx_unshare { J> > struct mtx lock; J> > char _pad[CACHE_LINE_SIZE - sizeof(struct mtx)]; J> > } __aligned(CACHE_LINE_SIZE); J> J> I think instead you want my union above that uses roundup2 in case a lock J> eats up multiple cache lines: J> J> union mtx_foo { J> struct mtx lock; J> char junk[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; J> } __aligned_CACHE_LINE_SIZE; J> J> > then let mtx_* functions to accept void ptrs and cast them to struct J> > mtx as long as the functions enter. J> J> Eh, that removes all compile time type checks. That seems very dubious to me. I think that we should first get benchmarking results, and only then try to evolve an API for cache aligned mutexes. As an option we can allocate mutexes from cache aligned uma zone dynamically, to avoid all these syntax acrobatics. -- Totus tuus, Glebius. From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:45:16 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A04C91DF; Wed, 24 Oct 2012 15:45:16 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 042B68FC0C; Wed, 24 Oct 2012 15:45:14 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id fw7so846523vcb.13 for ; Wed, 24 Oct 2012 08:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=vL7Lrkz7oVfGCA8+LQCphDGrBZ/OUled68MCmM1Vqmc=; b=mJKD1627upnDJyz1lHQgal+UEM13Cd/sbj/bOCKDpIw46d7HUqklaro6hcgbvoCWoq fl5Nhg9OZO2rq7/lTMyHZvepVIQhPqt8MRuE5HO+y1lLYjsBDdAwTliyfgCQxlgQkAsV i/TmFlCqca9QmH5bKsIKUSmIovrkDizQ1Sno7D0NcxmW3CW3zq1RtvWQN8Be0K/8xmd3 SlxyAVDfPQf6oNt1s6Mouo3rrg4GdVy36ozlNcNAmI1l9RIhDaw1KLYC3j9DRt6HcT/T t+eTMNG0LBic/mld5vdl5xuDsU9dNVPRmXRpj9DgEqZvrTHp/OPP1qWC9pbSow1ORWK6 17ow== MIME-Version: 1.0 Received: by 10.52.176.168 with SMTP id cj8mr22519528vdc.72.1351093507646; Wed, 24 Oct 2012 08:45:07 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.150.197 with HTTP; Wed, 24 Oct 2012 08:45:07 -0700 (PDT) In-Reply-To: <20121024154302.GH70741@FreeBSD.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <20121024154302.GH70741@FreeBSD.org> Date: Wed, 24 Oct 2012 16:45:07 +0100 X-Google-Sender-Auth: _HTegseU8NuhruHXnBPusAoYlfI Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , John Baldwin , svn-src-user@freebsd.org, Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:45:16 -0000 On Wed, Oct 24, 2012 at 4:43 PM, Gleb Smirnoff wrote: > On Wed, Oct 24, 2012 at 11:36:06AM -0400, John Baldwin wrote: > J> On Wednesday, October 24, 2012 11:24:22 am Attilio Rao wrote: > J> > On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao wrote: > J> > > On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: > J> > >> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: > J> > >>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: > J> > >>> > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: > J> > >>> >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: > J> > >>> >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann > J> > >> wrote: > J> > >>> >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. > J> > >>> >> > > J> > >>> >> > That doesn't matter. Language basics like variable definitions should > J> > >>> >> > not be obscured by macros. It either takes longer to figure out what > J> > >>> >> > a variable is (because one needs to look up the definition of the > J> > >>> >> > macro) or makes it almost impossible (because now e.g. cscope doesn't > J> > >>> >> > know this is a variable definition. > J> > >>> >> > J> > >>> >> Sigh, cscope doesn't expand macros? > J> > >>> >> > J> > >>> >> Is there a way to do the cache line alignment in a sane way without > J> > >>> >> littering __aligned(CACHE_LINE_SIZE) all over the place? > J> > >>> > > J> > >>> > I was hoping to do something with an anonymous union or some such like: > J> > >>> > > J> > >>> > union mtx_aligned { > J> > >>> > struct mtx; > J> > >>> > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; > J> > >>> > } > J> > >>> > > J> > >>> > I don't know if there is a useful way to define an 'aligned mutex' type > J> > >>> > that will transparently map to a 'struct mtx', e.g.: > J> > >>> > > J> > >>> > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; > J> > >>> > J> > >>> Unfortunately that doesn't work as I've verified with alc@ few months ago. > J> > >>> The __aligned() attribute only works with structures definition, not > J> > >>> objects declaration. > J> > >> > J> > >> Are you saying that the typedef doesn't (I expect it doesn't), or that this > J> > >> doesn't: > J> > >> > J> > >> struct mtx foo __aligned(CACHE_LINE_SIZE); > J> > > > J> > > I meant to say that such notation won't address the padding issue > J> > > which is as import as the alignment. Infact, for sensitive locks, > J> > > having just an aligned object is not really useful if the cacheline > J> > > gets shared. > J> > > In the end you will need to use explicit padding or use __aligned in > J> > > the struct definition, which cannot be used as a general pattern. > J> > > J> > The quickest way I see this can be made general is to have a specific > J> > struct defined in sys/_mutex.h like that > J> > > J> > struct mtx_unshare { > J> > struct mtx lock; > J> > char _pad[CACHE_LINE_SIZE - sizeof(struct mtx)]; > J> > } __aligned(CACHE_LINE_SIZE); > J> > J> I think instead you want my union above that uses roundup2 in case a lock > J> eats up multiple cache lines: > J> > J> union mtx_foo { > J> struct mtx lock; > J> char junk[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; > J> } __aligned_CACHE_LINE_SIZE; > J> > J> > then let mtx_* functions to accept void ptrs and cast them to struct > J> > mtx as long as the functions enter. > J> > J> Eh, that removes all compile time type checks. That seems very dubious to me. > > I think that we should first get benchmarking results, and only then try > to evolve an API for cache aligned mutexes. > > As an option we can allocate mutexes from cache aligned uma zone dynamically, > to avoid all these syntax acrobatics. There are several objections to this. Quicker that came to my mind: - Some locks needs to be ready before UMA subsystem is setup - On arches where the KVA is already scarce (i386, powerpc, etc.) this is going to be completely overkill Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:47:02 2012 Return-Path: Delivered-To: svn-src-user@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03DDA53D; Wed, 24 Oct 2012 15:47:02 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 373418FC17; Wed, 24 Oct 2012 15:47:01 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9OFl0oo095838; Wed, 24 Oct 2012 19:47:00 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9OFl05W095837; Wed, 24 Oct 2012 19:47:00 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 24 Oct 2012 19:47:00 +0400 From: Gleb Smirnoff To: Attilio Rao Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... Message-ID: <20121024154700.GI70741@FreeBSD.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <20121024154302.GH70741@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: mdf@FreeBSD.org, src-committers@FreeBSD.org, Andre Oppermann , John Baldwin , svn-src-user@FreeBSD.org, Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:47:02 -0000 On Wed, Oct 24, 2012 at 04:45:07PM +0100, Attilio Rao wrote: A> On Wed, Oct 24, 2012 at 4:43 PM, Gleb Smirnoff wrote: A> > On Wed, Oct 24, 2012 at 11:36:06AM -0400, John Baldwin wrote: A> > J> On Wednesday, October 24, 2012 11:24:22 am Attilio Rao wrote: A> > J> > On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao wrote: A> > J> > > On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: A> > J> > >> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: A> > J> > >>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: A> > J> > >>> > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: A> > J> > >>> >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: A> > J> > >>> >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann A> > J> > >> wrote: A> > J> > >>> >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. A> > J> > >>> >> > A> > J> > >>> >> > That doesn't matter. Language basics like variable definitions should A> > J> > >>> >> > not be obscured by macros. It either takes longer to figure out what A> > J> > >>> >> > a variable is (because one needs to look up the definition of the A> > J> > >>> >> > macro) or makes it almost impossible (because now e.g. cscope doesn't A> > J> > >>> >> > know this is a variable definition. A> > J> > >>> >> A> > J> > >>> >> Sigh, cscope doesn't expand macros? A> > J> > >>> >> A> > J> > >>> >> Is there a way to do the cache line alignment in a sane way without A> > J> > >>> >> littering __aligned(CACHE_LINE_SIZE) all over the place? A> > J> > >>> > A> > J> > >>> > I was hoping to do something with an anonymous union or some such like: A> > J> > >>> > A> > J> > >>> > union mtx_aligned { A> > J> > >>> > struct mtx; A> > J> > >>> > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; A> > J> > >>> > } A> > J> > >>> > A> > J> > >>> > I don't know if there is a useful way to define an 'aligned mutex' type A> > J> > >>> > that will transparently map to a 'struct mtx', e.g.: A> > J> > >>> > A> > J> > >>> > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; A> > J> > >>> A> > J> > >>> Unfortunately that doesn't work as I've verified with alc@ few months ago. A> > J> > >>> The __aligned() attribute only works with structures definition, not A> > J> > >>> objects declaration. A> > J> > >> A> > J> > >> Are you saying that the typedef doesn't (I expect it doesn't), or that this A> > J> > >> doesn't: A> > J> > >> A> > J> > >> struct mtx foo __aligned(CACHE_LINE_SIZE); A> > J> > > A> > J> > > I meant to say that such notation won't address the padding issue A> > J> > > which is as import as the alignment. Infact, for sensitive locks, A> > J> > > having just an aligned object is not really useful if the cacheline A> > J> > > gets shared. A> > J> > > In the end you will need to use explicit padding or use __aligned in A> > J> > > the struct definition, which cannot be used as a general pattern. A> > J> > A> > J> > The quickest way I see this can be made general is to have a specific A> > J> > struct defined in sys/_mutex.h like that A> > J> > A> > J> > struct mtx_unshare { A> > J> > struct mtx lock; A> > J> > char _pad[CACHE_LINE_SIZE - sizeof(struct mtx)]; A> > J> > } __aligned(CACHE_LINE_SIZE); A> > J> A> > J> I think instead you want my union above that uses roundup2 in case a lock A> > J> eats up multiple cache lines: A> > J> A> > J> union mtx_foo { A> > J> struct mtx lock; A> > J> char junk[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; A> > J> } __aligned_CACHE_LINE_SIZE; A> > J> A> > J> > then let mtx_* functions to accept void ptrs and cast them to struct A> > J> > mtx as long as the functions enter. A> > J> A> > J> Eh, that removes all compile time type checks. That seems very dubious to me. A> > A> > I think that we should first get benchmarking results, and only then try A> > to evolve an API for cache aligned mutexes. A> > A> > As an option we can allocate mutexes from cache aligned uma zone dynamically, A> > to avoid all these syntax acrobatics. A> A> There are several objections to this. Quicker that came to my mind: A> - Some locks needs to be ready before UMA subsystem is setup I suppose there are not a lot of them, and those can be aligned by hand. A> - On arches where the KVA is already scarce (i386, powerpc, etc.) this A> is going to be completely overkill Do we really have that much mutexes on bss, that moving them to dynamic allocator would affect kva? -- Totus tuus, Glebius. From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 15:49:23 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9CF136A7; Wed, 24 Oct 2012 15:49:23 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id BDA698FC0A; Wed, 24 Oct 2012 15:49:22 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id v11so872747vbm.13 for ; Wed, 24 Oct 2012 08:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=GsKJGvB/j6FtW5MYuo0zwrsIlatmiAHFlDXvtWFq3Po=; b=MYdaSiDbtkr0Fdck5gPPNg16JRIzx4APAQ5xNm3QnUhnac1kZCKNC+v04wd0OR+H7s N109opkE8UJYNzTzzJwWj8EcVZ0AgFAHJKaPvgqJxGDPAA+Vv4FNGTS5N8THxBYDN2sx jtozQWGP9BhKcUkaIpKgISh4Itjk8OSBsf83eivRlEuG3ILhmcmp6GHdVQHWzzypE2Ic yEXY43ZomdRDKTCh+ASxOXRIHQcXfOAPiC2iaHoyMZdl0rR3MMIIzqxTGYwp5JL9TxjW d1KhdYbO5KZwUKrwg7MwFNiSbXb7h0csdVX8VAIGyDa4GzgmiLQqWLcIdTc8C8kTbHZl 2C2g== MIME-Version: 1.0 Received: by 10.58.201.73 with SMTP id jy9mr29879900vec.29.1351093761964; Wed, 24 Oct 2012 08:49:21 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.150.197 with HTTP; Wed, 24 Oct 2012 08:49:21 -0700 (PDT) In-Reply-To: <20121024154700.GI70741@FreeBSD.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <20121024154302.GH70741@FreeBSD.org> <20121024154700.GI70741@FreeBSD.org> Date: Wed, 24 Oct 2012 16:49:21 +0100 X-Google-Sender-Auth: t5PAC9TGOc8H_l0UU8uscHwaVz8 Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , John Baldwin , svn-src-user@freebsd.org, Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 15:49:23 -0000 On Wed, Oct 24, 2012 at 4:47 PM, Gleb Smirnoff wrote: > On Wed, Oct 24, 2012 at 04:45:07PM +0100, Attilio Rao wrote: > A> On Wed, Oct 24, 2012 at 4:43 PM, Gleb Smirnoff wrote: > A> > On Wed, Oct 24, 2012 at 11:36:06AM -0400, John Baldwin wrote: > A> > J> On Wednesday, October 24, 2012 11:24:22 am Attilio Rao wrote: > A> > J> > On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao wrote: > A> > J> > > On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: > A> > J> > >> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: > A> > J> > >>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: > A> > J> > >>> > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: > A> > J> > >>> >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: > A> > J> > >>> >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann > A> > J> > >> wrote: > A> > J> > >>> >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. > A> > J> > >>> >> > > A> > J> > >>> >> > That doesn't matter. Language basics like variable definitions should > A> > J> > >>> >> > not be obscured by macros. It either takes longer to figure out what > A> > J> > >>> >> > a variable is (because one needs to look up the definition of the > A> > J> > >>> >> > macro) or makes it almost impossible (because now e.g. cscope doesn't > A> > J> > >>> >> > know this is a variable definition. > A> > J> > >>> >> > A> > J> > >>> >> Sigh, cscope doesn't expand macros? > A> > J> > >>> >> > A> > J> > >>> >> Is there a way to do the cache line alignment in a sane way without > A> > J> > >>> >> littering __aligned(CACHE_LINE_SIZE) all over the place? > A> > J> > >>> > > A> > J> > >>> > I was hoping to do something with an anonymous union or some such like: > A> > J> > >>> > > A> > J> > >>> > union mtx_aligned { > A> > J> > >>> > struct mtx; > A> > J> > >>> > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; > A> > J> > >>> > } > A> > J> > >>> > > A> > J> > >>> > I don't know if there is a useful way to define an 'aligned mutex' type > A> > J> > >>> > that will transparently map to a 'struct mtx', e.g.: > A> > J> > >>> > > A> > J> > >>> > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; > A> > J> > >>> > A> > J> > >>> Unfortunately that doesn't work as I've verified with alc@ few months ago. > A> > J> > >>> The __aligned() attribute only works with structures definition, not > A> > J> > >>> objects declaration. > A> > J> > >> > A> > J> > >> Are you saying that the typedef doesn't (I expect it doesn't), or that this > A> > J> > >> doesn't: > A> > J> > >> > A> > J> > >> struct mtx foo __aligned(CACHE_LINE_SIZE); > A> > J> > > > A> > J> > > I meant to say that such notation won't address the padding issue > A> > J> > > which is as import as the alignment. Infact, for sensitive locks, > A> > J> > > having just an aligned object is not really useful if the cacheline > A> > J> > > gets shared. > A> > J> > > In the end you will need to use explicit padding or use __aligned in > A> > J> > > the struct definition, which cannot be used as a general pattern. > A> > J> > > A> > J> > The quickest way I see this can be made general is to have a specific > A> > J> > struct defined in sys/_mutex.h like that > A> > J> > > A> > J> > struct mtx_unshare { > A> > J> > struct mtx lock; > A> > J> > char _pad[CACHE_LINE_SIZE - sizeof(struct mtx)]; > A> > J> > } __aligned(CACHE_LINE_SIZE); > A> > J> > A> > J> I think instead you want my union above that uses roundup2 in case a lock > A> > J> eats up multiple cache lines: > A> > J> > A> > J> union mtx_foo { > A> > J> struct mtx lock; > A> > J> char junk[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; > A> > J> } __aligned_CACHE_LINE_SIZE; > A> > J> > A> > J> > then let mtx_* functions to accept void ptrs and cast them to struct > A> > J> > mtx as long as the functions enter. > A> > J> > A> > J> Eh, that removes all compile time type checks. That seems very dubious to me. > A> > > A> > I think that we should first get benchmarking results, and only then try > A> > to evolve an API for cache aligned mutexes. > A> > > A> > As an option we can allocate mutexes from cache aligned uma zone dynamically, > A> > to avoid all these syntax acrobatics. > A> > A> There are several objections to this. Quicker that came to my mind: > A> - Some locks needs to be ready before UMA subsystem is setup > > I suppose there are not a lot of them, and those can be aligned by hand. Actually I think they are quite a few. And however the whole point of this is to avoid manual frobbing. > A> - On arches where the KVA is already scarce (i386, powerpc, etc.) this > A> is going to be completely overkill > > Do we really have that much mutexes on bss, that moving them to dynamic > allocator would affect kva? In my mind every lock that doesn't belong to a struct should be moved to be mtx_unshared, really. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 16:56:58 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 122C5539; Wed, 24 Oct 2012 16:56:58 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF6BA8FC12; Wed, 24 Oct 2012 16:56:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9OGuv8N056223; Wed, 24 Oct 2012 16:56:57 GMT (envelope-from crees@svn.freebsd.org) Received: (from crees@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OGuvV2056222; Wed, 24 Oct 2012 16:56:57 GMT (envelope-from crees@svn.freebsd.org) Message-Id: <201210241656.q9OGuvV2056222@svn.freebsd.org> From: Chris Rees Date: Wed, 24 Oct 2012 16:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242009 - user/crees/rclint X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 16:56:58 -0000 Author: crees (ports committer) Date: Wed Oct 24 16:56:57 2012 New Revision: 242009 URL: http://svn.freebsd.org/changeset/base/242009 Log: Allow _user to be clobbered; blank values not allowed Modified: user/crees/rclint/rclint.py Modified: user/crees/rclint/rclint.py ============================================================================== --- user/crees/rclint/rclint.py Wed Oct 24 16:53:02 2012 (r242008) +++ user/crees/rclint/rclint.py Wed Oct 24 16:56:57 2012 (r242009) @@ -237,7 +237,7 @@ def do_ports_checking(lineobj, filename) logging.debug('Checking for defaults clobbering blank values') for var in lineobj['Variable']: if var.type in ('longhand', 'shorthand'): - if var.name.split('_')[-1] not in ('enable') and var.clobber: + if var.name.split('_')[-1] not in ('enable', 'user') and var.clobber: error.give('variables_defaults_non_mandatory_colon', var.line) elif not var.clobber and var.name.split('_')[-1] in ('enable'): error.give('variables_defaults_mandatory_colon', var.line) From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 18:16:18 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22913366; Wed, 24 Oct 2012 18:16:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id BC9558FC0A; Wed, 24 Oct 2012 18:16:17 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 08BB4B97D; Wed, 24 Oct 2012 14:16:17 -0400 (EDT) From: John Baldwin To: attilio@freebsd.org Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... Date: Wed, 24 Oct 2012 14:14:30 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210241414.30723.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 24 Oct 2012 14:16:17 -0400 (EDT) Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 18:16:18 -0000 On Wednesday, October 24, 2012 11:41:24 am Attilio Rao wrote: > On Wed, Oct 24, 2012 at 4:36 PM, John Baldwin wrote: > > On Wednesday, October 24, 2012 11:24:22 am Attilio Rao wrote: > >> On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao wrote: > >> > On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: > >> >> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: > >> >>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: > >> >>> > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: > >> >>> >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: > >> >>> >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann > >> >> wrote: > >> >>> >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. > >> >>> >> > > >> >>> >> > That doesn't matter. Language basics like variable definitions should > >> >>> >> > not be obscured by macros. It either takes longer to figure out what > >> >>> >> > a variable is (because one needs to look up the definition of the > >> >>> >> > macro) or makes it almost impossible (because now e.g. cscope doesn't > >> >>> >> > know this is a variable definition. > >> >>> >> > >> >>> >> Sigh, cscope doesn't expand macros? > >> >>> >> > >> >>> >> Is there a way to do the cache line alignment in a sane way without > >> >>> >> littering __aligned(CACHE_LINE_SIZE) all over the place? > >> >>> > > >> >>> > I was hoping to do something with an anonymous union or some such like: > >> >>> > > >> >>> > union mtx_aligned { > >> >>> > struct mtx; > >> >>> > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; > >> >>> > } > >> >>> > > >> >>> > I don't know if there is a useful way to define an 'aligned mutex' type > >> >>> > that will transparently map to a 'struct mtx', e.g.: > >> >>> > > >> >>> > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; > >> >>> > >> >>> Unfortunately that doesn't work as I've verified with alc@ few months ago. > >> >>> The __aligned() attribute only works with structures definition, not > >> >>> objects declaration. > >> >> > >> >> Are you saying that the typedef doesn't (I expect it doesn't), or that this > >> >> doesn't: > >> >> > >> >> struct mtx foo __aligned(CACHE_LINE_SIZE); > >> > > >> > I meant to say that such notation won't address the padding issue > >> > which is as import as the alignment. Infact, for sensitive locks, > >> > having just an aligned object is not really useful if the cacheline > >> > gets shared. > >> > In the end you will need to use explicit padding or use __aligned in > >> > the struct definition, which cannot be used as a general pattern. > >> > >> The quickest way I see this can be made general is to have a specific > >> struct defined in sys/_mutex.h like that > >> > >> struct mtx_unshare { > >> struct mtx lock; > >> char _pad[CACHE_LINE_SIZE - sizeof(struct mtx)]; > >> } __aligned(CACHE_LINE_SIZE); > > > > I think instead you want my union above that uses roundup2 in case a lock > > eats up multiple cache lines: > > Do you think locks can eat more than one cacheline? This would be > absolutely killer for performance. Not the lock cookie, but 'struct lock_object', etc. aren't entirely trivial. If you had a 32-bit platform with a 16-byte cache line size I wouldn't be surprised if the entire structure spilled over a cacheline. > > union mtx_foo { > > struct mtx lock; > > char junk[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; > > } __aligned_CACHE_LINE_SIZE; > > > >> then let mtx_* functions to accept void ptrs and cast them to struct > >> mtx as long as the functions enter. > > > > Eh, that removes all compile time type checks. That seems very dubious to me. > > Well right now fast path already has a fair amount of macros wrapping > the operations, which don't really enforce any type checks. Sure they do. They still call a function that takes a 'struct mtx *' even if it isn't called in the fast path. If you pass a 'struct sx *' to mtx_lock() it will fail to compile. That needs to stay that way. -- John Baldwin From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 18:16:18 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9560936A; Wed, 24 Oct 2012 18:16:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6679C8FC0C; Wed, 24 Oct 2012 18:16:18 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A75E7B9AD; Wed, 24 Oct 2012 14:16:17 -0400 (EDT) From: John Baldwin To: Maxim Konovalov Subject: Re: svn commit: r242003 - user/andre/tcp_workqueue/sys/netinet Date: Wed, 24 Oct 2012 14:15:32 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210241502.q9OF2erf037597@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210241415.32836.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 24 Oct 2012 14:16:17 -0400 (EDT) Cc: src-committers@freebsd.org, Andre Oppermann , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 18:16:18 -0000 On Wednesday, October 24, 2012 11:33:45 am Maxim Konovalov wrote: > On Wed, 24 Oct 2012, 15:02-0000, Andre Oppermann wrote: > > > Author: andre > > Date: Wed Oct 24 15:02:39 2012 > > New Revision: 242003 > > URL: http://svn.freebsd.org/changeset/base/242003 > > > > Log: > > Mark the tcpstat sysctl read-only instead of writeable. Userspace > > should not write into tcp statistics. > > > Why? "netstat -z -p tcp" does that and this is a nice feature. Agreed. -- John Baldwin From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 19:38:01 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 310DF699 for ; Wed, 24 Oct 2012 19:38:01 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 897998FC12 for ; Wed, 24 Oct 2012 19:38:00 +0000 (UTC) Received: (qmail 35408 invoked from network); 24 Oct 2012 21:15:46 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 24 Oct 2012 21:15:46 -0000 Message-ID: <5088438B.90204@freebsd.org> Date: Wed, 24 Oct 2012 21:37:47 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: attilio@FreeBSD.org Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... References: <201210221418.q9MEINkr026751@svn.freebsd.org> <50872624.6060901@freebsd.org> <201210241005.38977.jhb@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: mdf@freebsd.org, src-committers@freebsd.org, Bruce Evans , John Baldwin , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 19:38:01 -0000 On 24.10.2012 16:34, Attilio Rao wrote: > On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: >> On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: >>> Is there a way to do the cache line alignment in a sane way without >>> littering __aligned(CACHE_LINE_SIZE) all over the place? >> >> I was hoping to do something with an anonymous union or some such like: >> >> union mtx_aligned { >> struct mtx; >> char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >> } >> >> I don't know if there is a useful way to define an 'aligned mutex' type >> that will transparently map to a 'struct mtx', e.g.: >> >> typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; > > Unfortunately that doesn't work as I've verified with alc@ few months ago. > The __aligned() attribute only works with structures definition, not > objects declaration. There is a huge amount of false cache line sharing in the .bss section: ffffffff81515980 B accept_mtx ffffffff815159a0 B maxsockets ffffffff815159a8 B socket_zone ffffffff815159b0 B so_gencnt ffffffff815159b8 B sysctl__kern_ipc_children accept_mtx, socket_zone and so_gencnt are frequently accessed but not related to each other and on different code path's. There is a lot of pointless cache dirtying going on. Example randomly picked from "nm -n kernel.debug". -- Andre From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 19:48:59 2012 Return-Path: Delivered-To: svn-src-user@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C52DA40 for ; Wed, 24 Oct 2012 19:48:59 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 6FA3D8FC14 for ; Wed, 24 Oct 2012 19:48:58 +0000 (UTC) Received: (qmail 35470 invoked from network); 24 Oct 2012 21:26:44 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 24 Oct 2012 21:26:44 -0000 Message-ID: <5088461D.7090301@freebsd.org> Date: Wed, 24 Oct 2012 21:48:45 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Maxim Konovalov Subject: Re: svn commit: r242003 - user/andre/tcp_workqueue/sys/netinet References: <201210241502.q9OF2erf037597@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.ORG, svn-src-user@FreeBSD.ORG X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 19:48:59 -0000 On 24.10.2012 17:33, Maxim Konovalov wrote: > On Wed, 24 Oct 2012, 15:02-0000, Andre Oppermann wrote: > >> Author: andre >> Date: Wed Oct 24 15:02:39 2012 >> New Revision: 242003 >> URL: http://svn.freebsd.org/changeset/base/242003 >> >> Log: >> Mark the tcpstat sysctl read-only instead of writeable. Userspace >> should not write into tcp statistics. >> > Why? "netstat -z -p tcp" does that and this is a nice feature. Agreed. Didn't think of that. Will scrap it. -- Andre From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 19:59:17 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 607DF2AF; Wed, 24 Oct 2012 19:59:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 231258FC0A; Wed, 24 Oct 2012 19:59:16 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so1558834pbb.13 for ; Wed, 24 Oct 2012 12:59:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=zq5H93exz9QcaH0DgYn0Fo3O3P00KyeZEe8g/6KUqCc=; b=hNjslO1VXsTXcPp6ZOLKqpI5TwzPlr6V+5/P3SJT+jiQgS+Z8PWupNxoW832NaNLE+ HpX2jV7RwN+vZYBu7QdeplD7RAV4tRTwYw+CgX074BmOR1ucp6V4bpNT5SkkEhCan38N yPtkVDSqVvD7aiLpHKYuATMjfGJ8WTTSFNit0QCN7KScpyvFe1TUZx7e0F7jox0DYK/Y KX0Bj4AAm4vWZMVZYIuND7tKW9wSb4LDUIlJ4/SPtnCijUO9xqceAm0qd/KRzmlTzklW a0AgOaI6vXseJNv6vmISNoa+IHxxQWCbw5Z57GeYxMIRnblh3N0cmGGYaArL1y+TXypu ZoRg== MIME-Version: 1.0 Received: by 10.68.228.130 with SMTP id si2mr34170014pbc.126.1351108756748; Wed, 24 Oct 2012 12:59:16 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.146.233 with HTTP; Wed, 24 Oct 2012 12:59:16 -0700 (PDT) In-Reply-To: <5088461D.7090301@freebsd.org> References: <201210241502.q9OF2erf037597@svn.freebsd.org> <5088461D.7090301@freebsd.org> Date: Wed, 24 Oct 2012 12:59:16 -0700 X-Google-Sender-Auth: ySNQ_75RmVzT29mlOqMTqZ7smcI Message-ID: Subject: Re: svn commit: r242003 - user/andre/tcp_workqueue/sys/netinet From: Adrian Chadd To: Andre Oppermann Content-Type: text/plain; charset=ISO-8859-1 Cc: Maxim Konovalov , src-committers@freebsd.org, svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 19:59:17 -0000 well, maybe add a sysctl that specifically _zeros_ the stat counters. So, leave the stat counters RO in this case. adrian From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 20:13:17 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9CEFF9E3; Wed, 24 Oct 2012 20:13:17 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3D31F8FC0C; Wed, 24 Oct 2012 20:13:15 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so733164lag.13 for ; Wed, 24 Oct 2012 13:13:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=rsqbocoipVfVHWhZXWpiWOWt1OQWTBydPu1AebSrVgU=; b=hl8MtwjjCwqk0A2f5vos4+Q6HGT2rS4skOHfatVxpje8oBZNo/2CU2kkeAn1+/PE6t AxrlqNKysVzdlHRg9y2GLUKZXcl6S+AfIAGoS5TGMzMDTo2eKxbS9e73Ji6T+e24MXwZ mhBlcqNYdJzZRMPbutvGoSUJKvu782+60zuVji1nTq2e8IxRdsJ8IQrDXGkhbFh7wgVQ erwxCMEefNot5Ta0lt3Ciwulp3RfiKGYDb5T7CBllKe9F2MgzDmuljHormHt39zjt5oI vcqAdLo9WimXsaCCCbCQEJQvu1N9ggsOtQ92Kwj79+1nHtQ+JeFBqSkTYaPb5E1eTsQe jj3w== MIME-Version: 1.0 Received: by 10.112.28.98 with SMTP id a2mr6680801lbh.110.1351109594783; Wed, 24 Oct 2012 13:13:14 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Wed, 24 Oct 2012 13:13:14 -0700 (PDT) In-Reply-To: <201210241414.30723.jhb@freebsd.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <201210241414.30723.jhb@freebsd.org> Date: Wed, 24 Oct 2012 21:13:14 +0100 X-Google-Sender-Auth: eEdy3SCNqeU6Wme_IZtE6Um2BAI Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , Bruce Evans , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 20:13:17 -0000 On Wed, Oct 24, 2012 at 7:14 PM, John Baldwin wrote: > On Wednesday, October 24, 2012 11:41:24 am Attilio Rao wrote: >> On Wed, Oct 24, 2012 at 4:36 PM, John Baldwin wrote: >> > On Wednesday, October 24, 2012 11:24:22 am Attilio Rao wrote: >> >> On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao wrote: >> >> > On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: >> >> >> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: >> >> >>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: >> >> >>> > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: >> >> >>> >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: >> >> >>> >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann >> >> >> wrote: >> >> >>> >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. >> >> >>> >> > >> >> >>> >> > That doesn't matter. Language basics like variable definitions should >> >> >>> >> > not be obscured by macros. It either takes longer to figure out what >> >> >>> >> > a variable is (because one needs to look up the definition of the >> >> >>> >> > macro) or makes it almost impossible (because now e.g. cscope doesn't >> >> >>> >> > know this is a variable definition. >> >> >>> >> >> >> >>> >> Sigh, cscope doesn't expand macros? >> >> >>> >> >> >> >>> >> Is there a way to do the cache line alignment in a sane way without >> >> >>> >> littering __aligned(CACHE_LINE_SIZE) all over the place? >> >> >>> > >> >> >>> > I was hoping to do something with an anonymous union or some such like: >> >> >>> > >> >> >>> > union mtx_aligned { >> >> >>> > struct mtx; >> >> >>> > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >> >> >>> > } >> >> >>> > >> >> >>> > I don't know if there is a useful way to define an 'aligned mutex' type >> >> >>> > that will transparently map to a 'struct mtx', e.g.: >> >> >>> > >> >> >>> > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; >> >> >>> >> >> >>> Unfortunately that doesn't work as I've verified with alc@ few months ago. >> >> >>> The __aligned() attribute only works with structures definition, not >> >> >>> objects declaration. >> >> >> >> >> >> Are you saying that the typedef doesn't (I expect it doesn't), or that this >> >> >> doesn't: >> >> >> >> >> >> struct mtx foo __aligned(CACHE_LINE_SIZE); >> >> > >> >> > I meant to say that such notation won't address the padding issue >> >> > which is as import as the alignment. Infact, for sensitive locks, >> >> > having just an aligned object is not really useful if the cacheline >> >> > gets shared. >> >> > In the end you will need to use explicit padding or use __aligned in >> >> > the struct definition, which cannot be used as a general pattern. >> >> >> >> The quickest way I see this can be made general is to have a specific >> >> struct defined in sys/_mutex.h like that >> >> >> >> struct mtx_unshare { >> >> struct mtx lock; >> >> char _pad[CACHE_LINE_SIZE - sizeof(struct mtx)]; >> >> } __aligned(CACHE_LINE_SIZE); >> > >> > I think instead you want my union above that uses roundup2 in case a lock >> > eats up multiple cache lines: >> >> Do you think locks can eat more than one cacheline? This would be >> absolutely killer for performance. > > Not the lock cookie, but 'struct lock_object', etc. aren't entirely trivial. > If you had a 32-bit platform with a 16-byte cache line size I wouldn't be > surprised if the entire structure spilled over a cacheline. Cache line usually contains 8 words. struct mtx is madeup only by 4 or 5 (depending if you are on 64 or 32 bits). I think this is a no-concern and we should not encourage adding more words to it anyway. >> > union mtx_foo { >> > struct mtx lock; >> > char junk[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >> > } __aligned_CACHE_LINE_SIZE; >> > >> >> then let mtx_* functions to accept void ptrs and cast them to struct >> >> mtx as long as the functions enter. >> > >> > Eh, that removes all compile time type checks. That seems very dubious to me. >> >> Well right now fast path already has a fair amount of macros wrapping >> the operations, which don't really enforce any type checks. > > Sure they do. They still call a function that takes a 'struct mtx *' even > if it isn't called in the fast path. If you pass a 'struct sx *' to > mtx_lock() it will fail to compile. That needs to stay that way. I think that with some trickery using CTASSERT() and typeof() we may be able to enforce sanity even with void * arguments. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Wed Oct 24 20:16:28 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FEA8B45 for ; Wed, 24 Oct 2012 20:16:28 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 85B508FC16 for ; Wed, 24 Oct 2012 20:16:27 +0000 (UTC) Received: (qmail 36381 invoked from network); 24 Oct 2012 21:54:13 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 24 Oct 2012 21:54:13 -0000 Message-ID: <50884C8E.1000606@freebsd.org> Date: Wed, 24 Oct 2012 22:16:14 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r242003 - user/andre/tcp_workqueue/sys/netinet References: <201210241502.q9OF2erf037597@svn.freebsd.org> <5088461D.7090301@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Maxim Konovalov , src-committers@freebsd.org, svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 20:16:28 -0000 On 24.10.2012 21:59, Adrian Chadd wrote: > well, maybe add a sysctl that specifically _zeros_ the stat counters. > So, leave the stat counters RO in this case. Thought of that too. Doesn't really make much of a difference because write access to writeable sysctl's is only granted for root. All others can only read. If root wants to manipulate the tcp stats counters so be it. -- Andre From owner-svn-src-user@FreeBSD.ORG Thu Oct 25 03:14:27 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B109E8F2; Thu, 25 Oct 2012 03:14:27 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 40C4B8FC14; Thu, 25 Oct 2012 03:14:25 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so1103126lag.13 for ; Wed, 24 Oct 2012 20:14:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=9KgevtZKm9pwLFGk8J5heidf/sDFFrwqM3cBbrVMos4=; b=jR2B8EKQM6hbnLv+7oidz0IOc6D7epQvzeSkRHD0VddMyVFjM3d62G98VKA5zmeXtb ENSn8yt3VTeNN3ruIgUNS/KjUHS4ddYS5ngc+aoPdBvVQsSogk9bgNtH01PjxKWS4t8P 4PfILhe//SEmVGJy2HkyKegJKmVaBMV/6kgAeZIf9ES1O4HX7XDoJMy42e3e93SSLMbs l4SOuzb87R6rSh/a6WfsyQXWIf+ZcoJqKQKZSQW1ZMvnjBZef6jsk5XmVuK3UCljaNPy GzMKKeYQ/IiFV4SR20Q7DCqltyiYtN6vNBo21LffdEAVexOCqd5t3hulfOs2tvybJdLM isHQ== MIME-Version: 1.0 Received: by 10.112.82.103 with SMTP id h7mr7066652lby.50.1351134859041; Wed, 24 Oct 2012 20:14:19 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Wed, 24 Oct 2012 20:14:18 -0700 (PDT) In-Reply-To: References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <201210241414.30723.jhb@freebsd.org> Date: Thu, 25 Oct 2012 04:14:18 +0100 X-Google-Sender-Auth: MKc7XSKvIUT1Y2epnltvUSJxoHw Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , svn-src-user@freebsd.org, Jeff Roberson , Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2012 03:14:27 -0000 On Wed, Oct 24, 2012 at 9:13 PM, Attilio Rao wrote: > On Wed, Oct 24, 2012 at 7:14 PM, John Baldwin wrote: >> On Wednesday, October 24, 2012 11:41:24 am Attilio Rao wrote: >>> On Wed, Oct 24, 2012 at 4:36 PM, John Baldwin wrote: >>> > On Wednesday, October 24, 2012 11:24:22 am Attilio Rao wrote: >>> >> On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao wrote: >>> >> > On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: >>> >> >> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: >>> >> >>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: >>> >> >>> > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: >>> >> >>> >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: >>> >> >>> >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann >>> >> >> wrote: >>> >> >>> >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. >>> >> >>> >> > >>> >> >>> >> > That doesn't matter. Language basics like variable definitions should >>> >> >>> >> > not be obscured by macros. It either takes longer to figure out what >>> >> >>> >> > a variable is (because one needs to look up the definition of the >>> >> >>> >> > macro) or makes it almost impossible (because now e.g. cscope doesn't >>> >> >>> >> > know this is a variable definition. >>> >> >>> >> >>> >> >>> >> Sigh, cscope doesn't expand macros? >>> >> >>> >> >>> >> >>> >> Is there a way to do the cache line alignment in a sane way without >>> >> >>> >> littering __aligned(CACHE_LINE_SIZE) all over the place? >>> >> >>> > >>> >> >>> > I was hoping to do something with an anonymous union or some such like: >>> >> >>> > >>> >> >>> > union mtx_aligned { >>> >> >>> > struct mtx; >>> >> >>> > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >>> >> >>> > } >>> >> >>> > >>> >> >>> > I don't know if there is a useful way to define an 'aligned mutex' type >>> >> >>> > that will transparently map to a 'struct mtx', e.g.: >>> >> >>> > >>> >> >>> > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; >>> >> >>> >>> >> >>> Unfortunately that doesn't work as I've verified with alc@ few months ago. >>> >> >>> The __aligned() attribute only works with structures definition, not >>> >> >>> objects declaration. >>> >> >> >>> >> >> Are you saying that the typedef doesn't (I expect it doesn't), or that this >>> >> >> doesn't: >>> >> >> >>> >> >> struct mtx foo __aligned(CACHE_LINE_SIZE); >>> >> > >>> >> > I meant to say that such notation won't address the padding issue >>> >> > which is as import as the alignment. Infact, for sensitive locks, >>> >> > having just an aligned object is not really useful if the cacheline >>> >> > gets shared. >>> >> > In the end you will need to use explicit padding or use __aligned in >>> >> > the struct definition, which cannot be used as a general pattern. >>> >> >>> >> The quickest way I see this can be made general is to have a specific >>> >> struct defined in sys/_mutex.h like that >>> >> >>> >> struct mtx_unshare { >>> >> struct mtx lock; >>> >> char _pad[CACHE_LINE_SIZE - sizeof(struct mtx)]; >>> >> } __aligned(CACHE_LINE_SIZE); >>> > >>> > I think instead you want my union above that uses roundup2 in case a lock >>> > eats up multiple cache lines: >>> >>> Do you think locks can eat more than one cacheline? This would be >>> absolutely killer for performance. >> >> Not the lock cookie, but 'struct lock_object', etc. aren't entirely trivial. >> If you had a 32-bit platform with a 16-byte cache line size I wouldn't be >> surprised if the entire structure spilled over a cacheline. > > Cache line usually contains 8 words. > struct mtx is madeup only by 4 or 5 (depending if you are on 64 or 32 bits). > I think this is a no-concern and we should not encourage adding more > words to it anyway. > >>> > union mtx_foo { >>> > struct mtx lock; >>> > char junk[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >>> > } __aligned_CACHE_LINE_SIZE; >>> > >>> >> then let mtx_* functions to accept void ptrs and cast them to struct >>> >> mtx as long as the functions enter. >>> > >>> > Eh, that removes all compile time type checks. That seems very dubious to me. >>> >>> Well right now fast path already has a fair amount of macros wrapping >>> the operations, which don't really enforce any type checks. >> >> Sure they do. They still call a function that takes a 'struct mtx *' even >> if it isn't called in the fast path. If you pass a 'struct sx *' to >> mtx_lock() it will fail to compile. That needs to stay that way. > > I think that with some trickery using CTASSERT() and typeof() we may > be able to enforce sanity even with void * arguments. I think I've had a better idea for this. In our locking scheme we already rely on the fact that lock_object will always be present in all our locking primitives and that it will be the first object of every locking primitives. This is an assumption we must live with in order to correctly implement lock classes. I think we can use the same concept in order to use the same KPI for the 2 different structures (struct mtx and struct mtx_unshare) and keep the compile time ability to find stupid bugs. What I propose is that we assume mtx_lock remains always the second member of the struct mtx/mtx_unshare and no other lock is allowed to use such member name. This happens natually nowadays so there is no problem in having such a rule. What does that allows to do is to pass the address of the mtx_lock member to the underlying functions and from there we can get back the address of the mutex (because we assume that mtx_lock will be just after the first mandatory member lock_object). Here is a patch that implements mtx_init() in the way I think about: http://people.freebsd.org/~attilio/mtx_unshare_poc.patch this should give us all the desired effects. In this patch I've used volatile uintptr_t * but it can certainly be void * too, if you prefer less verbose. If you agree with this idea I can hack a patch right away. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Thu Oct 25 13:51:03 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4BA04A33; Thu, 25 Oct 2012 13:51:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id E63148FC1E; Thu, 25 Oct 2012 13:51:02 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4807DB9A4; Thu, 25 Oct 2012 09:51:02 -0400 (EDT) From: John Baldwin To: attilio@freebsd.org Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... Date: Thu, 25 Oct 2012 09:39:55 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210221418.q9MEINkr026751@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210250939.55534.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 25 Oct 2012 09:51:02 -0400 (EDT) Cc: mdf@freebsd.org, src-committers@freebsd.org, Andre Oppermann , svn-src-user@freebsd.org, Jeff Roberson , Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2012 13:51:03 -0000 On Wednesday, October 24, 2012 11:14:18 pm Attilio Rao wrote: > On Wed, Oct 24, 2012 at 9:13 PM, Attilio Rao wrote: > > On Wed, Oct 24, 2012 at 7:14 PM, John Baldwin wrote: > >> On Wednesday, October 24, 2012 11:41:24 am Attilio Rao wrote: > >>> On Wed, Oct 24, 2012 at 4:36 PM, John Baldwin wrote: > >>> > On Wednesday, October 24, 2012 11:24:22 am Attilio Rao wrote: > >>> >> On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao wrote: > >>> >> > On Wed, Oct 24, 2012 at 3:45 PM, John Baldwin wrote: > >>> >> >> On Wednesday, October 24, 2012 10:34:34 am Attilio Rao wrote: > >>> >> >>> On Wed, Oct 24, 2012 at 3:05 PM, John Baldwin wrote: > >>> >> >>> > On Tuesday, October 23, 2012 7:20:04 pm Andre Oppermann wrote: > >>> >> >>> >> On 24.10.2012 00:15, mdf@FreeBSD.org wrote: > >>> >> >>> >> > On Tue, Oct 23, 2012 at 7:41 AM, Andre Oppermann > >>> >> >> wrote: > >>> >> >>> >> >> Struct mtx and MTX_SYSINIT always occur as pair next to each other. > >>> >> >>> >> > > >>> >> >>> >> > That doesn't matter. Language basics like variable definitions should > >>> >> >>> >> > not be obscured by macros. It either takes longer to figure out what > >>> >> >>> >> > a variable is (because one needs to look up the definition of the > >>> >> >>> >> > macro) or makes it almost impossible (because now e.g. cscope doesn't > >>> >> >>> >> > know this is a variable definition. > >>> >> >>> >> > >>> >> >>> >> Sigh, cscope doesn't expand macros? > >>> >> >>> >> > >>> >> >>> >> Is there a way to do the cache line alignment in a sane way without > >>> >> >>> >> littering __aligned(CACHE_LINE_SIZE) all over the place? > >>> >> >>> > > >>> >> >>> > I was hoping to do something with an anonymous union or some such like: > >>> >> >>> > > >>> >> >>> > union mtx_aligned { > >>> >> >>> > struct mtx; > >>> >> >>> > char[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; > >>> >> >>> > } > >>> >> >>> > > >>> >> >>> > I don't know if there is a useful way to define an 'aligned mutex' type > >>> >> >>> > that will transparently map to a 'struct mtx', e.g.: > >>> >> >>> > > >>> >> >>> > typedef struct mtx __aligned(CACHE_LINE_SIZE) aligned_mtx_t; > >>> >> >>> > >>> >> >>> Unfortunately that doesn't work as I've verified with alc@ few months ago. > >>> >> >>> The __aligned() attribute only works with structures definition, not > >>> >> >>> objects declaration. > >>> >> >> > >>> >> >> Are you saying that the typedef doesn't (I expect it doesn't), or that this > >>> >> >> doesn't: > >>> >> >> > >>> >> >> struct mtx foo __aligned(CACHE_LINE_SIZE); > >>> >> > > >>> >> > I meant to say that such notation won't address the padding issue > >>> >> > which is as import as the alignment. Infact, for sensitive locks, > >>> >> > having just an aligned object is not really useful if the cacheline > >>> >> > gets shared. > >>> >> > In the end you will need to use explicit padding or use __aligned in > >>> >> > the struct definition, which cannot be used as a general pattern. > >>> >> > >>> >> The quickest way I see this can be made general is to have a specific > >>> >> struct defined in sys/_mutex.h like that > >>> >> > >>> >> struct mtx_unshare { > >>> >> struct mtx lock; > >>> >> char _pad[CACHE_LINE_SIZE - sizeof(struct mtx)]; > >>> >> } __aligned(CACHE_LINE_SIZE); > >>> > > >>> > I think instead you want my union above that uses roundup2 in case a lock > >>> > eats up multiple cache lines: > >>> > >>> Do you think locks can eat more than one cacheline? This would be > >>> absolutely killer for performance. > >> > >> Not the lock cookie, but 'struct lock_object', etc. aren't entirely trivial. > >> If you had a 32-bit platform with a 16-byte cache line size I wouldn't be > >> surprised if the entire structure spilled over a cacheline. > > > > Cache line usually contains 8 words. > > struct mtx is madeup only by 4 or 5 (depending if you are on 64 or 32 bits). > > I think this is a no-concern and we should not encourage adding more > > words to it anyway. You cannot possibly assume that is true on every arm/mips/powerpc, etc. processor in existence. However, your approach doesn't require explicit padding anyway, so it is a moot point. > >>> > union mtx_foo { > >>> > struct mtx lock; > >>> > char junk[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; > >>> > } __aligned_CACHE_LINE_SIZE; > >>> > > >>> >> then let mtx_* functions to accept void ptrs and cast them to struct > >>> >> mtx as long as the functions enter. > >>> > > >>> > Eh, that removes all compile time type checks. That seems very dubious to me. > >>> > >>> Well right now fast path already has a fair amount of macros wrapping > >>> the operations, which don't really enforce any type checks. > >> > >> Sure they do. They still call a function that takes a 'struct mtx *' even > >> if it isn't called in the fast path. If you pass a 'struct sx *' to > >> mtx_lock() it will fail to compile. That needs to stay that way. > > > > I think that with some trickery using CTASSERT() and typeof() we may > > be able to enforce sanity even with void * arguments. > > I think I've had a better idea for this. > In our locking scheme we already rely on the fact that lock_object > will always be present in all our locking primitives and that it will > be the first object of every locking primitives. This is an assumption > we must live with in order to correctly implement lock classes. I > think we can use the same concept in order to use the same KPI for the > 2 different structures (struct mtx and struct mtx_unshare) and keep > the compile time ability to find stupid bugs. > > What I propose is that we assume mtx_lock remains always the second > member of the struct mtx/mtx_unshare and no other lock is allowed to > use such member name. This happens natually nowadays so there is no > problem in having such a rule. What does that allows to do is to pass > the address of the mtx_lock member to the underlying functions and > from there we can get back the address of the mutex (because we assume > that mtx_lock will be just after the first mandatory member > lock_object). > > Here is a patch that implements mtx_init() in the way I think about: > http://people.freebsd.org/~attilio/mtx_unshare_poc.patch > > this should give us all the desired effects. In this patch I've used > volatile uintptr_t * but it can certainly be void * too, if you prefer > less verbose. > If you agree with this idea I can hack a patch right away. You should just use member2struct() (or whatever that is called now). Having the extra add/sub is annoying and the warning probably isn't quite as clear, but probably doesn't matter but so much. -- John Baldwin From owner-svn-src-user@FreeBSD.ORG Thu Oct 25 16:16:01 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B22D0C90 for ; Thu, 25 Oct 2012 16:16:01 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 0D0F78FC0C for ; Thu, 25 Oct 2012 16:16:00 +0000 (UTC) Received: (qmail 42159 invoked from network); 25 Oct 2012 17:53:37 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 25 Oct 2012 17:53:37 -0000 Message-ID: <508965B3.2020705@freebsd.org> Date: Thu, 25 Oct 2012 18:15:47 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: attilio@FreeBSD.org Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <201210241414.30723.jhb@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: mdf@freebsd.org, src-committers@freebsd.org, John Baldwin , svn-src-user@freebsd.org, Jeff Roberson , Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2012 16:16:01 -0000 On 25.10.2012 05:14, Attilio Rao wrote: > On Wed, Oct 24, 2012 at 9:13 PM, Attilio Rao wrote: >> On Wed, Oct 24, 2012 at 7:14 PM, John Baldwin wrote: >>> On Wednesday, October 24, 2012 11:41:24 am Attilio Rao wrote: >>>> On Wed, Oct 24, 2012 at 4:36 PM, John Baldwin wrote: >>>>> On Wednesday, October 24, 2012 11:24:22 am Attilio Rao wrote: >>>>>> On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao wrote: >>>>> union mtx_foo { >>>>> struct mtx lock; >>>>> char junk[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >>>>> } __aligned_CACHE_LINE_SIZE; >>>>> >>>>>> then let mtx_* functions to accept void ptrs and cast them to struct >>>>>> mtx as long as the functions enter. >>>>> >>>>> Eh, that removes all compile time type checks. That seems very dubious to me. >>>> >>>> Well right now fast path already has a fair amount of macros wrapping >>>> the operations, which don't really enforce any type checks. >>> >>> Sure they do. They still call a function that takes a 'struct mtx *' even >>> if it isn't called in the fast path. If you pass a 'struct sx *' to >>> mtx_lock() it will fail to compile. That needs to stay that way. >> >> I think that with some trickery using CTASSERT() and typeof() we may >> be able to enforce sanity even with void * arguments. > > I think I've had a better idea for this. > In our locking scheme we already rely on the fact that lock_object > will always be present in all our locking primitives and that it will > be the first object of every locking primitives. This is an assumption > we must live with in order to correctly implement lock classes. I > think we can use the same concept in order to use the same KPI for the > 2 different structures (struct mtx and struct mtx_unshare) and keep > the compile time ability to find stupid bugs. I think we're completely overdoing it. On amd64 the size difference of 64B cache line aligning and padding all mutex, sx and rw_lock structures adds the tiny amount of 16K on a GENERIC kernel of 19MB. That is a 0.009% increase in size. Of course dynamically allocated memory that includes a mutex grows a tiny bit at well. Hence I propose to unconditionally slap __aligned(CACHE_LINE_SIZE) into all locking structures and be done with it. As an added benefit we don't have to worry about individual micro-optimizations on a case by case basis. > What I propose is that we assume mtx_lock remains always the second > member of the struct mtx/mtx_unshare and no other lock is allowed to > use such member name. This happens natually nowadays so there is no > problem in having such a rule. What does that allows to do is to pass > the address of the mtx_lock member to the underlying functions and > from there we can get back the address of the mutex (because we assume > that mtx_lock will be just after the first mandatory member > lock_object). > > Here is a patch that implements mtx_init() in the way I think about: > http://people.freebsd.org/~attilio/mtx_unshare_poc.patch > > this should give us all the desired effects. In this patch I've used > volatile uintptr_t * but it can certainly be void * too, if you prefer > less verbose. > If you agree with this idea I can hack a patch right away. -- Andre From owner-svn-src-user@FreeBSD.ORG Thu Oct 25 16:21:22 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C445BE06; Thu, 25 Oct 2012 16:21:22 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6D3B38FC08; Thu, 25 Oct 2012 16:21:21 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so2138702lag.13 for ; Thu, 25 Oct 2012 09:21:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=+JoBUvvQPpwROaS8BZwtiFNpLPMmchvdKqHnFSL5haw=; b=uKhORiViP7sB+YPDiG48yxuwwSPNZ8ItVPuhULyWDP3d/i+qFxFW1nIJxCqOqENOKn HTiebuOnnpZ/4hAcxD4S/tPpiwNGsDRUHFI8Du56niMMWGj+fjlqUyTBF2/R7RB8NDYa xpSYYn7Fmdzzh9zSYMfUC8rLkRF7uFa/qmIvbFclTPaoyGthvNe4YTUPAz9xXXOAPmUy g0M7dTz5Br1Vt1ygAr+bgokY4wuTWNErhB0My/UP7WUWVU8imgcU6zoAAL6SefccidE2 pTT1/aZdz8sEMfOSITcJW7tGE2lXlsL6PcnN8OGcGUNyc17lKwayo5EKhRQxG8YlYbjt F1Ow== MIME-Version: 1.0 Received: by 10.152.148.169 with SMTP id tt9mr18103451lab.15.1351182081042; Thu, 25 Oct 2012 09:21:21 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Thu, 25 Oct 2012 09:21:20 -0700 (PDT) In-Reply-To: <508965B3.2020705@freebsd.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <201210241414.30723.jhb@freebsd.org> <508965B3.2020705@freebsd.org> Date: Thu, 25 Oct 2012 17:21:20 +0100 X-Google-Sender-Auth: iaMz1hijo0GQAydYFBlXnEiff54 Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: Andre Oppermann Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, John Baldwin , svn-src-user@freebsd.org, Jeff Roberson , Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2012 16:21:23 -0000 On Thu, Oct 25, 2012 at 5:15 PM, Andre Oppermann wrote: > On 25.10.2012 05:14, Attilio Rao wrote: >> >> On Wed, Oct 24, 2012 at 9:13 PM, Attilio Rao wrote: >>> >>> On Wed, Oct 24, 2012 at 7:14 PM, John Baldwin wrote: >>>> >>>> On Wednesday, October 24, 2012 11:41:24 am Attilio Rao wrote: >>>>> >>>>> On Wed, Oct 24, 2012 at 4:36 PM, John Baldwin wrote: >>>>>> >>>>>> On Wednesday, October 24, 2012 11:24:22 am Attilio Rao wrote: >>>>>>> >>>>>>> On Wed, Oct 24, 2012 at 4:09 PM, Attilio Rao >>>>>>> wrote: >>>>>> >>>>>> union mtx_foo { >>>>>> struct mtx lock; >>>>>> char junk[roundup2(sizeof(struct mtx), CACHE_LINE_SIZE)]; >>>>>> } __aligned_CACHE_LINE_SIZE; >>>>>> >>>>>>> then let mtx_* functions to accept void ptrs and cast them to struct >>>>>>> mtx as long as the functions enter. >>>>>> >>>>>> >>>>>> Eh, that removes all compile time type checks. That seems very >>>>>> dubious to me. >>>>> >>>>> >>>>> Well right now fast path already has a fair amount of macros wrapping >>>>> the operations, which don't really enforce any type checks. >>>> >>>> >>>> Sure they do. They still call a function that takes a 'struct mtx *' >>>> even >>>> if it isn't called in the fast path. If you pass a 'struct sx *' to >>>> mtx_lock() it will fail to compile. That needs to stay that way. >>> >>> >>> I think that with some trickery using CTASSERT() and typeof() we may >>> be able to enforce sanity even with void * arguments. >> >> >> I think I've had a better idea for this. >> In our locking scheme we already rely on the fact that lock_object >> will always be present in all our locking primitives and that it will >> be the first object of every locking primitives. This is an assumption >> we must live with in order to correctly implement lock classes. I >> think we can use the same concept in order to use the same KPI for the >> 2 different structures (struct mtx and struct mtx_unshare) and keep >> the compile time ability to find stupid bugs. > > > I think we're completely overdoing it. On amd64 the size difference > of 64B cache line aligning and padding all mutex, sx and rw_lock > structures adds the tiny amount of 16K on a GENERIC kernel of 19MB. > That is a 0.009% increase in size. Of course dynamically allocated > memory that includes a mutex grows a tiny bit at well. > > Hence I propose to unconditionally slap __aligned(CACHE_LINE_SIZE) into > all locking structures and be done with it. As an added benefit we > don't have to worry about individual micro-optimizations on a case by > case basis. Did you see my (and also Jeff) objection to your proposal about this? You are deliberating ignoring this? I think that mutexes being part of structures usually don't want that and it is really overkill. It is not the amount of wasted memory the problem (which is also important, anyway) but the fact that not-really-contentended sleep mutexes, will interfree with normal structure members caching. I think it is a very bad idea. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Thu Oct 25 19:05:43 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49810968; Thu, 25 Oct 2012 19:05:43 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id EBC6B8FC14; Thu, 25 Oct 2012 19:05:42 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so1482783pad.13 for ; Thu, 25 Oct 2012 12:05:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=u8p4/zTXTHJWo/v41RN7rLx5q5ICdvkSCgAVnbDJeFY=; b=Xypi/29BQv3YhIbNp753v5iYDP8RwxtHUEbJYJ+vm9kTj34hPLnx5fyLHQrbQFp51q 0nHSGWXURMo7PxITT0V6Rr4le6WIvDb+MNtlHLkQIdExEyd1p6DDAS6f89ZxnREbpcII DJOQD8HxyuK3agLuBxpBPxzUSfhfZsNY8hUKfda7QysjIgsKSP3PmwA3aP3mdagmbo9V jAH+KExPF6oZ6NuE9qPbbmsxiZe4tcVJX4Nq3hpuEQfSYbxPF2sCmAnSNcx1JinkCXGY Kp4PzxiEu3eAy3L5/mPkiUS7z20FBDFQDnk/7kW48ECu62cMAuj6qprogcv4csv6ev7k fChw== MIME-Version: 1.0 Received: by 10.68.132.165 with SMTP id ov5mr61733274pbb.105.1351191942621; Thu, 25 Oct 2012 12:05:42 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.223.105 with HTTP; Thu, 25 Oct 2012 12:05:42 -0700 (PDT) In-Reply-To: <508965B3.2020705@freebsd.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <201210241414.30723.jhb@freebsd.org> <508965B3.2020705@freebsd.org> Date: Thu, 25 Oct 2012 12:05:42 -0700 X-Google-Sender-Auth: sxPPqmuO0caMK5pNo0lJR0xfOxk Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: mdf@FreeBSD.org To: Andre Oppermann Content-Type: text/plain; charset=ISO-8859-1 Cc: src-committers@freebsd.org, John Baldwin , svn-src-user@freebsd.org, attilio@freebsd.org, Jeff Roberson , Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2012 19:05:43 -0000 On Thu, Oct 25, 2012 at 9:15 AM, Andre Oppermann wrote: > I think we're completely overdoing it. I agree, but in the opposite direction. This is a solution looking for a problem. > On amd64 the size difference > of 64B cache line aligning and padding all mutex, sx and rw_lock > structures adds the tiny amount of 16K on a GENERIC kernel of 19MB. > That is a 0.009% increase in size. Of course dynamically allocated > memory that includes a mutex grows a tiny bit at well. > > Hence I propose to unconditionally slap __aligned(CACHE_LINE_SIZE) into > all locking structures and be done with it. As an added benefit we > don't have to worry about individual micro-optimizations on a case by > case basis. What problem are you trying to solve? I understand all about cache sharing, but if you force struct mtx to take its own cache line, I now have no ability to put data accessed under the lock in the same cache line. You've de-optimized code and memory layout. And like alc@ said, ignored the mtx embedded in many dynamically allocated structures. If certain, specific global mutexes will benefit, then they can be explicitly allocated as __aligned and explicitly padded to a cache line. No other mtx except ones specifically identified as making a performance difference should be touched. There is no need for a general solution. Thanks, matthew From owner-svn-src-user@FreeBSD.ORG Thu Oct 25 21:03:30 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17580189 for ; Thu, 25 Oct 2012 21:03:30 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 65D358FC18 for ; Thu, 25 Oct 2012 21:03:29 +0000 (UTC) Received: (qmail 43766 invoked from network); 25 Oct 2012 22:41:04 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 25 Oct 2012 22:41:04 -0000 Message-ID: <5089A913.2040603@freebsd.org> Date: Thu, 25 Oct 2012 23:03:15 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: attilio@FreeBSD.org Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <201210241414.30723.jhb@freebsd.org> <508965B3.2020705@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: mdf@freebsd.org, src-committers@freebsd.org, John Baldwin , svn-src-user@freebsd.org, Jeff Roberson , Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2012 21:03:30 -0000 On 25.10.2012 18:21, Attilio Rao wrote: > On Thu, Oct 25, 2012 at 5:15 PM, Andre Oppermann wrote: >> On 25.10.2012 05:14, Attilio Rao wrote: >>> >>> On Wed, Oct 24, 2012 at 9:13 PM, Attilio Rao wrote: >>> I think I've had a better idea for this. >>> In our locking scheme we already rely on the fact that lock_object >>> will always be present in all our locking primitives and that it will >>> be the first object of every locking primitives. This is an assumption >>> we must live with in order to correctly implement lock classes. I >>> think we can use the same concept in order to use the same KPI for the >>> 2 different structures (struct mtx and struct mtx_unshare) and keep >>> the compile time ability to find stupid bugs. >> >> >> I think we're completely overdoing it. On amd64 the size difference >> of 64B cache line aligning and padding all mutex, sx and rw_lock >> structures adds the tiny amount of 16K on a GENERIC kernel of 19MB. >> That is a 0.009% increase in size. Of course dynamically allocated >> memory that includes a mutex grows a tiny bit at well. >> >> Hence I propose to unconditionally slap __aligned(CACHE_LINE_SIZE) into >> all locking structures and be done with it. As an added benefit we >> don't have to worry about individual micro-optimizations on a case by >> case basis. > > Did you see my (and also Jeff) objection to your proposal about this? > You are deliberating ignoring this? Well, I'm allowed to have a different opinion, am I? I'm not ignoring your objection in the sense as I'm not trying to commit any of this to HEAD while it is disputed. Mind you this whole conversation was started because I was trying to solve a problem with unfortunate cache line sharing for global mutexes in the kernel .bss section on my *personal* svn branch. From the discussion, which I've actively solicited, we've figured out quite a few things that work, don't work or are not really what we want to have. I've learned a lot on how alignment and padding is handled within gcc+ld and probably will change my opinion once (again) when I have fully digested it. I very much appreciate your and everybody else's input and effort in trying to find a useful and practical solution! > I think that mutexes being part of structures usually don't want that > and it is really overkill. It is not the amount of wasted memory the > problem (which is also important, anyway) but the fact that > not-really-contentended sleep mutexes, will interfree with normal > structure members caching. > > I think it is a very bad idea. OTOH there are clear situations where a mutex and rw_lock should end up on their own cache line as proven by Jim Harris. Also from visual inspection [1] and knowledge of the code path I can say that quite a few global mutexes (even non-spin ones) have false sharing and do cause a lot of cache line bouncing. [1] nm -n and readelf. Lets put this discussion rest for a few days to let it filter through the great minds and then try again to align the different requirements. -- Andre From owner-svn-src-user@FreeBSD.ORG Fri Oct 26 06:27:04 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 14A6363D; Fri, 26 Oct 2012 06:27:04 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id A3E428FC14; Fri, 26 Oct 2012 06:27:02 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so1909689lbd.13 for ; Thu, 25 Oct 2012 23:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=9p2xxVdiyj6WL5sw8jBKRC9wIgWNIyUepGSGecGhl2A=; b=VbtuG4SCpy01qQtuQRTAa1p24rlTen09iUXDYkbpZucI9TovG315WmaKOg2y5ZpL32 2nZjk0AKgSCI5kZmYIcYIdHAlGdlbaZMVQySNM4qpTLLOGnbLXcD3Nrwy8H5c4udsb21 goLaaSEDQrEtuneUE2HheA7iSRsmeiTyRZ6J7PUMWNzUZhESg/bQjOeuZflLEexSvn+W UoKDk9aZvqCEgHgoF7okE+az2Ux4cs4uEH17eEhNdYO4GWYpccW/UTUBIssYJR/GRKkF kntY9HJI7Swh0Co3eBLC8PN0VBVyHIJXxrdYSgU9x5o+6dGVRi4R9n5IpYXBF2ovt2dY pcpg== MIME-Version: 1.0 Received: by 10.152.105.103 with SMTP id gl7mr19403783lab.10.1351232821024; Thu, 25 Oct 2012 23:27:01 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Thu, 25 Oct 2012 23:27:00 -0700 (PDT) In-Reply-To: <5089A913.2040603@freebsd.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <201210241414.30723.jhb@freebsd.org> <508965B3.2020705@freebsd.org> <5089A913.2040603@freebsd.org> Date: Fri, 26 Oct 2012 07:27:00 +0100 X-Google-Sender-Auth: QVe95cdu3LGtZkiP4rGkO_oy9dk Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: Andre Oppermann Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, John Baldwin , svn-src-user@freebsd.org, Jeff Roberson , Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2012 06:27:04 -0000 On Thu, Oct 25, 2012 at 10:03 PM, Andre Oppermann wrote: > On 25.10.2012 18:21, Attilio Rao wrote: >> >> On Thu, Oct 25, 2012 at 5:15 PM, Andre Oppermann >> wrote: >>> >>> On 25.10.2012 05:14, Attilio Rao wrote: >>>> >>>> >>>> On Wed, Oct 24, 2012 at 9:13 PM, Attilio Rao >>>> wrote: >>>> I think I've had a better idea for this. >>>> In our locking scheme we already rely on the fact that lock_object >>>> will always be present in all our locking primitives and that it will >>>> be the first object of every locking primitives. This is an assumption >>>> we must live with in order to correctly implement lock classes. I >>>> think we can use the same concept in order to use the same KPI for the >>>> 2 different structures (struct mtx and struct mtx_unshare) and keep >>>> the compile time ability to find stupid bugs. >>> >>> >>> >>> I think we're completely overdoing it. On amd64 the size difference >>> of 64B cache line aligning and padding all mutex, sx and rw_lock >>> structures adds the tiny amount of 16K on a GENERIC kernel of 19MB. >>> That is a 0.009% increase in size. Of course dynamically allocated >>> memory that includes a mutex grows a tiny bit at well. >>> >>> Hence I propose to unconditionally slap __aligned(CACHE_LINE_SIZE) into >>> all locking structures and be done with it. As an added benefit we >>> don't have to worry about individual micro-optimizations on a case by >>> case basis. >> >> >> Did you see my (and also Jeff) objection to your proposal about this? >> You are deliberating ignoring this? > > > Well, I'm allowed to have a different opinion, am I? I'm not ignoring > your objection in the sense as I'm not trying to commit any of this to > HEAD while it is disputed. > > Mind you this whole conversation was started because I was trying to solve > a problem with unfortunate cache line sharing for global mutexes in the > kernel .bss section on my *personal* svn branch. Andre, I'm sorry if you felt I was being harsh or confrontative. This was really not my intention and I apologize. Said that, I fail in seeing a proper technical discussion on your side on how what I propose is "overdoing it" or how do you plan to address the concerns people are raising with your proposal of bumping all lock sizes indiscriminately. However, here is the first half of the patch I'd like to see in: http:///www.freebsd.org/~attilio/mtx_decoupled.patch This is just the part to give the ability to crunch different structures to the mtx KPI. Please note that from the users perspective the mtx KPI remains absolutely the same, so there is theoretically no KPI discontinuity, the support is absolutely transparent. It is not yet throughfully tested, because I first want to hear opinions also on nits. For example: - Do we need to implement mtxlock2mtx() only in kern_mutex.c? I'd say yes, as a general rule, but as long as this functionality relies on the ABI maybe it is better to leave it in _mutex.h as done in the patch. - MTX_SYSINIT() doesn't work for hypotetical mtx_unshare right now so it will need to have its own version. Should I add it now? Should I add it if and only if there is a real need? (I suspect this is likely because several external mutexes, that we want to convert, may use it) - others that came to your mind Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Fri Oct 26 13:02:55 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E2C8A2E8 for ; Fri, 26 Oct 2012 13:02:54 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3207E8FC19 for ; Fri, 26 Oct 2012 13:02:53 +0000 (UTC) Received: (qmail 55910 invoked from network); 26 Oct 2012 14:40:21 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 26 Oct 2012 14:40:21 -0000 Message-ID: <508A89EF.5070805@freebsd.org> Date: Fri, 26 Oct 2012 15:02:39 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: attilio@FreeBSD.org Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <201210241414.30723.jhb@freebsd.org> <508965B3.2020705@freebsd.org> <5089A913.2040603@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: mdf@freebsd.org, src-committers@freebsd.org, John Baldwin , svn-src-user@freebsd.org, Jeff Roberson , Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2012 13:02:55 -0000 On 26.10.2012 08:27, Attilio Rao wrote: > On Thu, Oct 25, 2012 at 10:03 PM, Andre Oppermann wrote: >> On 25.10.2012 18:21, Attilio Rao wrote: >>> Did you see my (and also Jeff) objection to your proposal about this? >>> You are deliberating ignoring this? >> >> >> Well, I'm allowed to have a different opinion, am I? I'm not ignoring >> your objection in the sense as I'm not trying to commit any of this to >> HEAD while it is disputed. >> >> Mind you this whole conversation was started because I was trying to solve >> a problem with unfortunate cache line sharing for global mutexes in the >> kernel .bss section on my *personal* svn branch. > > Andre, > I'm sorry if you felt I was being harsh or confrontative. This was > really not my intention and I apologize. I apologize too for being a bit difficult and taking some time understand the differences in __aligned() regarding padding behavior. > Said that, I fail in seeing a proper technical discussion on your side > on how what I propose is "overdoing it" or how do you plan to address > the concerns people are raising with your proposal of bumping all lock > sizes indiscriminately. I'm wary of micro-optimizing and generally prefer clean and for a reader obvious approaches. That said my assumption on the distribution of mutex use cases in the kernel was wrong. By counting from a grep it seems that about half of the mutexes could possibly benefit from being padded and the other half doesn't because it is in structures and next to its data. > However, here is the first half of the patch I'd like to see in: > http:///www.freebsd.org/~attilio/mtx_decoupled.patch > > This is just the part to give the ability to crunch different > structures to the mtx KPI. Please note that from the users perspective > the mtx KPI remains absolutely the same, so there is theoretically no > KPI discontinuity, the support is absolutely transparent. This seems rather complicated. Instead of mtxlock2mtx() wouldn't __containerof() work just as well? The __DEVOLATILE() looks a bit dangerous. Are you sure the compiler won't reorder things it should not? > It is not yet throughfully tested, because I first want to hear > opinions also on nits. Different though: Since cases where an aligned and padded mutex is wanted it has to be specified explicitly anyway. Can't we simplify and have the aligned one be a container of the normal one and do some union magic? That way the lock_* functions can stay the same and current mutex size doesn't change. > For example: > - Do we need to implement mtxlock2mtx() only in kern_mutex.c? I'd say > yes, as a general rule, but as long as this functionality relies on > the ABI maybe it is better to leave it in _mutex.h as done in the > patch. > - MTX_SYSINIT() doesn't work for hypotetical mtx_unshare right now so > it will need to have its own version. Should I add it now? Should I > add it if and only if there is a real need? (I suspect this is likely > because several external mutexes, that we want to convert, may use it) > - others that came to your mind -- Andre From owner-svn-src-user@FreeBSD.ORG Fri Oct 26 16:06:27 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95548256; Fri, 26 Oct 2012 16:06:27 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 79B298FC16; Fri, 26 Oct 2012 16:06:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9QG6R69035458; Fri, 26 Oct 2012 16:06:27 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QG6RXh035456; Fri, 26 Oct 2012 16:06:27 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210261606.q9QG6RXh035456@svn.freebsd.org> From: Andre Oppermann Date: Fri, 26 Oct 2012 16:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242141 - user/andre/tcp_workqueue/sys/netinet X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2012 16:06:27 -0000 Author: andre Date: Fri Oct 26 16:06:26 2012 New Revision: 242141 URL: http://svn.freebsd.org/changeset/base/242141 Log: Revert r242003. It is used by netstat -z to zero the counters. Discussed with: maxim Modified: user/andre/tcp_workqueue/sys/netinet/tcp_input.c Modified: user/andre/tcp_workqueue/sys/netinet/tcp_input.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/tcp_input.c Fri Oct 26 16:03:13 2012 (r242140) +++ user/andre/tcp_workqueue/sys/netinet/tcp_input.c Fri Oct 26 16:06:26 2012 (r242141) @@ -121,7 +121,7 @@ __FBSDID("$FreeBSD$"); const int tcprexmtthresh = 3; VNET_DEFINE(struct tcpstat, tcpstat); -SYSCTL_VNET_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RD, +SYSCTL_VNET_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RW, &VNET_NAME(tcpstat), tcpstat, "TCP statistics (struct tcpstat, netinet/tcp_var.h)"); From owner-svn-src-user@FreeBSD.ORG Fri Oct 26 16:47:54 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 244189A3; Fri, 26 Oct 2012 16:47:54 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 087378FC17; Fri, 26 Oct 2012 16:47:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9QGlr2X043262; Fri, 26 Oct 2012 16:47:53 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QGlqG0043198; Fri, 26 Oct 2012 16:47:52 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210261647.q9QGlqG0043198@svn.freebsd.org> From: Andre Oppermann Date: Fri, 26 Oct 2012 16:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242147 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2012 16:47:54 -0000 Author: andre Date: Fri Oct 26 16:47:52 2012 New Revision: 242147 URL: http://svn.freebsd.org/changeset/base/242147 Log: Revert r241798, r241800, r241802, r241805, r241814, r241815, r241889, and r242002 all related to mutex cache line alignment. Discussed with: attilio et al Modified: user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c user/andre/tcp_workqueue/sys/ddb/db_script.c user/andre/tcp_workqueue/sys/dev/acpica/acpivar.h user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c user/andre/tcp_workqueue/sys/dev/ipmi/ipmi_smbios.c user/andre/tcp_workqueue/sys/dev/ppbus/if_plip.c user/andre/tcp_workqueue/sys/dev/sbni/if_sbni.c user/andre/tcp_workqueue/sys/dev/snp/snp.c user/andre/tcp_workqueue/sys/dev/sound/pcm/channel.c user/andre/tcp_workqueue/sys/fs/devfs/devfs_dir.c user/andre/tcp_workqueue/sys/fs/devfs/devfs_vnops.c user/andre/tcp_workqueue/sys/fs/nfsclient/nfs_clvnops.c user/andre/tcp_workqueue/sys/geom/journal/g_journal.c user/andre/tcp_workqueue/sys/kern/kern_et.c user/andre/tcp_workqueue/sys/kern/kern_event.c user/andre/tcp_workqueue/sys/kern/kern_fail.c user/andre/tcp_workqueue/sys/kern/kern_hhook.c user/andre/tcp_workqueue/sys/kern/kern_intr.c user/andre/tcp_workqueue/sys/kern/kern_pmc.c user/andre/tcp_workqueue/sys/kern/kern_racct.c user/andre/tcp_workqueue/sys/kern/kern_rmlock.c user/andre/tcp_workqueue/sys/kern/kern_thread.c user/andre/tcp_workqueue/sys/kern/kern_uuid.c user/andre/tcp_workqueue/sys/kern/subr_autoconf.c user/andre/tcp_workqueue/sys/kern/subr_devstat.c user/andre/tcp_workqueue/sys/kern/subr_firmware.c user/andre/tcp_workqueue/sys/kern/subr_log.c user/andre/tcp_workqueue/sys/kern/subr_sleepqueue.c user/andre/tcp_workqueue/sys/kern/subr_unit.c user/andre/tcp_workqueue/sys/kern/uipc_accf.c user/andre/tcp_workqueue/sys/kern/uipc_domain.c user/andre/tcp_workqueue/sys/kern/uipc_socket.c user/andre/tcp_workqueue/sys/kern/vfs_mount.c user/andre/tcp_workqueue/sys/mips/atheros/if_arge.c user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-mdio.c user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-rgmii.c user/andre/tcp_workqueue/sys/mips/mips/busdma_machdep.c user/andre/tcp_workqueue/sys/mips/sibyte/sb_zbbus.c user/andre/tcp_workqueue/sys/net/pfil.c user/andre/tcp_workqueue/sys/net/raw_cb.c user/andre/tcp_workqueue/sys/net/raw_usrreq.c user/andre/tcp_workqueue/sys/net/rtsock.c user/andre/tcp_workqueue/sys/netatalk/aarp.c user/andre/tcp_workqueue/sys/netinet/in_mcast.c user/andre/tcp_workqueue/sys/netinet/ip_encap.c user/andre/tcp_workqueue/sys/netinet/ip_id.c user/andre/tcp_workqueue/sys/netinet/tcp_debug.c user/andre/tcp_workqueue/sys/netinet6/in6_mcast.c user/andre/tcp_workqueue/sys/pc98/cbus/cbus_dma.c user/andre/tcp_workqueue/sys/security/mac/mac_net.c user/andre/tcp_workqueue/sys/sys/mutex.h user/andre/tcp_workqueue/sys/ufs/ffs/ffs_snapshot.c user/andre/tcp_workqueue/sys/ufs/ffs/ffs_softdep.c user/andre/tcp_workqueue/sys/vm/vm_glue.c user/andre/tcp_workqueue/sys/vm/vm_pageout.c user/andre/tcp_workqueue/sys/x86/isa/isa_dma.c user/andre/tcp_workqueue/sys/xen/evtchn/evtchn.c user/andre/tcp_workqueue/sys/xen/gnttab.c Modified: user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c ============================================================================== --- user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/arm/arm/busdma_machdep.c Fri Oct 26 16:47:52 2012 (r242147) @@ -163,7 +163,9 @@ static TAILQ_HEAD(,bus_dmamap) dmamap_fr #define BUSDMA_STATIC_MAPS 500 static struct bus_dmamap map_pool[BUSDMA_STATIC_MAPS]; -static MTX_DEF_SYSINIT(busdma_mtx, "busdma lock", MTX_DEF); +static struct mtx busdma_mtx; + +MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF); static void init_bounce_pages(void *dummy); static int alloc_bounce_zone(bus_dma_tag_t dmat); Modified: user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c Fri Oct 26 16:47:52 2012 (r242147) @@ -35,7 +35,8 @@ __FBSDID("$FreeBSD$"); #ifdef _KERNEL #include -MTX_DEF_SYSINIT(atomic_mtx, "atomic", MTX_DEF); +struct mtx atomic_mtx; +MTX_SYSINIT(atomic, &atomic_mtx, "atomic", MTX_DEF); #else #include Modified: user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Fri Oct 26 16:47:52 2012 (r242147) @@ -58,7 +58,8 @@ struct kmem_item { LIST_ENTRY(kmem_item) next; }; static LIST_HEAD(, kmem_item) kmem_items; -static MTX_DEF_SYSINIT(kmem_items_mtx, "kmem_items", MTX_DEF); +static struct mtx kmem_items_mtx; +MTX_SYSINIT(kmem_items_mtx, &kmem_items_mtx, "kmem_items", MTX_DEF); #endif /* KMEM_DEBUG */ void * Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Oct 26 16:47:52 2012 (r242147) @@ -232,7 +232,8 @@ static dtrace_helpers_t *dtrace_deferred static dtrace_enabling_t *dtrace_retained; /* list of retained enablings */ static dtrace_dynvar_t dtrace_dynhash_sink; /* end of dynamic hash chains */ #if !defined(sun) -static MTX_DEF_SYSINIT(dtrace_unr_mtx, "Unique resource identifier", MTX_DEF); +static struct mtx dtrace_unr_mtx; +MTX_SYSINIT(dtrace_unr_mtx, &dtrace_unr_mtx, "Unique resource identifier", MTX_DEF); int dtrace_in_probe; /* non-zero if executing a probe */ #if defined(__i386__) || defined(__amd64__) || defined(__mips__) uintptr_t dtrace_in_probe_addr; /* Address of invop when already in probe */ Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Oct 26 16:47:52 2012 (r242147) @@ -63,7 +63,8 @@ #include #include "zfs_comutil.h" -MTX_DEF_SYSINIT(zfs_debug_mtx, "zfs_debug", MTX_DEF); +struct mtx zfs_debug_mtx; +MTX_SYSINIT(zfs_debug_mtx, &zfs_debug_mtx, "zfs_debug", MTX_DEF); SYSCTL_NODE(_vfs, OID_AUTO, zfs, CTLFLAG_RW, 0, "ZFS file system"); Modified: user/andre/tcp_workqueue/sys/ddb/db_script.c ============================================================================== --- user/andre/tcp_workqueue/sys/ddb/db_script.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/ddb/db_script.c Fri Oct 26 16:47:52 2012 (r242147) @@ -111,7 +111,8 @@ static char db_static_buffer[DB_MAXSCRIP * processes. Sysctl procedures acquire db_script_mtx before accessing the * global script data structures. */ -static MTX_DEF_SYSINIT(db_script_mtx, "db_script_mtx", MTX_DEF); +static struct mtx db_script_mtx; +MTX_SYSINIT(db_script_mtx, &db_script_mtx, "db_script_mtx", MTX_DEF); /* * Some script names have special meaning, such as those executed Modified: user/andre/tcp_workqueue/sys/dev/acpica/acpivar.h ============================================================================== --- user/andre/tcp_workqueue/sys/dev/acpica/acpivar.h Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/dev/acpica/acpivar.h Fri Oct 26 16:47:52 2012 (r242147) @@ -149,7 +149,8 @@ extern struct mtx acpi_mutex; #define ACPI_UNLOCK(sys) mtx_unlock(&sys##_mutex) #define ACPI_LOCK_ASSERT(sys) mtx_assert(&sys##_mutex, MA_OWNED); #define ACPI_LOCK_DECL(sys, name) \ - static MTX_DEF_SYSINIT(sys##_mutex, name, MTX_DEF) + static struct mtx sys##_mutex; \ + MTX_SYSINIT(sys##_mutex, &sys##_mutex, name, MTX_DEF) #define ACPI_SERIAL_BEGIN(sys) sx_xlock(&sys##_sxlock) #define ACPI_SERIAL_END(sys) sx_xunlock(&sys##_sxlock) #define ACPI_SERIAL_ASSERT(sys) sx_assert(&sys##_sxlock, SX_XLOCKED); Modified: user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/dev/ath/ah_osdep.c Fri Oct 26 16:47:52 2012 (r242147) @@ -70,7 +70,9 @@ * XXX This is a global lock for now; it should be pushed to * a per-device lock in some platform-independent fashion. */ -MTX_DEF_SYSINIT(ah_regser_mtx, "Atheros register access mutex", MTX_SPIN); +struct mtx ah_regser_mtx; +MTX_SYSINIT(ah_regser, &ah_regser_mtx, "Atheros register access mutex", + MTX_SPIN); extern void ath_hal_printf(struct ath_hal *, const char*, ...) __printflike(2,3); Modified: user/andre/tcp_workqueue/sys/dev/ipmi/ipmi_smbios.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ipmi/ipmi_smbios.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/dev/ipmi/ipmi_smbios.c Fri Oct 26 16:47:52 2012 (r242147) @@ -83,7 +83,8 @@ typedef void (*smbios_callback_t)(struct static struct ipmi_get_info ipmi_info; static int ipmi_probed; -static MTX_DEF_SYSINIT(ipmi_info_mtx, "ipmi info", MTX_DEF); +static struct mtx ipmi_info_mtx; +MTX_SYSINIT(ipmi_info, &ipmi_info_mtx, "ipmi info", MTX_DEF); static void ipmi_smbios_probe(struct ipmi_get_info *); static int smbios_cksum(struct smbios_eps *); Modified: user/andre/tcp_workqueue/sys/dev/ppbus/if_plip.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ppbus/if_plip.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/dev/ppbus/if_plip.c Fri Oct 26 16:47:52 2012 (r242147) @@ -156,7 +156,8 @@ struct lp_data { void *sc_intr_cookie; }; -static MTX_DEF_SYSINIT(lp_tables_lock, "plip tables", MTX_DEF); +static struct mtx lp_tables_lock; +MTX_SYSINIT(lp_tables, &lp_tables_lock, "plip tables", MTX_DEF); /* Tables for the lp# interface */ static u_char *txmith; Modified: user/andre/tcp_workqueue/sys/dev/sbni/if_sbni.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/sbni/if_sbni.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/dev/sbni/if_sbni.c Fri Oct 26 16:47:52 2012 (r242147) @@ -125,7 +125,8 @@ static __inline void sbni_outsb(struct s static u_int32_t crc32tab[]; #ifdef SBNI_DUAL_COMPOUND -static MTX_DEF_SYSINIT(headlist_lock, "sbni headlist", MTX_DEF); +static struct mtx headlist_lock; +MTX_SYSINIT(headlist_lock, &headlist_lock, "sbni headlist", MTX_DEF); static struct sbni_softc *sbni_headlist; #endif Modified: user/andre/tcp_workqueue/sys/dev/snp/snp.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/snp/snp.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/dev/snp/snp.c Fri Oct 26 16:47:52 2012 (r242147) @@ -47,7 +47,8 @@ static MALLOC_DEFINE(M_SNP, "snp", "tty /* XXX: should be mtx, but TTY can be locked by Giant. */ #if 0 -static MTX_DEF_SYSINIT(snp_register_lock, +static struct mtx snp_register_lock; +MTX_SYSINIT(snp_register_lock, &snp_register_lock, "tty snoop registration", MTX_DEF); #define SNP_LOCK() mtx_lock(&snp_register_lock) #define SNP_UNLOCK() mtx_unlock(&snp_register_lock) Modified: user/andre/tcp_workqueue/sys/dev/sound/pcm/channel.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/sound/pcm/channel.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/dev/sound/pcm/channel.c Fri Oct 26 16:47:52 2012 (r242147) @@ -211,7 +211,8 @@ SYSCTL_INT(_hw_snd, OID_AUTO, syncdelay, * Clients should acquire this lock @b without holding any channel locks * before touching syncgroups or the main syncgroup list. */ -MTX_DEF_SYSINIT(snd_pcm_syncgroups_mtx, "PCM channel sync group lock", MTX_DEF); +struct mtx snd_pcm_syncgroups_mtx; +MTX_SYSINIT(pcm_syncgroup, &snd_pcm_syncgroups_mtx, "PCM channel sync group lock", MTX_DEF); /** * @brief syncgroups' master list * Modified: user/andre/tcp_workqueue/sys/fs/devfs/devfs_dir.c ============================================================================== --- user/andre/tcp_workqueue/sys/fs/devfs/devfs_dir.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/fs/devfs/devfs_dir.c Fri Oct 26 16:47:52 2012 (r242147) @@ -52,7 +52,8 @@ static LIST_HEAD(, dirlistent) devfs_dir static MALLOC_DEFINE(M_DEVFS4, "DEVFS4", "DEVFS directory list"); -static MTX_DEF_SYSINIT(dirlist_mtx, "devfs dirlist lock", MTX_DEF); +static struct mtx dirlist_mtx; +MTX_SYSINIT(dirlist_mtx, &dirlist_mtx, "devfs dirlist lock", MTX_DEF); /* Returns 1 if the path is in the directory list. */ int Modified: user/andre/tcp_workqueue/sys/fs/devfs/devfs_vnops.c ============================================================================== --- user/andre/tcp_workqueue/sys/fs/devfs/devfs_vnops.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/fs/devfs/devfs_vnops.c Fri Oct 26 16:47:52 2012 (r242147) @@ -73,10 +73,12 @@ static struct fileops devfs_ops_f; static MALLOC_DEFINE(M_CDEVPDATA, "DEVFSP", "Metainfo for cdev-fp data"); -MTX_DEF_SYSINIT(devfs_de_interlock, "devfs interlock", MTX_DEF); +struct mtx devfs_de_interlock; +MTX_SYSINIT(devfs_de_interlock, &devfs_de_interlock, "devfs interlock", MTX_DEF); struct sx clone_drain_lock; SX_SYSINIT(clone_drain_lock, &clone_drain_lock, "clone events drain lock"); -MTX_DEF_SYSINIT(cdevpriv_mtx, "cdevpriv lock", MTX_DEF); +struct mtx cdevpriv_mtx; +MTX_SYSINIT(cdevpriv_mtx, &cdevpriv_mtx, "cdevpriv lock", MTX_DEF); static int devfs_fp_check(struct file *fp, struct cdev **devp, struct cdevsw **dswp, Modified: user/andre/tcp_workqueue/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- user/andre/tcp_workqueue/sys/fs/nfsclient/nfs_clvnops.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/fs/nfsclient/nfs_clvnops.c Fri Oct 26 16:47:52 2012 (r242147) @@ -1481,7 +1481,9 @@ nfs_mknod(struct vop_mknod_args *ap) return (nfs_mknodrpc(ap->a_dvp, ap->a_vpp, ap->a_cnp, ap->a_vap)); } -static MTX_DEF_SYSINIT(nfs_cverf_mtx, "NFS create verifier mutex", MTX_DEF); +static struct mtx nfs_cverf_mtx; +MTX_SYSINIT(nfs_cverf_mtx, &nfs_cverf_mtx, "NFS create verifier mutex", + MTX_DEF); static nfsquad_t nfs_get_cverf(void) Modified: user/andre/tcp_workqueue/sys/geom/journal/g_journal.c ============================================================================== --- user/andre/tcp_workqueue/sys/geom/journal/g_journal.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/geom/journal/g_journal.c Fri Oct 26 16:47:52 2012 (r242147) @@ -73,7 +73,8 @@ CTASSERT(sizeof(struct g_journal_header) CTASSERT(sizeof(struct g_journal_record_header) <= 512); static MALLOC_DEFINE(M_JOURNAL, "journal_data", "GEOM_JOURNAL Data"); -static MTX_DEF_SYSINIT(g_journal_cache_mtx, "cache usage", MTX_DEF); +static struct mtx g_journal_cache_mtx; +MTX_SYSINIT(g_journal_cache, &g_journal_cache_mtx, "cache usage", MTX_DEF); const struct g_journal_desc *g_journal_filesystems[] = { &g_journal_ufs, Modified: user/andre/tcp_workqueue/sys/kern/kern_et.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_et.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/kern_et.c Fri Oct 26 16:47:52 2012 (r242147) @@ -37,7 +37,8 @@ __FBSDID("$FreeBSD$"); SLIST_HEAD(et_eventtimers_list, eventtimer); static struct et_eventtimers_list eventtimers = SLIST_HEAD_INITIALIZER(et_eventtimers); -MTX_DEF_SYSINIT(et_eventtimers_mtx, "et_mtx", MTX_DEF); +struct mtx et_eventtimers_mtx; +MTX_SYSINIT(et_eventtimers_init, &et_eventtimers_mtx, "et_mtx", MTX_DEF); SYSCTL_NODE(_kern, OID_AUTO, eventtimer, CTLFLAG_RW, 0, "Event timers"); static SYSCTL_NODE(_kern_eventtimer, OID_AUTO, et, CTLFLAG_RW, 0, ""); Modified: user/andre/tcp_workqueue/sys/kern/kern_event.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_event.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/kern_event.c Fri Oct 26 16:47:52 2012 (r242147) @@ -74,7 +74,8 @@ static MALLOC_DEFINE(M_KQUEUE, "kqueue", * This lock is used if multiple kq locks are required. This possibly * should be made into a per proc lock. */ -static MTX_DEF_SYSINIT(kq_global, "kqueue order", MTX_DEF); +static struct mtx kq_global; +MTX_SYSINIT(kq_global, &kq_global, "kqueue order", MTX_DEF); #define KQ_GLOBAL_LOCK(lck, haslck) do { \ if (!haslck) \ mtx_lock(lck); \ @@ -268,7 +269,9 @@ extern struct filterops fs_filtops; /* * Table for for all system-defined filters. */ -static MTX_DEF_SYSINIT(filterops_lock, "protect sysfilt_ops", MTX_DEF); +static struct mtx filterops_lock; +MTX_SYSINIT(kqueue_filterops, &filterops_lock, "protect sysfilt_ops", + MTX_DEF); static struct { struct filterops *for_fop; int for_refcnt; @@ -1879,8 +1882,9 @@ knlist_empty(struct knlist *knl) return SLIST_EMPTY(&knl->kl_list); } -static MTX_DEF_SYSINIT(knlist_lock, "knlist lock for lockless objects", - MTX_DEF); +static struct mtx knlist_lock; +MTX_SYSINIT(knlist_lock, &knlist_lock, "knlist lock for lockless objects", + MTX_DEF); static void knlist_mtx_lock(void *arg); static void knlist_mtx_unlock(void *arg); Modified: user/andre/tcp_workqueue/sys/kern/kern_fail.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_fail.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/kern_fail.c Fri Oct 26 16:47:52 2012 (r242147) @@ -73,7 +73,8 @@ static MALLOC_DEFINE(M_FAIL_POINT, "Fail #define fp_free(ptr) free(ptr, M_FAIL_POINT) #define fp_malloc(size, flags) malloc((size), M_FAIL_POINT, (flags)) -static MTX_DEF_SYSINIT(g_fp_mtx, "fail point mtx", MTX_DEF); +static struct mtx g_fp_mtx; +MTX_SYSINIT(g_fp_mtx, &g_fp_mtx, "fail point mtx", MTX_DEF); #define FP_LOCK() mtx_lock(&g_fp_mtx) #define FP_UNLOCK() mtx_unlock(&g_fp_mtx) Modified: user/andre/tcp_workqueue/sys/kern/kern_hhook.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_hhook.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/kern_hhook.c Fri Oct 26 16:47:52 2012 (r242147) @@ -64,7 +64,9 @@ LIST_HEAD(hhookheadhead, hhook_head); VNET_DEFINE(struct hhookheadhead, hhook_head_list); #define V_hhook_head_list VNET(hhook_head_list) -static MTX_DEF_SYSINIT(hhook_head_list_lock, "hhook_head list lock", MTX_DEF); +static struct mtx hhook_head_list_lock; +MTX_SYSINIT(hhookheadlistlock, &hhook_head_list_lock, "hhook_head list lock", + MTX_DEF); /* Private function prototypes. */ static void hhook_head_destroy(struct hhook_head *hhh); Modified: user/andre/tcp_workqueue/sys/kern/kern_intr.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_intr.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/kern_intr.c Fri Oct 26 16:47:52 2012 (r242147) @@ -95,8 +95,8 @@ SYSCTL_INT(_hw, OID_AUTO, intr_storm_thr "Number of consecutive interrupts before storm protection is enabled"); static TAILQ_HEAD(, intr_event) event_list = TAILQ_HEAD_INITIALIZER(event_list); - -static MTX_DEF_SYSINIT(event_lock, "intr event list", MTX_DEF); +static struct mtx event_lock; +MTX_SYSINIT(intr_event_list, &event_lock, "intr event list", MTX_DEF); static void intr_event_update(struct intr_event *ie); #ifdef INTR_FILTER Modified: user/andre/tcp_workqueue/sys/kern/kern_pmc.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_pmc.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/kern_pmc.c Fri Oct 26 16:47:52 2012 (r242147) @@ -100,10 +100,11 @@ TUNABLE_INT(PMC_SYSCTL_NAME_PREFIX "soft SYSCTL_INT(_kern_hwpmc, OID_AUTO, softevents, CTLFLAG_TUN|CTLFLAG_RD, &pmc_softevents, 0, "maximum number of soft events"); +struct mtx pmc_softs_mtx; int pmc_softs_count; struct pmc_soft **pmc_softs; -MTX_DEF_SYSINIT(pmc_softs_mtx, "pmc-softs", MTX_SPIN); +MTX_SYSINIT(pmc_soft_mtx, &pmc_softs_mtx, "pmc-softs", MTX_SPIN); static void pmc_init_sx(void) Modified: user/andre/tcp_workqueue/sys/kern/kern_racct.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_racct.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/kern_racct.c Fri Oct 26 16:47:52 2012 (r242147) @@ -63,7 +63,8 @@ __FBSDID("$FreeBSD$"); FEATURE(racct, "Resource Accounting"); -static MTX_DEF_SYSINIT(racct_lock, "racct lock", MTX_DEF); +static struct mtx racct_lock; +MTX_SYSINIT(racct_lock, &racct_lock, "racct lock", MTX_DEF); static uma_zone_t racct_zone; Modified: user/andre/tcp_workqueue/sys/kern/kern_rmlock.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_rmlock.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/kern_rmlock.c Fri Oct 26 16:47:52 2012 (r242147) @@ -118,7 +118,9 @@ owner_rm(const struct lock_object *lock, } #endif -static MTX_DEF_SYSINIT(rm_spinlock, "rm_spinlock", MTX_SPIN); +static struct mtx rm_spinlock; + +MTX_SYSINIT(rm_spinlock, &rm_spinlock, "rm_spinlock", MTX_SPIN); /* * Add or remove tracker from per-cpu list. Modified: user/andre/tcp_workqueue/sys/kern/kern_thread.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_thread.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/kern_thread.c Fri Oct 26 16:47:52 2012 (r242147) @@ -72,8 +72,8 @@ SDT_PROBE_DEFINE(proc, , , lwp_exit, lwp static uma_zone_t thread_zone; TAILQ_HEAD(, thread) zombie_threads = TAILQ_HEAD_INITIALIZER(zombie_threads); - -static MTX_DEF_SYSINIT(zombie_lock, "zombie lock", MTX_SPIN); +static struct mtx zombie_lock; +MTX_SYSINIT(zombie_lock, &zombie_lock, "zombie lock", MTX_SPIN); static void thread_zombie(struct thread *); Modified: user/andre/tcp_workqueue/sys/kern/kern_uuid.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/kern_uuid.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/kern_uuid.c Fri Oct 26 16:47:52 2012 (r242147) @@ -73,7 +73,8 @@ CTASSERT(sizeof(struct uuid_private) == static struct uuid_private uuid_last; -static MTX_DEF_SYSINIT(uuid_mutex, "UUID generator mutex lock", MTX_DEF); +static struct mtx uuid_mutex; +MTX_SYSINIT(uuid_lock, &uuid_mutex, "UUID generator mutex lock", MTX_DEF); /* * Return the first MAC address we encounter or, if none was found, Modified: user/andre/tcp_workqueue/sys/kern/subr_autoconf.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/subr_autoconf.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/subr_autoconf.c Fri Oct 26 16:47:52 2012 (r242147) @@ -56,8 +56,8 @@ __FBSDID("$FreeBSD$"); static TAILQ_HEAD(, intr_config_hook) intr_config_hook_list = TAILQ_HEAD_INITIALIZER(intr_config_hook_list); static struct intr_config_hook *next_to_notify; - -static MTX_DEF_SYSINIT(intr_config_hook_lock, "intr config", MTX_DEF); +static struct mtx intr_config_hook_lock; +MTX_SYSINIT(intr_config_hook, &intr_config_hook_lock, "intr config", MTX_DEF); /* ARGSUSED */ static void run_interrupt_driven_config_hooks(void); Modified: user/andre/tcp_workqueue/sys/kern/subr_devstat.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/subr_devstat.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/subr_devstat.c Fri Oct 26 16:47:52 2012 (r242147) @@ -102,8 +102,8 @@ static int devstat_num_devs; static long devstat_generation = 1; static int devstat_version = DEVSTAT_VERSION; static int devstat_current_devnumber; - -static MTX_DEF_SYSINIT(devstat_mutex, "devstat", MTX_DEF); +static struct mtx devstat_mutex; +MTX_SYSINIT(devstat_mutex, &devstat_mutex, "devstat", MTX_DEF); static struct devstatlist device_statq = STAILQ_HEAD_INITIALIZER(device_statq); static struct devstat *devstat_alloc(void); Modified: user/andre/tcp_workqueue/sys/kern/subr_firmware.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/subr_firmware.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/subr_firmware.c Fri Oct 26 16:47:52 2012 (r242147) @@ -134,7 +134,8 @@ static struct task firmware_unload_task; /* * This mutex protects accesses to the firmware table. */ -static MTX_DEF_SYSINIT(firmware_mtx, "firmware table", MTX_DEF); +static struct mtx firmware_mtx; +MTX_SYSINIT(firmware, &firmware_mtx, "firmware table", MTX_DEF); /* * Helper function to lookup a name. Modified: user/andre/tcp_workqueue/sys/kern/subr_log.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/subr_log.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/subr_log.c Fri Oct 26 16:47:52 2012 (r242147) @@ -93,8 +93,8 @@ static struct logsoftc { int log_open; /* also used in log() */ static struct cv log_wakeup; - -MTX_DEF_SYSINIT(msgbuf_lock, "msgbuf lock", MTX_DEF); +struct mtx msgbuf_lock; +MTX_SYSINIT(msgbuf_lock, &msgbuf_lock, "msgbuf lock", MTX_DEF); /* Times per second to check for a pending syslog wakeup. */ static int log_wakeups_per_second = 5; Modified: user/andre/tcp_workqueue/sys/kern/subr_sleepqueue.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/subr_sleepqueue.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/subr_sleepqueue.c Fri Oct 26 16:47:52 2012 (r242147) @@ -1040,8 +1040,8 @@ LIST_HEAD(sqphead, sleepq_prof); struct sqphead sleepq_prof_free; struct sqphead sleepq_hash[SC_TABLESIZE]; static struct sleepq_prof sleepq_profent[SLEEPQ_PROF_LOCATIONS]; - -static MTX_DEF_SYSINIT(sleepq_prof_lock, "sleepq_prof", MTX_SPIN); +static struct mtx sleepq_prof_lock; +MTX_SYSINIT(sleepq_prof_lock, &sleepq_prof_lock, "sleepq_prof", MTX_SPIN); static void sleepq_profile(const char *wmesg) Modified: user/andre/tcp_workqueue/sys/kern/subr_unit.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/subr_unit.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/subr_unit.c Fri Oct 26 16:47:52 2012 (r242147) @@ -92,7 +92,9 @@ static MALLOC_DEFINE(M_UNIT, "Unitno", " #define Malloc(foo) malloc(foo, M_UNIT, M_WAITOK | M_ZERO) #define Free(foo) free(foo, M_UNIT) -static MTX_DEF_SYSINIT(unitmtx, "unit# allocation", MTX_DEF); +static struct mtx unitmtx; + +MTX_SYSINIT(unit, &unitmtx, "unit# allocation", MTX_DEF); #else /* ...USERLAND */ Modified: user/andre/tcp_workqueue/sys/kern/uipc_accf.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_accf.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/uipc_accf.c Fri Oct 26 16:47:52 2012 (r242147) @@ -47,7 +47,9 @@ __FBSDID("$FreeBSD$"); #include #include -static MTX_DEF_SYSINIT(accept_filter_mtx, "accept_filter_mtx", MTX_DEF); +static struct mtx accept_filter_mtx; +MTX_SYSINIT(accept_filter, &accept_filter_mtx, "accept_filter_mtx", + MTX_DEF); #define ACCEPT_FILTER_LOCK() mtx_lock(&accept_filter_mtx) #define ACCEPT_FILTER_UNLOCK() mtx_unlock(&accept_filter_mtx) Modified: user/andre/tcp_workqueue/sys/kern/uipc_domain.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_domain.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/uipc_domain.c Fri Oct 26 16:47:52 2012 (r242147) @@ -75,8 +75,8 @@ static void pfslowtimo(void *); struct domain *domains; /* registered protocol domains */ int domain_init_status = 0; - -static MTX_DEF_SYSINIT(dom_mtx, "domain list", MTX_DEF); +static struct mtx dom_mtx; /* domain list lock */ +MTX_SYSINIT(domain, &dom_mtx, "domain list", MTX_DEF); /* * Dummy protocol specific user requests function pointer array. Modified: user/andre/tcp_workqueue/sys/kern/uipc_socket.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/uipc_socket.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/uipc_socket.c Fri Oct 26 16:47:52 2012 (r242147) @@ -236,13 +236,15 @@ SYSCTL_INT(_kern_ipc_zero_copy, OID_AUTO * accept_mtx locks down per-socket fields relating to accept queues. See * socketvar.h for an annotation of the protected fields of struct socket. */ -MTX_DEF_SYSINIT(accept_mtx, "accept", MTX_DEF); +struct mtx accept_mtx; +MTX_SYSINIT(accept_mtx, &accept_mtx, "accept", MTX_DEF); /* * so_global_mtx protects so_gencnt, numopensockets, and the per-socket * so_gencnt field. */ -static MTX_DEF_SYSINIT(so_global_mtx, "so_glabel", MTX_DEF); +static struct mtx so_global_mtx; +MTX_SYSINIT(so_global_mtx, &so_global_mtx, "so_glabel", MTX_DEF); /* * General IPC sysctl name space, used by sockets and a variety of other IPC Modified: user/andre/tcp_workqueue/sys/kern/vfs_mount.c ============================================================================== --- user/andre/tcp_workqueue/sys/kern/vfs_mount.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/kern/vfs_mount.c Fri Oct 26 16:47:52 2012 (r242147) @@ -85,7 +85,8 @@ static uma_zone_t mount_zone; struct mntlist mountlist = TAILQ_HEAD_INITIALIZER(mountlist); /* For any iteration/modification of mountlist */ -MTX_DEF_SYSINIT(mountlist_mtx, "mountlist", MTX_DEF); +struct mtx mountlist_mtx; +MTX_SYSINIT(mountlist, &mountlist_mtx, "mountlist", MTX_DEF); /* * Global opts, taken by all filesystems Modified: user/andre/tcp_workqueue/sys/mips/atheros/if_arge.c ============================================================================== --- user/andre/tcp_workqueue/sys/mips/atheros/if_arge.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/mips/atheros/if_arge.c Fri Oct 26 16:47:52 2012 (r242147) @@ -240,7 +240,9 @@ DRIVER_MODULE(mdio, argemdio, mdio_drive */ extern uint32_t ar711_base_mac[ETHER_ADDR_LEN]; -static MTX_DEF_SYSINIT(miibus_mtx, "arge mii lock", MTX_DEF); +static struct mtx miibus_mtx; + +MTX_SYSINIT(miibus_mtx, &miibus_mtx, "arge mii lock", MTX_DEF); /* * Flushes all Modified: user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-mdio.c ============================================================================== --- user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-mdio.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-mdio.c Fri Oct 26 16:47:52 2012 (r242147) @@ -46,7 +46,8 @@ __FBSDID("$FreeBSD$"); #include "wrapper-cvmx-includes.h" #include "ethernet-headers.h" -MTX_DEF_SYSINIT(cvm_oct_mdio_mtx, "MDIO", MTX_DEF); +struct mtx cvm_oct_mdio_mtx; +MTX_SYSINIT(cvm_oct_mdio, &cvm_oct_mdio_mtx, "MDIO", MTX_DEF); /** * Perform an MII read. Called by the generic MII routines Modified: user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-rgmii.c ============================================================================== --- user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-rgmii.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/mips/cavium/octe/ethernet-rgmii.c Fri Oct 26 16:47:52 2012 (r242147) @@ -52,7 +52,9 @@ __FBSDID("$FreeBSD$"); extern int octeon_is_simulation(void); extern struct ifnet *cvm_oct_device[]; -static MTX_DEF_SYSINIT(global_register_lock, "RGMII Global", MTX_SPIN); +static struct mtx global_register_lock; +MTX_SYSINIT(global_register_lock, &global_register_lock, + "RGMII Global", MTX_SPIN); static int number_rgmii_ports; Modified: user/andre/tcp_workqueue/sys/mips/mips/busdma_machdep.c ============================================================================== --- user/andre/tcp_workqueue/sys/mips/mips/busdma_machdep.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/mips/mips/busdma_machdep.c Fri Oct 26 16:47:52 2012 (r242147) @@ -156,7 +156,9 @@ static TAILQ_HEAD(,bus_dmamap) dmamap_fr #define BUSDMA_STATIC_MAPS 500 static struct bus_dmamap map_pool[BUSDMA_STATIC_MAPS]; -static MTX_DEF_SYSINIT(busdma_mtx, "busdma lock", MTX_DEF); +static struct mtx busdma_mtx; + +MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF); static void init_bounce_pages(void *dummy); static int alloc_bounce_zone(bus_dma_tag_t dmat); Modified: user/andre/tcp_workqueue/sys/mips/sibyte/sb_zbbus.c ============================================================================== --- user/andre/tcp_workqueue/sys/mips/sibyte/sb_zbbus.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/mips/sibyte/sb_zbbus.c Fri Oct 26 16:47:52 2012 (r242147) @@ -44,7 +44,9 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_INTMAP, "sb1250 intmap", "Sibyte 1250 Interrupt Mapper"); -static MTX_DEF_SYSINIT(zbbus_intr_mtx, "zbbus_intr_mask/unmask lock", MTX_SPIN); +static struct mtx zbbus_intr_mtx; +MTX_SYSINIT(zbbus_intr_mtx, &zbbus_intr_mtx, "zbbus_intr_mask/unmask lock", + MTX_SPIN); /* * This array holds the mapping between a MIPS hard interrupt and the Modified: user/andre/tcp_workqueue/sys/net/pfil.c ============================================================================== --- user/andre/tcp_workqueue/sys/net/pfil.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/net/pfil.c Fri Oct 26 16:47:52 2012 (r242147) @@ -47,7 +47,8 @@ #include #include -static MTX_DEF_SYSINIT(pfil_global_lock, "pfil_head_list lock", MTX_DEF); +static struct mtx pfil_global_lock; +MTX_SYSINIT(pfil_global_lock, &pfil_global_lock, "pfil_head_list lock", MTX_DEF); static int pfil_list_add(pfil_list_t *, struct packet_filter_hook *, int, uint8_t); Modified: user/andre/tcp_workqueue/sys/net/raw_cb.c ============================================================================== --- user/andre/tcp_workqueue/sys/net/raw_cb.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/net/raw_cb.c Fri Oct 26 16:47:52 2012 (r242147) @@ -56,7 +56,7 @@ * redo address binding to allow wildcards */ -MTX_DEF_SYSINIT(rawcb_mtx, "rawcb", MTX_DEF); +struct mtx rawcb_mtx; VNET_DEFINE(struct rawcb_list_head, rawcb_list); static SYSCTL_NODE(_net, OID_AUTO, raw, CTLFLAG_RW, 0, Modified: user/andre/tcp_workqueue/sys/net/raw_usrreq.c ============================================================================== --- user/andre/tcp_workqueue/sys/net/raw_usrreq.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/net/raw_usrreq.c Fri Oct 26 16:47:52 2012 (r242147) @@ -49,6 +49,8 @@ #include #include +MTX_SYSINIT(rawcb_mtx, &rawcb_mtx, "rawcb", MTX_DEF); + /* * Initialize raw connection block q. */ Modified: user/andre/tcp_workqueue/sys/net/rtsock.c ============================================================================== --- user/andre/tcp_workqueue/sys/net/rtsock.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/net/rtsock.c Fri Oct 26 16:47:52 2012 (r242147) @@ -167,7 +167,8 @@ static struct { int any_count; /* total attached */ } route_cb; -MTX_DEF_SYSINIT(rtsock_mtx, "rtsock route_cb lock", MTX_DEF); +struct mtx rtsock_mtx; +MTX_SYSINIT(rtsock, &rtsock_mtx, "rtsock route_cb lock", MTX_DEF); #define RTSOCK_LOCK() mtx_lock(&rtsock_mtx) #define RTSOCK_UNLOCK() mtx_unlock(&rtsock_mtx) Modified: user/andre/tcp_workqueue/sys/netatalk/aarp.c ============================================================================== --- user/andre/tcp_workqueue/sys/netatalk/aarp.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/netatalk/aarp.c Fri Oct 26 16:47:52 2012 (r242147) @@ -82,7 +82,8 @@ static void at_aarpinput(struct ifnet *i #define AARPTAB_SIZE (AARPTAB_BSIZ * AARPTAB_NB) static struct aarptab aarptab[AARPTAB_SIZE]; -MTX_DEF_SYSINIT(aarptab_mtx, "aarptab_mtx", MTX_DEF); +struct mtx aarptab_mtx; +MTX_SYSINIT(aarptab_mtx, &aarptab_mtx, "aarptab_mtx", MTX_DEF); #define AARPTAB_HASH(a) ((((a).s_net << 8) + (a).s_node) % AARPTAB_NB) Modified: user/andre/tcp_workqueue/sys/netinet/in_mcast.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/in_mcast.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/netinet/in_mcast.c Fri Oct 26 16:47:52 2012 (r242147) @@ -94,7 +94,8 @@ static MALLOC_DEFINE(M_IPMSOURCE, "ip_ms * any need for in_multi itself to be virtualized -- it is bound to an ifp * anyway no matter what happens. */ -MTX_DEF_SYSINIT(in_multi_mtx, "in_multi_mtx", MTX_DEF); +struct mtx in_multi_mtx; +MTX_SYSINIT(in_multi_mtx, &in_multi_mtx, "in_multi_mtx", MTX_DEF); /* * Functions with non-static linkage defined in this file should be Modified: user/andre/tcp_workqueue/sys/netinet/ip_encap.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/ip_encap.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/netinet/ip_encap.c Fri Oct 26 16:47:52 2012 (r242147) @@ -101,7 +101,8 @@ static void encap_fillarg(struct mbuf *, /* * All global variables in ip_encap.c are locked using encapmtx. */ -static MTX_DEF_SYSINIT(encapmtx, "encapmtx", MTX_DEF); +static struct mtx encapmtx; +MTX_SYSINIT(encapmtx, &encapmtx, "encapmtx", MTX_DEF); LIST_HEAD(, encaptab) encaptab = LIST_HEAD_INITIALIZER(encaptab); /* Modified: user/andre/tcp_workqueue/sys/netinet/ip_id.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/ip_id.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/netinet/ip_id.c Fri Oct 26 16:47:52 2012 (r242147) @@ -97,11 +97,12 @@ static int array_ptr = 0; static int array_size = 8192; static int random_id_collisions = 0; static int random_id_total = 0; +static struct mtx ip_id_mtx; static void ip_initid(void); static int sysctl_ip_id_change(SYSCTL_HANDLER_ARGS); -static MTX_DEF_SYSINIT(ip_id_mtx, "ip_id_mtx", MTX_DEF); +MTX_SYSINIT(ip_id_mtx, &ip_id_mtx, "ip_id_mtx", MTX_DEF); SYSCTL_DECL(_net_inet_ip); SYSCTL_PROC(_net_inet_ip, OID_AUTO, random_id_period, CTLTYPE_INT|CTLFLAG_RW, Modified: user/andre/tcp_workqueue/sys/netinet/tcp_debug.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/tcp_debug.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/netinet/tcp_debug.c Fri Oct 26 16:47:52 2012 (r242147) @@ -86,7 +86,8 @@ static int tcp_debx; * two parts, one of which saves connection and other state into the global * array (locked by tcp_debug_mtx). */ -MTX_DEF_SYSINIT(tcp_debug_mtx, "tcp_debug_mtx", MTX_DEF); +struct mtx tcp_debug_mtx; +MTX_SYSINIT(tcp_debug_mtx, &tcp_debug_mtx, "tcp_debug_mtx", MTX_DEF); /* * Save TCP state at a given moment; optionally, both tcpcb and TCP packet Modified: user/andre/tcp_workqueue/sys/netinet6/in6_mcast.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet6/in6_mcast.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/netinet6/in6_mcast.c Fri Oct 26 16:47:52 2012 (r242147) @@ -103,7 +103,8 @@ RB_GENERATE(ip6_msource_tree, ip6_msourc * any need for in6_multi itself to be virtualized -- it is bound to an ifp * anyway no matter what happens. */ -MTX_DEF_SYSINIT(in6_multi_mtx, "in6_multi_mtx", MTX_DEF); +struct mtx in6_multi_mtx; +MTX_SYSINIT(in6_multi_mtx, &in6_multi_mtx, "in6_multi_mtx", MTX_DEF); static void im6f_commit(struct in6_mfilter *); static int im6f_get_source(struct in6_mfilter *imf, Modified: user/andre/tcp_workqueue/sys/pc98/cbus/cbus_dma.c ============================================================================== --- user/andre/tcp_workqueue/sys/pc98/cbus/cbus_dma.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/pc98/cbus/cbus_dma.c Fri Oct 26 16:47:52 2012 (r242147) @@ -72,7 +72,8 @@ static u_int8_t dma_bounced = 0; static u_int8_t dma_busy = 0; /* Used in isa_dmastart() */ static u_int8_t dma_inuse = 0; /* User for acquire/release */ static u_int8_t dma_auto_mode = 0; -static MTX_DEF_SYSINIT(isa_dma_lock, "isa DMA lock", MTX_DEF); +static struct mtx isa_dma_lock; +MTX_SYSINIT(isa_dma_lock, &isa_dma_lock, "isa DMA lock", MTX_DEF); #define VALID_DMA_MASK (3) Modified: user/andre/tcp_workqueue/sys/security/mac/mac_net.c ============================================================================== --- user/andre/tcp_workqueue/sys/security/mac/mac_net.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/security/mac/mac_net.c Fri Oct 26 16:47:52 2012 (r242147) @@ -79,7 +79,8 @@ __FBSDID("$FreeBSD$"); * our own global mutex for struct ifnet. Non-ideal, but should help in the * SMP environment. */ -MTX_DEF_SYSINIT(mac_ifnet_mtx, "mac_ifnet", MTX_DEF); +struct mtx mac_ifnet_mtx; +MTX_SYSINIT(mac_ifnet_mtx, &mac_ifnet_mtx, "mac_ifnet", MTX_DEF); /* * Retrieve the label associated with an mbuf by searching for the tag. Modified: user/andre/tcp_workqueue/sys/sys/mutex.h ============================================================================== --- user/andre/tcp_workqueue/sys/sys/mutex.h Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/sys/mutex.h Fri Oct 26 16:47:52 2012 (r242147) @@ -394,34 +394,12 @@ do { \ return (_val); \ } while (0) -/* - * Helper macros to prevent global mutexes to share a cache line - * on SMP systems. - */ -#ifdef SMP -#define MTX_ALIGN __aligned(CACHE_LINE_SIZE) -#else -#define MTX_ALIGN -#endif - -#ifdef SMP -#define MTX_GLOBAL(name) \ - struct mtx __aligned(CACHE_LINE_SIZE) (name) -#else /* SMP */ -#define MTX_GLOBAL(name) \ - struct mtx (name) -#endif /* SMP */ - struct mtx_args { struct mtx *ma_mtx; const char *ma_desc; int ma_opts; }; -#define MTX_DEF_SYSINIT(name, desc, opts) \ - MTX_GLOBAL(name); \ - MTX_SYSINIT(name, &name, desc, opts) - #define MTX_SYSINIT(name, mtx, desc, opts) \ static struct mtx_args name##_args = { \ (mtx), \ Modified: user/andre/tcp_workqueue/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- user/andre/tcp_workqueue/sys/ufs/ffs/ffs_snapshot.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/ufs/ffs/ffs_snapshot.c Fri Oct 26 16:47:52 2012 (r242147) @@ -136,7 +136,8 @@ ffs_sync_snap(mp, waitfor) FEATURE(ffs_snapshot, "FFS snapshot support"); LIST_HEAD(, snapdata) snapfree; -static MTX_DEF_SYSINIT(snapfree_lock, "snapdata free list", MTX_DEF); +static struct mtx snapfree_lock; +MTX_SYSINIT(ffs_snapfree, &snapfree_lock, "snapdata free list", MTX_DEF); static int cgaccount(int, struct vnode *, struct buf *, int); static int expunge_ufs1(struct vnode *, struct inode *, struct fs *, Modified: user/andre/tcp_workqueue/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- user/andre/tcp_workqueue/sys/ufs/ffs/ffs_softdep.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/ufs/ffs/ffs_softdep.c Fri Oct 26 16:47:52 2012 (r242147) @@ -993,7 +993,8 @@ static void softdep_disk_write_complete( static void softdep_deallocate_dependencies(struct buf *); static int softdep_count_dependencies(struct buf *bp, int); -static MTX_DEF_SYSINIT(lk, "Softdep Lock", MTX_DEF); +static struct mtx lk; +MTX_SYSINIT(softdep_lock, &lk, "Softdep Lock", MTX_DEF); #define TRY_ACQUIRE_LOCK(lk) mtx_trylock(lk) #define ACQUIRE_LOCK(lk) mtx_lock(lk) Modified: user/andre/tcp_workqueue/sys/vm/vm_glue.c ============================================================================== --- user/andre/tcp_workqueue/sys/vm/vm_glue.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/vm/vm_glue.c Fri Oct 26 16:47:52 2012 (r242147) @@ -306,8 +306,7 @@ vm_sync_icache(vm_map_t map, vm_offset_t struct kstack_cache_entry *kstack_cache; static int kstack_cache_size = 128; static int kstacks; -static MTX_DEF_SYSINIT(kstack_cache_mtx, "kstkch", MTX_DEF); - +static struct mtx kstack_cache_mtx; SYSCTL_INT(_vm, OID_AUTO, kstack_cache_size, CTLFLAG_RW, &kstack_cache_size, 0, ""); SYSCTL_INT(_vm, OID_AUTO, kstacks, CTLFLAG_RD, &kstacks, 0, @@ -487,6 +486,7 @@ kstack_cache_init(void *nulll) EVENTHANDLER_PRI_ANY); } +MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF); SYSINIT(vm_kstacks, SI_SUB_KTHREAD_INIT, SI_ORDER_ANY, kstack_cache_init, NULL); #ifndef NO_SWAPPING Modified: user/andre/tcp_workqueue/sys/vm/vm_pageout.c ============================================================================== --- user/andre/tcp_workqueue/sys/vm/vm_pageout.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/vm/vm_pageout.c Fri Oct 26 16:47:52 2012 (r242147) @@ -146,8 +146,9 @@ int vm_pageout_pages_needed; /* flag say #if !defined(NO_SWAPPING) static int vm_pageout_req_swapout; /* XXX */ static int vm_daemon_needed; +static struct mtx vm_daemon_mtx; /* Allow for use by vm_pageout before vm_daemon is initialized. */ -static MTX_DEF_SYSINIT(vm_daemon_mtx, "vm daemon", MTX_DEF); +MTX_SYSINIT(vm_daemon, &vm_daemon_mtx, "vm daemon", MTX_DEF); #endif static int vm_max_launder = 32; static int vm_pageout_stats_max=0, vm_pageout_stats_interval = 0; Modified: user/andre/tcp_workqueue/sys/x86/isa/isa_dma.c ============================================================================== --- user/andre/tcp_workqueue/sys/x86/isa/isa_dma.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/x86/isa/isa_dma.c Fri Oct 26 16:47:52 2012 (r242147) @@ -71,7 +71,8 @@ static u_int8_t dma_bounced = 0; static u_int8_t dma_busy = 0; /* Used in isa_dmastart() */ static u_int8_t dma_inuse = 0; /* User for acquire/release */ static u_int8_t dma_auto_mode = 0; -static MTX_DEF_SYSINIT(isa_dma_lock, "isa DMA lock", MTX_DEF); +static struct mtx isa_dma_lock; +MTX_SYSINIT(isa_dma_lock, &isa_dma_lock, "isa DMA lock", MTX_DEF); #define VALID_DMA_MASK (7) Modified: user/andre/tcp_workqueue/sys/xen/evtchn/evtchn.c ============================================================================== --- user/andre/tcp_workqueue/sys/xen/evtchn/evtchn.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/xen/evtchn/evtchn.c Fri Oct 26 16:47:52 2012 (r242147) @@ -44,14 +44,7 @@ static inline unsigned long __ffs(unsign return word; } -/* - * irq_mapping_update_lock: in order to allow an interrupt to occur in a critical - * section, to set pcpu->ipending (etc...) properly, we - * must be able to get the icu lock, so it can't be - * under witness. - */ -static MTX_DEF_SYSINIT(irq_mapping_update_lock, "xp", MTX_SPIN); - +static struct mtx irq_mapping_update_lock; static struct xenpic *xp; struct xenpic_intsrc { struct intsrc xp_intsrc; @@ -1137,4 +1130,11 @@ evtchn_init(void *dummy __unused) } SYSINIT(evtchn_init, SI_SUB_INTR, SI_ORDER_MIDDLE, evtchn_init, NULL); + /* + * irq_mapping_update_lock: in order to allow an interrupt to occur in a critical + * section, to set pcpu->ipending (etc...) properly, we + * must be able to get the icu lock, so it can't be + * under witness. + */ +MTX_SYSINIT(irq_mapping_update_lock, &irq_mapping_update_lock, "xp", MTX_SPIN); Modified: user/andre/tcp_workqueue/sys/xen/gnttab.c ============================================================================== --- user/andre/tcp_workqueue/sys/xen/gnttab.c Fri Oct 26 16:40:03 2012 (r242146) +++ user/andre/tcp_workqueue/sys/xen/gnttab.c Fri Oct 26 16:47:52 2012 (r242147) @@ -49,8 +49,7 @@ static unsigned int nr_grant_frames; static unsigned int boot_max_nr_grant_frames; static int gnttab_free_count; static grant_ref_t gnttab_free_head; - -static MTX_DEF_SYSINIT(gnttab_list_lock, "GNTTAB LOCK", MTX_DEF); +static struct mtx gnttab_list_lock; static grant_entry_t *shared; @@ -707,3 +706,4 @@ ini_nomem: } +MTX_SYSINIT(gnttab, &gnttab_list_lock, "GNTTAB LOCK", MTX_DEF); From owner-svn-src-user@FreeBSD.ORG Fri Oct 26 16:52:56 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0989BCA; Fri, 26 Oct 2012 16:52:56 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A95498FC0A; Fri, 26 Oct 2012 16:52:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9QGqune044226; Fri, 26 Oct 2012 16:52:56 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QGqu4g044224; Fri, 26 Oct 2012 16:52:56 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210261652.q9QGqu4g044224@svn.freebsd.org> From: Andre Oppermann Date: Fri, 26 Oct 2012 16:52:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242148 - user/andre/tcp_workqueue/sys/netinet X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2012 16:52:56 -0000 Author: andre Date: Fri Oct 26 16:52:56 2012 New Revision: 242148 URL: http://svn.freebsd.org/changeset/base/242148 Log: Revert r242001. All NICs supporting TSO also support doing DMA chains larger than 64K and hacking around it in TCP is not correct. The correct fix is within the drivers artificially limiting their DMA chain length. Discussed with: yongari Modified: user/andre/tcp_workqueue/sys/netinet/tcp_output.c Modified: user/andre/tcp_workqueue/sys/netinet/tcp_output.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/tcp_output.c Fri Oct 26 16:47:52 2012 (r242147) +++ user/andre/tcp_workqueue/sys/netinet/tcp_output.c Fri Oct 26 16:52:56 2012 (r242148) @@ -772,12 +772,9 @@ send: * Limit a burst to IP_MAXPACKET minus IP, * TCP and options length to keep ip->ip_len * from overflowing. - * Deduct max_linkhdr as well to prevent the - * eventual DMA chain from exceeding IP_MAXPACKET - * (64K) as well. */ - if (len > IP_MAXPACKET - (hdrlen + max_linkhdr)) { - len = IP_MAXPACKET - (hdrlen + max_linkhdr); + if (len > IP_MAXPACKET - hdrlen) { + len = IP_MAXPACKET - hdrlen; sendalot = 1; } @@ -808,7 +805,7 @@ send: } else tso = 0; - KASSERT(len + hdrlen + ipoptlen + max_linkhdr <= IP_MAXPACKET, + KASSERT(len + hdrlen + ipoptlen <= IP_MAXPACKET, ("%s: len > IP_MAXPACKET", __func__)); /*#ifdef DIAGNOSTIC*/ From owner-svn-src-user@FreeBSD.ORG Fri Oct 26 17:02:51 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 736C83EE; Fri, 26 Oct 2012 17:02:51 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56D658FC18; Fri, 26 Oct 2012 17:02:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9QH2pK8046325; Fri, 26 Oct 2012 17:02:51 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QH2oBb046300; Fri, 26 Oct 2012 17:02:50 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210261702.q9QH2oBb046300@svn.freebsd.org> From: Andre Oppermann Date: Fri, 26 Oct 2012 17:02:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242150 - in user/andre/tcp_workqueue/sys: arm/conf arm/ti arm/ti/cpsw boot/common cam/scsi cddl/contrib/opensolaris/uts/common/fs/zfs conf contrib/dev/acpica contrib/dev/acpica/common ... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2012 17:02:51 -0000 Author: andre Date: Fri Oct 26 17:02:50 2012 New Revision: 242150 URL: http://svn.freebsd.org/changeset/base/242150 Log: Integrate from HEAD @242149. Deleted: user/andre/tcp_workqueue/sys/conf/defines Modified: user/andre/tcp_workqueue/sys/arm/conf/PANDABOARD user/andre/tcp_workqueue/sys/arm/conf/RPI-B user/andre/tcp_workqueue/sys/arm/ti/cpsw/if_cpsw.c user/andre/tcp_workqueue/sys/arm/ti/ti_machdep.c user/andre/tcp_workqueue/sys/boot/common/interp.c user/andre/tcp_workqueue/sys/boot/common/interp_forth.c user/andre/tcp_workqueue/sys/cam/scsi/scsi_enc.c user/andre/tcp_workqueue/sys/cam/scsi/scsi_pt.c user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c user/andre/tcp_workqueue/sys/conf/NOTES user/andre/tcp_workqueue/sys/conf/files user/andre/tcp_workqueue/sys/conf/files.amd64 user/andre/tcp_workqueue/sys/conf/files.arm user/andre/tcp_workqueue/sys/conf/files.ia64 user/andre/tcp_workqueue/sys/conf/files.mips user/andre/tcp_workqueue/sys/conf/files.powerpc user/andre/tcp_workqueue/sys/conf/kern.post.mk user/andre/tcp_workqueue/sys/conf/options user/andre/tcp_workqueue/sys/conf/options.ia64 user/andre/tcp_workqueue/sys/conf/options.mips user/andre/tcp_workqueue/sys/contrib/dev/acpica/changes.txt (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/common/adfile.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/common/adisasm.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/common/adwalk.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/common/dmextern.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/common/dmrestag.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/common/dmtable.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/common/dmtbdump.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/common/dmtbinfo.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/common/getopt.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslcodegen.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslcompile.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslcompiler.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslcompiler.y (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/asldefine.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslerror.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslfiles.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslfold.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslglobal.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/asllength.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/asllisting.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslload.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/asllookup.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslmain.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslmap.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslmessages.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslopcodes.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/asloperands.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslopt.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslresource.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslrestype1.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslrestype1i.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslrestype2d.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslrestype2e.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslrestype2q.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslrestype2w.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslstartup.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslstubs.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslsupport.l (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/asltransform.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/asltree.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/asltypes.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslutils.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslwalks.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/dtcompile.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/dtio.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/dttable.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/dttemplate.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/prutils.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/debugger/dbcmds.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/debugger/dbdisply.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/debugger/dbexec.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/debugger/dbfileio.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/debugger/dbhistry.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/debugger/dbinput.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/debugger/dbnames.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/debugger/dbstats.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/debugger/dbutils.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/debugger/dbxface.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/disassembler/dmnames.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/disassembler/dmobject.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/disassembler/dmopcode.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/disassembler/dmresrc.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/disassembler/dmutils.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/disassembler/dmwalk.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dsfield.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dsinit.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dsobject.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dsutils.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dswexec.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dswload2.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dswscope.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dswstate.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evevent.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evrgnini.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evxfgpe.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evxfregn.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exconfig.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exconvrt.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/excreate.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exdebug.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exdump.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exfield.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exfldio.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exmisc.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exmutex.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exnames.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exoparg1.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exoparg2.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exoparg3.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exoparg6.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exprep.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exregion.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exresnte.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exresolv.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exresop.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exstore.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exstoren.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exstorob.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exsystem.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/exutils.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/hardware/hwacpi.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/hardware/hwgpe.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/hardware/hwpci.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/hardware/hwregs.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/hardware/hwtimer.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/hardware/hwvalid.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/hardware/hwxface.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsaccess.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsalloc.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsdump.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nseval.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsinit.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsload.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsnames.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsobject.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsparse.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nssearch.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsutils.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nswalk.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsxfeval.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsxfname.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsxfobj.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/parser/psargs.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/parser/psloop.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/parser/psopcode.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/parser/psparse.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/parser/psscope.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/parser/pstree.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/parser/psutils.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/parser/psxface.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/rsaddr.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/rscalc.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/rscreate.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/rsdump.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/rsio.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/rslist.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/rsmemory.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/rsmisc.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/rsutils.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/tables/tbfadt.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/tables/tbfind.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/tables/tbinstal.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/tables/tbutils.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/tables/tbxface.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/tables/tbxfload.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/tables/tbxfroot.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utalloc.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utcache.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utcopy.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utdebug.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utdelete.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utids.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utinit.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utlock.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utmath.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utmisc.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utmutex.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utobject.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utresrc.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utstate.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/uttrack.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utxface.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utxferror.c (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acapps.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acconfig.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acexcep.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acglobal.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/aclocal.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acmacros.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acnames.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acobject.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acopcode.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acpiosxf.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acpixf.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acrestyp.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acstruct.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/actbl2.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/actbl3.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/actypes.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acutils.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/amlresrc.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/platform/acenv.h (contents, props changed) user/andre/tcp_workqueue/sys/contrib/octeon-sdk/cvmx-app-init.h user/andre/tcp_workqueue/sys/contrib/octeon-sdk/cvmx-helper-board.c user/andre/tcp_workqueue/sys/contrib/octeon-sdk/cvmx-helper.c user/andre/tcp_workqueue/sys/dev/acpica/acpi.c user/andre/tcp_workqueue/sys/dev/ath/if_ath_tx.c user/andre/tcp_workqueue/sys/dev/bge/if_bge.c user/andre/tcp_workqueue/sys/dev/bge/if_bgereg.h user/andre/tcp_workqueue/sys/dev/ciss/cissvar.h user/andre/tcp_workqueue/sys/dev/cxgb/cxgb_sge.c user/andre/tcp_workqueue/sys/dev/drm/drmP.h user/andre/tcp_workqueue/sys/dev/filemon/filemon.c user/andre/tcp_workqueue/sys/dev/filemon/filemon_wrapper.c user/andre/tcp_workqueue/sys/dev/hptiop/hptiop.c user/andre/tcp_workqueue/sys/dev/hptiop/hptiop.h user/andre/tcp_workqueue/sys/dev/hwpmc/pmc_events.h user/andre/tcp_workqueue/sys/dev/sound/usb/uaudio.c user/andre/tcp_workqueue/sys/dev/usb/controller/dwc_otg.c user/andre/tcp_workqueue/sys/dev/usb/controller/ehci.c user/andre/tcp_workqueue/sys/dev/usb/controller/ohci.c user/andre/tcp_workqueue/sys/dev/usb/controller/uhci.c user/andre/tcp_workqueue/sys/dev/usb/controller/usb_controller.c user/andre/tcp_workqueue/sys/dev/usb/controller/xhci.c user/andre/tcp_workqueue/sys/dev/usb/input/ukbd.c user/andre/tcp_workqueue/sys/dev/usb/quirk/usb_quirk.c user/andre/tcp_workqueue/sys/dev/usb/serial/usb_serial.c user/andre/tcp_workqueue/sys/dev/usb/storage/umass.c user/andre/tcp_workqueue/sys/dev/usb/usb.h user/andre/tcp_workqueue/sys/dev/usb/usb_debug.c user/andre/tcp_workqueue/sys/dev/usb/usb_debug.h user/andre/tcp_workqueue/sys/dev/usb/usb_dev.c user/andre/tcp_workqueue/sys/dev/usb/usb_device.c user/andre/tcp_workqueue/sys/dev/usb/usb_generic.c user/andre/tcp_workqueue/sys/dev/usb/usb_hub.c user/andre/tcp_workqueue/sys/dev/usb/usb_process.c user/andre/tcp_workqueue/sys/dev/usb/usb_request.c user/andre/tcp_workqueue/sys/dev/usb/usbdevs user/andre/tcp_workqueue/sys/dev/usb/wlan/if_uath.c user/andre/tcp_workqueue/sys/dev/usb/wlan/if_upgt.c user/andre/tcp_workqueue/sys/dev/usb/wlan/if_urtw.c user/andre/tcp_workqueue/sys/fs/smbfs/smbfs_io.c user/andre/tcp_workqueue/sys/fs/smbfs/smbfs_smb.c user/andre/tcp_workqueue/sys/fs/smbfs/smbfs_vfsops.c user/andre/tcp_workqueue/sys/fs/smbfs/smbfs_vnops.c user/andre/tcp_workqueue/sys/i386/i386/pmap.c user/andre/tcp_workqueue/sys/ia64/ia64/pmap.c user/andre/tcp_workqueue/sys/ia64/include/pmap.h user/andre/tcp_workqueue/sys/kern/kern_racct.c user/andre/tcp_workqueue/sys/kern/kern_rctl.c user/andre/tcp_workqueue/sys/kern/sched_4bsd.c user/andre/tcp_workqueue/sys/kern/sched_ule.c user/andre/tcp_workqueue/sys/kern/subr_param.c user/andre/tcp_workqueue/sys/kern/subr_trap.c user/andre/tcp_workqueue/sys/kern/subr_uio.c user/andre/tcp_workqueue/sys/kern/tty.c user/andre/tcp_workqueue/sys/kern/tty_ttydisc.c user/andre/tcp_workqueue/sys/kern/uipc_socket.c user/andre/tcp_workqueue/sys/mips/cavium/octopci.c user/andre/tcp_workqueue/sys/mips/conf/AR71XX_BASE user/andre/tcp_workqueue/sys/mips/conf/AR724X_BASE user/andre/tcp_workqueue/sys/mips/conf/OCTEON1 user/andre/tcp_workqueue/sys/mips/rt305x/files.rt305x user/andre/tcp_workqueue/sys/net/if_bridge.c user/andre/tcp_workqueue/sys/net/pfil.c user/andre/tcp_workqueue/sys/net/pfil.h user/andre/tcp_workqueue/sys/net80211/ieee80211.c user/andre/tcp_workqueue/sys/net80211/ieee80211_freebsd.c user/andre/tcp_workqueue/sys/netinet/ip_fastfwd.c user/andre/tcp_workqueue/sys/netinet/ip_icmp.c user/andre/tcp_workqueue/sys/netinet/ip_input.c user/andre/tcp_workqueue/sys/netinet/ip_options.c user/andre/tcp_workqueue/sys/netinet/ip_output.c user/andre/tcp_workqueue/sys/netinet/tcp_input.c user/andre/tcp_workqueue/sys/netinet/udp_usrreq.c user/andre/tcp_workqueue/sys/netinet6/ip6_forward.c user/andre/tcp_workqueue/sys/netinet6/ip6_input.c user/andre/tcp_workqueue/sys/netinet6/ip6_output.c user/andre/tcp_workqueue/sys/netinet6/udp6_usrreq.c user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_fw2.c user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_fw_pfil.c user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_fw_sockopt.c user/andre/tcp_workqueue/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c user/andre/tcp_workqueue/sys/sys/proc.h user/andre/tcp_workqueue/sys/sys/racct.h user/andre/tcp_workqueue/sys/sys/rctl.h user/andre/tcp_workqueue/sys/sys/sched.h user/andre/tcp_workqueue/sys/sys/tty.h user/andre/tcp_workqueue/sys/vm/vm_fault.c Directory Properties: user/andre/tcp_workqueue/sys/ (props changed) user/andre/tcp_workqueue/sys/boot/ (props changed) user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/ (props changed) user/andre/tcp_workqueue/sys/conf/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/common/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/common/ahpredef.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslanalyze.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslbtypes.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslcompiler.l (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslpredef.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslrestype2.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/aslrestype2s.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/asluuid.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/dtcompiler.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/dtexpress.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/dtfield.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/dtparser.l (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/dtparser.y (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/dtsubtable.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/dttemplate.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/dtutils.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/preprocess.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/prexpress.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/prmacros.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/prparser.l (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/prparser.y (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/compiler/prscan.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/debugger/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/debugger/dbmethod.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/disassembler/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dsargs.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/dispatcher/dswload.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evglock.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evgpe.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evgpeblk.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evgpeinit.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evgpeutil.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evmisc.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evregion.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evsci.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evxface.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/events/evxfevnt.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/executer/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/hardware/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/hardware/hwesleep.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/hardware/hwsleep.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nspredef.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsrepair.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/namespace/nsrepair2.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/parser/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/parser/pswalk.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/rsinfo.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/rsirq.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/rsserial.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/resources/rsxface.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/tables/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utaddress.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utdecode.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/uteval.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utexcep.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utglobal.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utosi.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utxfinit.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/components/utilities/utxfmutex.c (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acbuffer.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/accommon.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acdebug.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acdisasm.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acdispat.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acevents.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/achware.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acinterp.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acnamesp.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acoutput.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acparser.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acpi.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acpredef.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/acresrc.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/actables.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/actbl.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/actbl1.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/amlcode.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/platform/acfreebsd.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/include/platform/acgcc.h (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/os_specific/ (props changed) user/andre/tcp_workqueue/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c (props changed) user/andre/tcp_workqueue/sys/contrib/octeon-sdk/ (props changed) Modified: user/andre/tcp_workqueue/sys/arm/conf/PANDABOARD ============================================================================== --- user/andre/tcp_workqueue/sys/arm/conf/PANDABOARD Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/arm/conf/PANDABOARD Fri Oct 26 17:02:50 2012 (r242150) @@ -44,17 +44,18 @@ options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories -options NFSCLIENT #Network Filesystem Client device snp +options BREAK_TO_DEBUGGER + #options NFSCL +options NFSCLIENT #Network Filesystem Client #options NFSSERVER #Network Filesystem Server options NFS_ROOT #NFS usable as /, requires NFSCLIENT -options BREAK_TO_DEBUGGER -options BOOTP_NFSROOT -options BOOTP_COMPAT -options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP options BOOTP_NFSV3 -options BOOTP_WIRED_TO=ue0 +#options BOOTP_WIRED_TO=ue0 options MSDOSFS #MSDOS Filesystem #options CD9660 #ISO 9660 Filesystem #options PROCFS #Process filesystem (requires PSEUDOFS) @@ -67,6 +68,7 @@ options SYSVMSG #SYSV-style message q options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options FREEBSD_BOOT_LOADER options PREEMPTION @@ -127,7 +129,7 @@ device da # Direct Access (disks) device miibus #device axe # ASIX Electronics USB Ethernet device smsc # SMSC LAN95xx USB Ethernet - +device bpf # OMAP-specific devices device ti_sdma Modified: user/andre/tcp_workqueue/sys/arm/conf/RPI-B ============================================================================== --- user/andre/tcp_workqueue/sys/arm/conf/RPI-B Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/arm/conf/RPI-B Fri Oct 26 17:02:50 2012 (r242150) @@ -30,6 +30,8 @@ options KERNPHYSADDR=0x00100000 makeoptions KERNPHYSADDR=0x00100000 options PHYSADDR=0x00000000 options STARTUP_PAGETABLE_ADDR=0x01000000 +options FREEBSD_BOOT_LOADER +options LINUX_BOOT_ABI makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols options HZ=100 Modified: user/andre/tcp_workqueue/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- user/andre/tcp_workqueue/sys/arm/ti/cpsw/if_cpsw.c Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/arm/ti/cpsw/if_cpsw.c Fri Oct 26 17:02:50 2012 (r242150) @@ -69,8 +69,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include "if_cpswreg.h" +#include "if_cpswvar.h" #include @@ -581,8 +581,8 @@ cpsw_encap(struct cpsw_softc *sc, struct bd.next = 0; bd.bufptr = seg->ds_addr; bd.bufoff = 0; - bd.buflen = (seg->ds_len < 64 ? 64 : seg->ds_len); - bd.pktlen = (seg->ds_len < 64 ? 64 : seg->ds_len); + bd.buflen = seg->ds_len; + bd.pktlen = seg->ds_len; /* Set OWNERSHIP, SOP, EOP */ bd.flags = (7<<13); @@ -599,6 +599,49 @@ cpsw_encap(struct cpsw_softc *sc, struct return (0); } +/* + * Pad the packet to the minimum length for Ethernet. + * (CPSW hardware doesn't do this for us.) + */ +static int +cpsw_pad(struct mbuf *m) +{ + int padlen = ETHER_MIN_LEN - m->m_pkthdr.len; + struct mbuf *last, *n; + + if (padlen <= 0) + return (0); + + /* If there's only the packet-header and we can pad there, use it. */ + if (m->m_pkthdr.len == m->m_len && M_WRITABLE(m) && + M_TRAILINGSPACE(m) >= padlen) { + last = m; + } else { + /* + * Walk packet chain to find last mbuf. We will either + * pad there, or append a new mbuf and pad it. + */ + for (last = m; last->m_next != NULL; last = last->m_next) + ; + if (!(M_WRITABLE(last) && M_TRAILINGSPACE(last) >= padlen)) { + /* Allocate new empty mbuf, pad it. Compact later. */ + MGET(n, M_DONTWAIT, MT_DATA); + if (n == NULL) + return (ENOBUFS); + n->m_len = 0; + last->m_next = n; + last = n; + } + } + + /* Now zero the pad area. */ + memset(mtod(last, caddr_t) + last->m_len, 0, padlen); + last->m_len += padlen; + m->m_pkthdr.len += padlen; + + return (0); +} + static void cpsw_start(struct ifnet *ifp) { @@ -615,6 +658,7 @@ cpsw_start_locked(struct ifnet *ifp) struct cpsw_softc *sc = ifp->if_softc; struct mbuf *m0, *mtmp; uint32_t queued = 0; + int error; CPSW_TX_LOCK_ASSERT(sc); @@ -628,6 +672,11 @@ cpsw_start_locked(struct ifnet *ifp) if (m0 == NULL) break; + if ((error = cpsw_pad(m0))) { + m_freem(m0); + continue; + } + mtmp = m_defrag(m0, M_NOWAIT); if (mtmp) m0 = mtmp; Modified: user/andre/tcp_workqueue/sys/arm/ti/ti_machdep.c ============================================================================== --- user/andre/tcp_workqueue/sys/arm/ti/ti_machdep.c Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/arm/ti/ti_machdep.c Fri Oct 26 17:02:50 2012 (r242150) @@ -306,6 +306,7 @@ initarm(struct arm_boot_params *abp) struct pv_addr dpcpu; vm_offset_t dtbp, freemempos, l2_start, lastaddr; uint32_t memsize, l2size; + char *env; void *kmdp; u_int l1pagetable; int i = 0, j = 0, err_devmap = 0; @@ -491,6 +492,10 @@ initarm(struct arm_boot_params *abp) print_kernel_section_addr(); print_kenv(); + env = getenv("kernelname"); + if (env != NULL) + strlcpy(kernelname, env, sizeof(kernelname); + if (err_devmap != 0) printf("WARNING: could not fully configure devmap, error=%d\n", err_devmap); Modified: user/andre/tcp_workqueue/sys/boot/common/interp.c ============================================================================== --- user/andre/tcp_workqueue/sys/boot/common/interp.c Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/boot/common/interp.c Fri Oct 26 17:02:50 2012 (r242150) @@ -211,7 +211,7 @@ include(const char *filename) #endif if (((fd = open(filename, O_RDONLY)) == -1)) { - sprintf(command_errbuf,"can't open '%s': %s\n", filename, strerror(errno)); + sprintf(command_errbuf,"can't open '%s': %s", filename, strerror(errno)); return(CMD_ERROR); } @@ -254,7 +254,7 @@ include(const char *filename) free(se); } sprintf(command_errbuf, "file '%s' line %d: memory allocation " - "failure - aborting\n", filename, line); + "failure - aborting", filename, line); return (CMD_ERROR); } strcpy(sp->text, cp); Modified: user/andre/tcp_workqueue/sys/boot/common/interp_forth.c ============================================================================== --- user/andre/tcp_workqueue/sys/boot/common/interp_forth.c Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/boot/common/interp_forth.c Fri Oct 26 17:02:50 2012 (r242150) @@ -132,6 +132,12 @@ bf_command(FICL_VM *vm) result=BF_PARSE; } free(line); + /* + * If there was error during nested ficlExec(), we may no longer have + * valid environment to return. Throw all exceptions from here. + */ + if (result != 0) + vmThrow(vm, result); /* This is going to be thrown!!! */ stackPushINT(vm->pStack,result); } Modified: user/andre/tcp_workqueue/sys/cam/scsi/scsi_enc.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/scsi/scsi_enc.c Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/cam/scsi/scsi_enc.c Fri Oct 26 17:02:50 2012 (r242150) @@ -879,11 +879,6 @@ enc_ctor(struct cam_periph *periph, void char *tname; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("enc_ctor: periph was NULL!!\n"); - goto out; - } - if (cgd == NULL) { printf("enc_ctor: no getdev CCB, can't register device\n"); goto out; Modified: user/andre/tcp_workqueue/sys/cam/scsi/scsi_pt.c ============================================================================== --- user/andre/tcp_workqueue/sys/cam/scsi/scsi_pt.c Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/cam/scsi/scsi_pt.c Fri Oct 26 17:02:50 2012 (r242150) @@ -255,11 +255,6 @@ ptctor(struct cam_periph *periph, void * struct ccb_pathinq cpi; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("ptregister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("ptregister: no getdev CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Oct 26 17:02:50 2012 (r242150) @@ -270,14 +270,16 @@ vdev_geom_read_config(struct g_consumer continue; if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE, - &state) != 0 || state >= POOL_STATE_DESTROYED) { + &state) != 0 || state == POOL_STATE_DESTROYED || + state > POOL_STATE_L2CACHE) { nvlist_free(*config); *config = NULL; continue; } - if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG, - &txg) != 0 || txg == 0) { + if (state != POOL_STATE_SPARE && state != POOL_STATE_L2CACHE && + (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG, + &txg) != 0 || txg == 0)) { nvlist_free(*config); *config = NULL; continue; Modified: user/andre/tcp_workqueue/sys/conf/NOTES ============================================================================== --- user/andre/tcp_workqueue/sys/conf/NOTES Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/conf/NOTES Fri Oct 26 17:02:50 2012 (r242150) @@ -897,12 +897,6 @@ device lagg # IPDIVERT enables the divert IP sockets, used by ``ipfw divert''. It # depends on IPFIREWALL if compiled into the kernel. # -# IPFIREWALL_FORWARD enables changing of the packet destination either -# to do some sort of policy routing or transparent proxying. Used by -# ``ipfw forward''. All redirections apply to locally generated -# packets too. Because of this great care is required when -# crafting the ruleset. -# # IPFIREWALL_NAT adds support for in kernel nat in ipfw, and it requires # LIBALIAS. # @@ -923,7 +917,6 @@ options IPFIREWALL #firewall options IPFIREWALL_VERBOSE #enable logging to syslogd(8) options IPFIREWALL_VERBOSE_LIMIT=100 #limit verbosity options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default -options IPFIREWALL_FORWARD #packet destination changes options IPFIREWALL_NAT #ipfw kernel nat support options IPDIVERT #divert sockets options IPFILTER #ipfilter support @@ -964,12 +957,20 @@ options TCP_SIGNATURE #include support # a smooth scheduling of the traffic. options DUMMYNET -# Zero copy sockets support. This enables "zero copy" for sending and -# receiving data via a socket. The send side works for any type of NIC, -# the receive side only works for NICs that support MTUs greater than the -# page size of your architecture and that support header splitting. See -# zero_copy(9) for more details. -options ZERO_COPY_SOCKETS +# "Zero copy" sockets support is split into the send and receive path +# which operate very differently. +# For the send path the VM page with the data is wired into the kernel +# and marked as COW (copy-on-write). If the application touches the +# data while it is still in the send socket buffer the page is copied +# and divorced from its kernel wiring (no longer zero copy). +# The receive side requires explicit NIC driver support to create +# disposable pages which are flipped from kernel to user-space VM. +# See zero_copy(9) for more details. +# XXX: The COW based send mechanism is not safe and may result in +# kernel crashes. +# XXX: None of the current NIC drivers support disposeable pages. +options SOCKET_SEND_COW +options SOCKET_RECV_PFLIP ##################################################################### # FILESYSTEM OPTIONS Modified: user/andre/tcp_workqueue/sys/conf/files ============================================================================== --- user/andre/tcp_workqueue/sys/conf/files Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/conf/files Fri Oct 26 17:02:50 2012 (r242150) @@ -270,6 +270,10 @@ cddl/contrib/opensolaris/uts/common/zmod cddl/contrib/opensolaris/uts/common/zmod/zmod.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zmod_subr.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zutil.c optional zfs compile-with "${ZFS_C}" +compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 +compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 +compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 +compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 contrib/altq/altq/altq_cbq.c optional altq \ compile-with "${NORMAL_C}" contrib/altq/altq/altq_cdnr.c optional altq @@ -1251,6 +1255,19 @@ dev/ep/if_ep_mca.c optional ep mca dev/ep/if_ep_pccard.c optional ep pccard dev/esp/esp_pci.c optional esp pci dev/esp/ncr53c9x.c optional esp +dev/etherswitch/arswitch/arswitch.c optional arswitch +dev/etherswitch/arswitch/arswitch_reg.c optional arswitch +dev/etherswitch/arswitch/arswitch_phy.c optional arswitch +dev/etherswitch/arswitch/arswitch_8216.c optional arswitch +dev/etherswitch/arswitch/arswitch_8226.c optional arswitch +dev/etherswitch/arswitch/arswitch_8316.c optional arswitch +dev/etherswitch/arswitch/arswitch_7240.c optional arswitch +dev/etherswitch/etherswitch.c optional etherswitch +dev/etherswitch/etherswitch_if.m optional etherswitch +dev/etherswitch/mdio_if.m optional miiproxy +dev/etherswitch/mdio.c optional miiproxy +dev/etherswitch/miiproxy.c optional miiproxy +dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb dev/ex/if_ex.c optional ex dev/ex/if_ex_isa.c optional ex isa dev/ex/if_ex_pccard.c optional ex pccard @@ -1759,6 +1776,12 @@ dev/oce/oce_mbox.c optional oce pci dev/oce/oce_queue.c optional oce pci dev/oce/oce_sysctl.c optional oce pci dev/oce/oce_util.c optional oce pci +dev/ofw/ofw_bus_if.m optional fdt +dev/ofw/ofw_bus_subr.c optional fdt +dev/ofw/ofw_fdt.c optional fdt +dev/ofw/ofw_if.m optional fdt +dev/ofw/openfirm.c optional fdt +dev/ofw/openfirmio.c optional fdt dev/patm/if_patm.c optional patm pci dev/patm/if_patm_attach.c optional patm pci dev/patm/if_patm_intr.c optional patm pci @@ -2303,6 +2326,16 @@ wpi.fw optional wpifw \ clean "wpi.fw" dev/xe/if_xe.c optional xe dev/xe/if_xe_pccard.c optional xe pccard +dev/xen/balloon/balloon.c optional xen | xenhvm +dev/xen/blkfront/blkfront.c optional xen | xenhvm +dev/xen/blkback/blkback.c optional xen | xenhvm +dev/xen/console/console.c optional xen +dev/xen/console/xencons_ring.c optional xen +dev/xen/control/control.c optional xen | xenhvm +dev/xen/netback/netback.c optional xen | xenhvm +dev/xen/netfront/netfront.c optional xen | xenhvm +dev/xen/xenpci/xenpci.c optional xenpci +dev/xen/xenpci/evtchn.c optional xenpci dev/xl/if_xl.c optional xl pci dev/xl/xlphy.c optional xl pci fs/deadfs/dead_vnops.c standard @@ -2544,6 +2577,7 @@ kern/clock_if.m standard kern/cpufreq_if.m standard kern/device_if.m standard kern/imgact_elf.c standard +kern/imgact_elf32.c optional compat_freebsd32 kern/imgact_shell.c standard kern/inflate.c optional gzip kern/init_main.c standard @@ -2691,7 +2725,7 @@ kern/tty_pts.c standard kern/tty_tty.c standard kern/tty_ttydisc.c standard kern/uipc_accf.c optional inet -kern/uipc_cow.c optional zero_copy_sockets +kern/uipc_cow.c optional socket_send_cow kern/uipc_debug.c optional ddb kern/uipc_domain.c standard kern/uipc_mbuf.c standard @@ -3584,13 +3618,6 @@ vm/vm_reserv.c standard vm/vm_unix.c standard vm/vm_zeroidle.c standard vm/vnode_pager.c standard -xdr/xdr.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_array.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_mbuf.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_mem.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_reference.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_sizeof.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd - xen/gnttab.c optional xen | xenhvm xen/features.c optional xen | xenhvm xen/evtchn/evtchn.c optional xen @@ -3603,30 +3630,9 @@ xen/xenbus/xenbusb_front.c optional xen xen/xenbus/xenbusb_back.c optional xen | xenhvm xen/xenstore/xenstore.c optional xen | xenhvm xen/xenstore/xenstore_dev.c optional xen | xenhvm -dev/xen/balloon/balloon.c optional xen | xenhvm -dev/xen/blkfront/blkfront.c optional xen | xenhvm -dev/xen/blkback/blkback.c optional xen | xenhvm -dev/xen/console/console.c optional xen -dev/xen/console/xencons_ring.c optional xen -dev/xen/control/control.c optional xen | xenhvm -dev/xen/netback/netback.c optional xen | xenhvm -dev/xen/netfront/netfront.c optional xen | xenhvm -dev/xen/xenpci/xenpci.c optional xenpci -dev/xen/xenpci/evtchn.c optional xenpci - -dev/etherswitch/mdio_if.m optional miiproxy -dev/etherswitch/mdio.c optional miiproxy -dev/etherswitch/miiproxy.c optional miiproxy - -dev/etherswitch/etherswitch.c optional etherswitch -dev/etherswitch/etherswitch_if.m optional etherswitch - -dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb - -dev/etherswitch/arswitch/arswitch.c optional arswitch -dev/etherswitch/arswitch/arswitch_reg.c optional arswitch -dev/etherswitch/arswitch/arswitch_phy.c optional arswitch -dev/etherswitch/arswitch/arswitch_8216.c optional arswitch -dev/etherswitch/arswitch/arswitch_8226.c optional arswitch -dev/etherswitch/arswitch/arswitch_8316.c optional arswitch -dev/etherswitch/arswitch/arswitch_7240.c optional arswitch +xdr/xdr.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_array.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_mbuf.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_mem.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_reference.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_sizeof.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd Modified: user/andre/tcp_workqueue/sys/conf/files.amd64 ============================================================================== --- user/andre/tcp_workqueue/sys/conf/files.amd64 Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/conf/files.amd64 Fri Oct 26 17:02:50 2012 (r242150) @@ -403,14 +403,9 @@ amd64/ia32/ia32_signal.c optional compat amd64/ia32/ia32_sigtramp.S optional compat_freebsd32 amd64/ia32/ia32_syscall.c optional compat_freebsd32 amd64/ia32/ia32_misc.c optional compat_freebsd32 -compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 -compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 -compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 -compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 compat/ia32/ia32_sysvec.c optional compat_freebsd32 compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs -kern/imgact_elf32.c optional compat_freebsd32 # # Linux/i386 binary support # Modified: user/andre/tcp_workqueue/sys/conf/files.arm ============================================================================== --- user/andre/tcp_workqueue/sys/conf/files.arm Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/conf/files.arm Fri Oct 26 17:02:50 2012 (r242150) @@ -1,11 +1,4 @@ # $FreeBSD$ -font.h optional sc \ - compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \ - no-obj no-implicit-rule before-depend \ - clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" - -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec arm/arm/autoconf.c standard arm/arm/bcopy_page.S standard arm/arm/bcopyinout.S standard @@ -58,23 +51,25 @@ arm/arm/vfp.c optional vfp arm/fpe-arm/armfpe_glue.S optional armfpe arm/fpe-arm/armfpe_init.c optional armfpe arm/fpe-arm/armfpe.S optional armfpe +board_id.h standard \ + dependency "$S/arm/conf/genboardid.awk $S/arm/conf/mach-types" \ + compile-with "${AWK} -f $S/arm/conf/genboardid.awk $S/arm/conf/mach-types > board_id.h" \ + no-obj no-implicit-rule before-depend \ + clean "board_id.h" cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs compile-with "${ZFS_C}" +crypto/blowfish/bf_enc.c optional crypto | ipsec +crypto/des/des_enc.c optional crypto | ipsec dev/fb/fb.c optional sc dev/hwpmc/hwpmc_arm.c optional hwpmc dev/kbd/kbd.c optional sc -dev/ofw/openfirm.c optional fdt -dev/ofw/openfirmio.c optional fdt -dev/ofw/ofw_bus_if.m optional fdt -dev/ofw/ofw_if.m optional fdt -dev/ofw/ofw_bus_subr.c optional fdt -dev/ofw/ofw_fdt.c optional fdt dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc -geom/geom_bsd.c optional geom_bsd -geom/geom_bsd_enc.c optional geom_bsd -geom/geom_mbr.c optional geom_mbr -geom/geom_mbr_enc.c optional geom_mbr +font.h optional sc \ + compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \ + no-obj no-implicit-rule before-depend \ + clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" +kern/subr_dummy_vdso_tc.c standard libkern/arm/divsi3.S standard libkern/arm/ffs.S standard libkern/arm/muldi3.c standard @@ -91,13 +86,3 @@ libkern/qdivrem.c standard libkern/ucmpdi2.c standard libkern/udivdi3.c standard libkern/umoddi3.c standard -#XXX: We can't use these versions, as strcmp.c is included conf/files -#libkern/arm/strcmp.S standard -#libkern/arm/strncmp.S standard -# -kern/subr_dummy_vdso_tc.c standard -board_id.h standard \ - dependency "$S/arm/conf/genboardid.awk $S/arm/conf/mach-types" \ - compile-with "${AWK} -f $S/arm/conf/genboardid.awk $S/arm/conf/mach-types > board_id.h" \ - no-obj no-implicit-rule before-depend \ - clean "board_id.h" Modified: user/andre/tcp_workqueue/sys/conf/files.ia64 ============================================================================== --- user/andre/tcp_workqueue/sys/conf/files.ia64 Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/conf/files.ia64 Fri Oct 26 17:02:50 2012 (r242150) @@ -29,10 +29,6 @@ ukbdmap.h optional ukbd_dflt_keymap \ clean "ukbdmap.h" # cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S optional zfs compile-with "${ZFS_S}" -compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 -compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 -compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 -compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 compat/ia32/ia32_sysvec.c optional compat_freebsd32 contrib/ia64/libuwx/src/uwx_bstream.c standard contrib/ia64/libuwx/src/uwx_context.c standard @@ -119,7 +115,6 @@ ia64/isa/isa_dma.c optional isa ia64/pci/pci_cfgreg.c optional pci isa/syscons_isa.c optional sc isa/vga_isa.c optional vga -kern/imgact_elf32.c optional compat_freebsd32 kern/kern_clocksource.c standard libkern/bcmp.c standard libkern/ffsl.c standard Modified: user/andre/tcp_workqueue/sys/conf/files.mips ============================================================================== --- user/andre/tcp_workqueue/sys/conf/files.mips Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/conf/files.mips Fri Oct 26 17:02:50 2012 (r242150) @@ -1,130 +1,84 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# Copyright (c) 2001, 2004-2005, Juniper Networks, Inc. -# All rights reserved. -# JNPR: files.mips,v 1.11 2007/08/09 12:25:35 katta -# -# ---------------------------------------------------------------------- -# Phase 2 -# ---------------------------------------------------------------------- -# This file tells config what files go into building a kernel, -# files marked standard are always included. -# -# Copyright (c) 2001, 2004-2005, Juniper Networks, Inc. -# All rights reserved. -# JNPR: files.mips,v 1.11 2007/08/09 12:25:35 katta # $FreeBSD$ # -# ---------------------------------------------------------------------- -# Phase 2 -# ---------------------------------------------------------------------- -mips/mips/machdep.c standard -mips/mips/mp_machdep.c optional smp -mips/mips/mpboot.S optional smp -# ---------------------------------------------------------------------- -# Phase 3 -# ---------------------------------------------------------------------- -mips/mips/autoconf.c standard -mips/mips/cpu.c standard -mips/mips/elf_machdep.c standard -mips/mips/exception.S standard -mips/mips/gdb_machdep.c standard -mips/mips/pmap.c standard -mips/mips/trap.c standard -mips/mips/vm_machdep.c standard -# ---------------------------------------------------------------------- -# Phase 4 -# ---------------------------------------------------------------------- -# ---------------------------------------------------------------------- -# Phase 5 -# ---------------------------------------------------------------------- -mips/mips/fp.S standard -mips/mips/pm_machdep.c standard -mips/mips/swtch.S standard -mips/mips/tlb.c standard - -mips/mips/bus_space_generic.c standard -mips/mips/busdma_machdep.c standard -mips/mips/cache.c standard -mips/mips/cache_mipsNN.c standard -mips/mips/db_disasm.c optional ddb -mips/mips/db_interface.c optional ddb -mips/mips/db_trace.c optional ddb -mips/mips/dump_machdep.c standard -mips/mips/in_cksum.c optional inet | inet6 -mips/mips/locore.S standard no-obj -mips/mips/minidump_machdep.c standard -mips/mips/mem.c optional mem -mips/mips/libkern_machdep.c standard -mips/mips/nexus.c standard -mips/mips/stack_machdep.c optional ddb | stack -mips/mips/support.S standard -mips/mips/sys_machdep.c standard -mips/mips/swtch.S standard -mips/mips/uio_machdep.c standard -mips/mips/uma_machdep.c standard -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec -geom/geom_bsd.c optional geom_bsd -geom/geom_bsd_enc.c optional geom_bsd -geom/geom_mbr.c optional geom_mbr -geom/geom_mbr_enc.c optional geom_mbr -libkern/ashldi3.c standard -libkern/ashrdi3.c standard -libkern/cmpdi2.c standard -libkern/ffsl.c standard -libkern/fls.c standard -libkern/flsl.c standard -libkern/lshrdi3.c standard -libkern/memchr.c optional fdt -libkern/memmove.c standard -libkern/ucmpdi2.c standard - -#XXX: We can't use these versions, as strcmp.c is included conf/files -#libkern/mips/strcmp.S standard -#libkern/mips/strncmp.S standard - -cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs compile-with "${ZFS_C}" -compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 -compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 -compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 -compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 -kern/imgact_elf32.c optional compat_freebsd32 -kern/subr_dummy_vdso_tc.c standard -mips/mips/freebsd32_machdep.c optional compat_freebsd32 -kern/kern_clocksource.c standard -kern/link_elf_obj.c standard +# Arch dependent files +mips/mips/autoconf.c standard +mips/mips/bus_space_generic.c standard +mips/mips/busdma_machdep.c standard +mips/mips/cache.c standard +mips/mips/cache_mipsNN.c standard +mips/mips/cpu.c standard +mips/mips/db_disasm.c optional ddb +mips/mips/db_interface.c optional ddb +mips/mips/db_trace.c optional ddb +mips/mips/dump_machdep.c standard +mips/mips/elf_machdep.c standard +mips/mips/exception.S standard +mips/mips/fp.S standard +mips/mips/freebsd32_machdep.c optional compat_freebsd32 +mips/mips/gdb_machdep.c standard +mips/mips/in_cksum.c optional inet +mips/mips/libkern_machdep.c standard +mips/mips/locore.S standard no-obj +mips/mips/machdep.c standard +mips/mips/mem.c optional mem +mips/mips/minidump_machdep.c standard +mips/mips/mp_machdep.c optional smp +mips/mips/mpboot.S optional smp +mips/mips/nexus.c standard +mips/mips/pm_machdep.c standard +mips/mips/pmap.c standard +mips/mips/ptrace_machdep.c standard +mips/mips/sc_machdep.c standard +mips/mips/stack_machdep.c standard +mips/mips/support.S standard +mips/mips/swtch.S standard +mips/mips/sys_machdep.c standard +mips/mips/tlb.c standard +mips/mips/trap.c standard +mips/mips/uio_machdep.c standard +mips/mips/uma_machdep.c standard +mips/mips/vm_machdep.c standard + +# misc opt-in bits +kern/kern_clocksource.c standard +kern/link_elf_obj.c standard +kern/subr_dummy_vdso_tc.c standard -dev/cfe/cfe_api.c optional cfe -dev/cfe/cfe_console.c optional cfe_console -dev/cfe/cfe_env.c optional cfe_env -#dev/cfe/cfe_resource.c optional cfe # not yet needed - -dev/siba/siba.c optional siba -dev/siba/siba_cc.c optional siba -dev/siba/siba_core.c optional siba -dev/siba/siba_pcib.c optional siba pci -#mips/sentry5/siba_mips.c optional siba # not yet - -dev/hwpmc/hwpmc_mips.c optional hwpmc - -dev/rt/if_rt.c optional rt -dev/nvram2env/nvram2env.c optional nvram2env - -dev/ofw/openfirm.c optional fdt -dev/ofw/openfirmio.c optional fdt -dev/ofw/ofw_bus_if.m optional fdt -dev/ofw/ofw_if.m optional fdt -dev/ofw/ofw_bus_subr.c optional fdt -dev/ofw/ofw_fdt.c optional fdt - -dev/fdt/fdt_mips.c optional fdt - -dev/fb/fb.c optional sc -dev/kbd/kbd.c optional sc -dev/syscons/scgfbrndr.c optional sc -dev/syscons/scterm-teken.c optional sc -dev/syscons/scvtb.c optional sc -mips/mips/sc_machdep.c optional sc +# gcc/clang runtime +libkern/ffsl.c standard +libkern/fls.c standard +libkern/flsl.c standard +libkern/memchr.c optional fdt +libkern/memmove.c standard +libkern/ucmpdi2.c optional mips | mipsel + +# cfe support +dev/cfe/cfe_api.c optional cfe +dev/cfe/cfe_console.c optional cfe_console +dev/cfe/cfe_env.c optional cfe_env + +# syscons support +dev/fb/fb.c optional sc +dev/kbd/kbd.c optional sc +dev/syscons/scgfbrndr.c optional sc +dev/syscons/scterm-teken.c optional sc +dev/syscons/scvtb.c optional sc +mips/mips/sc_machdep.c optional sc + +# FDT support +dev/fdt/fdt_mips.c optional fdt + +# crypto support -- use generic +crypto/blowfish/bf_enc.c optional crypto | ipsec +crypto/des/des_enc.c optional crypto | ipsec + +# AP common nvram interface +dev/nvram2env/nvram2env.c optional nvram2env + +# hwpmc goo +dev/hwpmc/hwpmc_mips.c optional hwpmc +dev/hwpmc/hwpmc_mips24k.c optional hwpmc Modified: user/andre/tcp_workqueue/sys/conf/files.powerpc ============================================================================== --- user/andre/tcp_workqueue/sys/conf/files.powerpc Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/conf/files.powerpc Fri Oct 26 17:02:50 2012 (r242150) @@ -37,14 +37,14 @@ dev/iicbus/ds1775.c optional ds1775 pow dev/iicbus/max6690.c optional max6690 powermac dev/kbd/kbd.c optional sc dev/nand/nfc_fsl.c optional nand mpc85xx -dev/ofw/openfirm.c optional aim | fdt -dev/ofw/openfirmio.c optional aim | fdt -dev/ofw/ofw_bus_if.m optional aim | fdt -dev/ofw/ofw_if.m optional aim | fdt -dev/ofw/ofw_bus_subr.c optional aim | fdt +# ofw can be either aim or fdt: fdt case handled in files. aim only powerpc specific. +dev/ofw/openfirm.c optional aim +dev/ofw/openfirmio.c optional aim +dev/ofw/ofw_bus_if.m optional aim +dev/ofw/ofw_if.m optional aim +dev/ofw/ofw_bus_subr.c optional aim dev/ofw/ofw_console.c optional aim dev/ofw/ofw_disk.c optional ofwd aim -dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_iicbus.c optional iicbus aim dev/ofw/ofw_standard.c optional aim powerpc dev/powermac_nvram/powermac_nvram.c optional powermac_nvram powermac @@ -234,10 +234,3 @@ powerpc/wii/wii_pic.c optional wii powerpc/wii/wii_fb.c optional wii powerpc/wii/wii_gpio.c optional wiigpio powerpc/wii/wii_ipc.c optional wii - -compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 -compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 -compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 -compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 -kern/imgact_elf32.c optional compat_freebsd32 - Modified: user/andre/tcp_workqueue/sys/conf/kern.post.mk ============================================================================== --- user/andre/tcp_workqueue/sys/conf/kern.post.mk Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/conf/kern.post.mk Fri Oct 26 17:02:50 2012 (r242150) @@ -154,7 +154,7 @@ ${mfile:T:S/.m$/.h/}: ${mfile} kernel-clean: rm -f *.o *.so *.So *.ko *.s eddep errs \ ${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.symbols \ - linterrs makelinks tags vers.c \ + linterrs tags vers.c \ vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \ ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ ${CLEAN} @@ -237,14 +237,6 @@ ${_ILINKS}: kernel-cleandepend: rm -f .depend ${_ILINKS} -links: - egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ - sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink - ${MAKE} -V CFILES | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ - sort -u | comm -23 - dontlink | \ - sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks - sh makelinks; rm -f dontlink - kernel-tags: @[ -f .depend ] || { echo "you must make depend first"; exit 1; } sh $S/conf/systags.sh Modified: user/andre/tcp_workqueue/sys/conf/options ============================================================================== --- user/andre/tcp_workqueue/sys/conf/options Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/conf/options Fri Oct 26 17:02:50 2012 (r242150) @@ -398,7 +398,6 @@ IPFILTER_LOG opt_ipfilter.h IPFILTER_LOOKUP opt_ipfilter.h IPFIREWALL opt_ipfw.h IPFIREWALL_DEFAULT_TO_ACCEPT opt_ipfw.h -IPFIREWALL_FORWARD opt_ipfw.h IPFIREWALL_NAT opt_ipfw.h IPFIREWALL_VERBOSE opt_ipfw.h IPFIREWALL_VERBOSE_LIMIT opt_ipfw.h @@ -520,7 +519,8 @@ NGATM_CCATM opt_netgraph.h # DRM options DRM_DEBUG opt_drm.h -ZERO_COPY_SOCKETS opt_zero.h +SOCKET_SEND_COW opt_zero.h +SOCKET_RECV_PFLIP opt_zero.h TI_SF_BUF_JUMBO opt_ti.h TI_JUMBO_HDRSPLIT opt_ti.h BCE_JUMBO_HDRSPLIT opt_bce.h Modified: user/andre/tcp_workqueue/sys/conf/options.ia64 ============================================================================== --- user/andre/tcp_workqueue/sys/conf/options.ia64 Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/conf/options.ia64 Fri Oct 26 17:02:50 2012 (r242150) @@ -11,6 +11,8 @@ UWX_TRACE_ENABLE opt_global.h COMPAT_FREEBSD32 opt_compat.h +PV_STATS opt_pmap.h + EXCEPTION_TRACING opt_xtrace.h VGA_ALT_SEQACCESS opt_vga.h Modified: user/andre/tcp_workqueue/sys/conf/options.mips ============================================================================== --- user/andre/tcp_workqueue/sys/conf/options.mips Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/conf/options.mips Fri Oct 26 17:02:50 2012 (r242150) @@ -39,6 +39,13 @@ CPU_RMI opt_global.h CPU_NLM opt_global.h CPU_BERI opt_global.h +# which MACHINE_ARCH architecture +MIPS +MIPSEL +MIPS64 +MIPS64EL +MIPSN32 + COMPAT_FREEBSD32 opt_compat.h YAMON opt_global.h @@ -65,6 +72,7 @@ MAXMEM opt_global.h # Options that control the Cavium Simple Executive. # OCTEON_VENDOR_LANNER opt_cvmx.h +OCTEON_VENDOR_RADISYS opt_cvmx.h OCTEON_BOARD_CAPK_0100ND opt_cvmx.h # Modified: user/andre/tcp_workqueue/sys/contrib/dev/acpica/changes.txt ============================================================================== --- user/andre/tcp_workqueue/sys/contrib/dev/acpica/changes.txt Fri Oct 26 16:56:55 2012 (r242149) +++ user/andre/tcp_workqueue/sys/contrib/dev/acpica/changes.txt Fri Oct 26 17:02:50 2012 (r242150) @@ -1,30 +1,115 @@ ---------------------------------------- +18 October 2012. Summary of changes for version 20121018: + + +1) ACPICA Kernel-resident Subsystem: + +Updated support for the ACPI 5.0 MPST table. Fixes some problems +introduced by late changes to the table as it was added to the ACPI 5.0 +specification. Includes header, disassembler, and data table compiler +support as well as a new version of the MPST template. + +AcpiGetObjectInfo: Enhanced the device object support to include the ACPI +5.0 _SUB method. Now calls _SUB in addition to the other PNP-related ID +methods: _HID, _CID, and _UID. + +Changed ACPI_DEVICE_ID to ACPI_PNP_DEVICE_ID. Also changed +ACPI_DEVICE_ID_LIST to ACPI_PNP_DEVICE_ID_LIST. These changes prevent +name collisions on hosts that reserve the *_DEVICE_ID (or *DeviceId) +names for their various drivers. Affects the AcpiGetObjectInfo external +interface, and other internal interfaces as well. + +Added and deployed a new macro for ACPI_NAME management: ACPI_MOVE_NAME. +This macro resolves to a simple 32-bit move of the 4-character ACPI_NAME +on machines that support non-aligned transfers. Optimizes for this case +rather than using a strncpy. With assistance from Zheng Lv. + +Resource Manager: Small fix for buffer size calculation. Fixed a one byte +error in the output buffer calculation. Feng Tang. ACPICA BZ 849. + +Added a new debug print message for AML mutex objects that are force- +released. At control method termination, any currently acquired mutex +objects are force-released. Adds a new debug-only message for each one +that is released. + +Audited/updated all ACPICA return macros and the function debug depth +counter: 1) Ensure that all functions that use the various TRACE macros +also use the appropriate ACPICA return macros. 2) Ensure that all normal +return statements surround the return expression (value) with parens to +ensure consistency across the ACPICA code base. Guan Chao, Tang Feng, +Zheng Lv, Bob Moore. ACPICA Bugzilla 972. + +Global source code changes/maintenance: All extra lines at the start and +end of each source file have been removed for consistency. Also, within +comments, all new sentences start with a single space instead of a double +space, again for consistency across the code base. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Previous Release: + Non-Debug Version: 93.7K Code, 25.3K Data, 119.0K Total + Debug Version: 175.0K Code, 74.4K Data, 249.4K Total + Current Release: + Non-Debug Version: 93.9K Code, 25.2K Data, 119.1K Total + Debug Version: 175.5K Code, 74.5K Data, 250.0K Total + + +2) iASL Compiler/Disassembler and Tools: + +AcpiExec: Improved the algorithm used for memory leak/corruption +detection. Added some intelligence to the code that maintains the global +list of allocated memory. The list is now ordered by allocated memory +address, significantly improving performance. When running AcpiExec on +the ASLTS test suite, speed improvements of 3X to 5X are seen, depending +on the platform and/or the environment. Note, this performance +enhancement affects the AcpiExec utility only, not the kernel-resident +ACPICA code. + +Enhanced error reporting for invalid AML opcodes and bad ACPI_NAMEs. For +the disassembler, dump the 48 bytes surrounding the invalid opcode. Fix +incorrect table offset reported for invalid opcodes. Report the original +32-bit value for bad ACPI_NAMEs (as well as the repaired name.) + +Disassembler: Enhanced the -vt option to emit the binary table data in +hex format to assist with debugging. + +Fixed a potential filename buffer overflow in osunixdir.c. Increased the +size of file structure. Colin Ian King. + +---------------------------------------- 13 September 2012. Summary of changes for version 20120913: -This release is available at https://www.acpica.org/downloads The ACPI 5.0 -specification is available at www.acpi.info 1) ACPICA Kernel-resident Subsystem: ACPI 5.0: Added two new notify types for the Hardware Error Notification -Structure within the Hardware Error Source Table (HEST) table -- CMCI(5) and +Structure within the Hardware Error Source Table (HEST) table -- CMCI(5) +and MCE(6). Table Manager: Merged/removed duplicate code in the root table resize -functions. One function is external, the other is internal. Lv Zheng, ACPICA +functions. One function is external, the other is internal. Lv Zheng, +ACPICA BZ 846. Makefiles: Completely removed the obsolete "Linux" makefiles under -acpica/generate/linux. These makefiles are obsolete and have been replaced by +acpica/generate/linux. These makefiles are obsolete and have been replaced +by the generic unix makefiles under acpica/generate/unix. -Makefiles: Ensure that binary files always copied properly. Minor rule change +Makefiles: Ensure that binary files always copied properly. Minor rule +change to ensure that the final binary output files are always copied up to the appropriate binary directory (bin32 or bin64.) Example Code and Data Size: These are the sizes for the OS-independent -acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug -version of the code includes the debug output trace mechanism and has a much +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug +version of the code includes the debug output trace mechanism and has a +much larger code and data size. Previous Release: @@ -42,27 +127,37 @@ descriptors when a second parse is requi external control methods within the table. With assistance from adq@lidskialf.net. ACPICA BZ 976. -iASL: Fixed a namepath optimization problem. An error can occur if the parse -node that contains the namepath to be optimized does not have a parent node +iASL: Fixed a namepath optimization problem. An error can occur if the +parse +node that contains the namepath to be optimized does not have a parent +node that is a named object. This change fixes the problem. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Sat Oct 27 10:01:14 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA5E49BC for ; Sat, 27 Oct 2012 10:01:13 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3A0F78FC1E for ; Sat, 27 Oct 2012 10:01:12 +0000 (UTC) Received: (qmail 69513 invoked from network); 27 Oct 2012 11:38:24 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 27 Oct 2012 11:38:24 -0000 Message-ID: <508BB0D3.70205@freebsd.org> Date: Sat, 27 Oct 2012 12:00:51 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Ermal_Lu=E7i?= Subject: Re: svn commit: r241966 - user/andre/tcp_workqueue/sys/net References: <201210231926.q9NJQnqu039908@svn.freebsd.org> <5086F086.6080000@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: src-committers@freebsd.org, svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2012 10:01:14 -0000 On 24.10.2012 14:35, Ermal Luçi wrote: > Hello Andre, > > i have since forever wanted to merge this but never got to it. > https://github.com/bsdperimeter/pfsense-tools/blob/master/patches/RELENG_9_0/pfil.RELENG_9.diff > > This has been used in pfsense quite sucessfully. It allows to reorder > the pfil hooks based on names of registered hooks using sysctl. Thank you. I'm looking into it. -- Andre > On Tue, Oct 23, 2012 at 9:31 PM, Andre Oppermann wrote: >> On 23.10.2012 21:26, Andre Oppermann wrote: >>> >>> Author: andre >>> Date: Tue Oct 23 19:26:49 2012 >>> New Revision: 241966 >>> URL: http://svn.freebsd.org/changeset/base/241966 >>> >>> Log: >>> Extend PFIL hooks with explicit hook ordering and reinjecting of >>> packets into the chain after a particular hook. >>> >>> Add pfil_add_hook_order() taking a numerical value between 0-255 >>> to specify the relative position of this hook in the list of all >>> hooks. Lower numbers have higher ordering (ie. will run first). >>> Within a particular order value the last added will be the first >>> to run. Three fixed positions are defined: >>> PFIL_ORDER_FIRST 0 >>> PFIL_ORDER_DEFAULT 200 >>> PFIL_ORDER_LAST 255 >>> >>> Previously the order was non-deterministic and dependent on the >>> ordering of the add hook calls. The last added would always >>> become the first to run. >>> >>> Non-ordering aware pfil consumers using the pfil_add_hook() call >>> get PFIL_ORDER_DEFAULT assigned resulting in the previous ordering. >>> >>> The ordering is determined at hookup time by the pfil consumer >>> and no tool for later manual re-ordering is provided. Most well >>> known pfil consumers are expected to have a predetermined preferred >>> position in the order. A tool or sysctl reporting the order of >>> hooked pfil consumers will be provided later. >>> >>> Add pfil_run_inject() taking an opaque cookie value obtained with >>> pfil_get_cookie() after the hook is added. Processing of the hook >>> chain skips all hooks until after the one with the same cookie. >>> The cookie is valid as long as this hook remains hooked. If no >>> cookie is found processing is started with the first hook again. >>> If the cookie is invalid processing of all hooks is effectively >>> skipped. >>> >>> With this pfil hooks consumers can dequeue packets for further >>> processing and later re-inject them with the next hook. >> >> >> Besides the obvious ordering solution to the exiting pfil consumers >> my idea is to explore converting most of ether_input/output and IPsec >> processing to pfil hooks. This will need some further definitions >> for the default PFIL_ORDER points but that'll happen when there's >> some practical experimenting with running it. >> >> -- >> Andre >> > > > From owner-svn-src-user@FreeBSD.ORG Sat Oct 27 10:33:52 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33964294; Sat, 27 Oct 2012 10:33:52 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F40E98FC0A; Sat, 27 Oct 2012 10:33:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9RAXpYp048881; Sat, 27 Oct 2012 10:33:51 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RAXpL1048878; Sat, 27 Oct 2012 10:33:51 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210271033.q9RAXpL1048878@svn.freebsd.org> From: Andre Oppermann Date: Sat, 27 Oct 2012 10:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242176 - user/andre/tcp_workqueue/sys/net X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2012 10:33:52 -0000 Author: andre Date: Sat Oct 27 10:33:51 2012 New Revision: 242176 URL: http://svn.freebsd.org/changeset/base/242176 Log: Add hook naming to pfil_add_hook_order() to be able to display a human readable description of a particular hook. Submitted by: eri Modified: user/andre/tcp_workqueue/sys/net/pfil.c user/andre/tcp_workqueue/sys/net/pfil.h Modified: user/andre/tcp_workqueue/sys/net/pfil.c ============================================================================== --- user/andre/tcp_workqueue/sys/net/pfil.c Sat Oct 27 10:14:12 2012 (r242175) +++ user/andre/tcp_workqueue/sys/net/pfil.c Sat Oct 27 10:33:51 2012 (r242176) @@ -246,12 +246,14 @@ pfil_add_hook(int (*func)(void *, struct struct inpcb *), void *arg, int flags, struct pfil_head *ph) { - return (pfil_add_hook_order(func, arg, flags, PFIL_ORDER_DEFAULT, ph)); + return (pfil_add_hook_order(func, arg, "unknown", flags, + PFIL_ORDER_DEFAULT, ph)); } int pfil_add_hook_order(int (*func)(void *, struct mbuf **, struct ifnet *, int, - struct inpcb *), void *arg, int flags, uint8_t order, struct pfil_head *ph) + struct inpcb *), void *arg, char *name, int flags, uint8_t order, + struct pfil_head *ph) { struct packet_filter_hook *pfh1 = NULL; struct packet_filter_hook *pfh2 = NULL; @@ -268,6 +270,7 @@ pfil_add_hook_order(int (*func)(void *, pfh1->pfil_arg = arg; pfh1->pfil_cookie = (int)random(); pfh1->pfil_order = order; + pfh1->pfil_name = name; } if (flags & PFIL_OUT) { pfh2 = (struct packet_filter_hook *)malloc(sizeof(*pfh1), @@ -280,6 +283,7 @@ pfil_add_hook_order(int (*func)(void *, pfh2->pfil_arg = arg; pfh2->pfil_cookie = (int)random(); pfh2->pfil_order = order; + pfh2->pfil_name = name; } PFIL_WLOCK(ph); if (flags & PFIL_IN) { Modified: user/andre/tcp_workqueue/sys/net/pfil.h ============================================================================== --- user/andre/tcp_workqueue/sys/net/pfil.h Sat Oct 27 10:14:12 2012 (r242175) +++ user/andre/tcp_workqueue/sys/net/pfil.h Sat Oct 27 10:33:51 2012 (r242176) @@ -57,6 +57,7 @@ struct packet_filter_hook { void *pfil_arg; int pfil_cookie; uint8_t pfil_order; + char *pfil_name; }; #define PFIL_ORDER_FIRST 0 @@ -99,7 +100,8 @@ struct pfil_head { int pfil_add_hook(int (*func)(void *, struct mbuf **, struct ifnet *, int, struct inpcb *), void *, int, struct pfil_head *); int pfil_add_hook_order(int (*func)(void *, struct mbuf **, struct ifnet *, - int, struct inpcb *), void *, int, uint8_t, struct pfil_head *); + int, struct inpcb *), void *, char *, int, uint8_t, + struct pfil_head *); int pfil_get_cookie(int (*func)(void *, struct mbuf **, struct ifnet *, int, struct inpcb *), void *, int, struct pfil_head *); int pfil_remove_hook(int (*func)(void *, struct mbuf **, struct ifnet *, From owner-svn-src-user@FreeBSD.ORG Sat Oct 27 12:03:01 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F4F2B25; Sat, 27 Oct 2012 12:03:01 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72A068FC12; Sat, 27 Oct 2012 12:03:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9RC31Yh069225; Sat, 27 Oct 2012 12:03:01 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RC31bf069222; Sat, 27 Oct 2012 12:03:01 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210271203.q9RC31bf069222@svn.freebsd.org> From: Andre Oppermann Date: Sat, 27 Oct 2012 12:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242177 - in user/andre/tcp_workqueue/sys: conf netipsec X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2012 12:03:01 -0000 Author: andre Date: Sat Oct 27 12:03:00 2012 New Revision: 242177 URL: http://svn.freebsd.org/changeset/base/242177 Log: Convert IPsec packet path processing into a pfil hook that can be inserted at runtime and loaded as kernel module. In this first step the functionality of ip_ipsec.c and the IP input and output path is moved into pfil hooks. This is a first rudimentary implementation approach and not yet functional. Added: user/andre/tcp_workqueue/sys/netipsec/ipsec_pfil.c Modified: user/andre/tcp_workqueue/sys/conf/files Modified: user/andre/tcp_workqueue/sys/conf/files ============================================================================== --- user/andre/tcp_workqueue/sys/conf/files Sat Oct 27 10:33:51 2012 (r242176) +++ user/andre/tcp_workqueue/sys/conf/files Sat Oct 27 12:03:00 2012 (r242177) @@ -3135,6 +3135,7 @@ netipsec/ipsec.c optional ipsec inet | netipsec/ipsec_input.c optional ipsec inet | ipsec inet6 netipsec/ipsec_mbuf.c optional ipsec inet | ipsec inet6 netipsec/ipsec_output.c optional ipsec inet | ipsec inet6 +netipsec/ipsec_pfil.c optional ipsec inet | ipsec inet6 netipsec/key.c optional ipsec inet | ipsec inet6 netipsec/key_debug.c optional ipsec inet | ipsec inet6 netipsec/keysock.c optional ipsec inet | ipsec inet6 Added: user/andre/tcp_workqueue/sys/netipsec/ipsec_pfil.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/andre/tcp_workqueue/sys/netipsec/ipsec_pfil.c Sat Oct 27 12:03:00 2012 (r242177) @@ -0,0 +1,283 @@ +/* + * Copyright (c) 2012 Andre Oppermann, Internet Business Solutions AG + * All rights reserved. + * Copyright (c) 1982, 1986, 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_ipsec.h" +#include "opt_sctp.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef SCTP +#include +#endif +#include + +#include +#include +#include + +extern struct protosw inetsw[]; + +/* + * Implement IPSec as pfil hook for host mode. + */ + +static int +ipsec_pfil_run(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, + struct inpcb *inp) +{ + struct ip *ip = mtod(*m, struct ip *); + struct m_tag *mtag; + struct tdb_ident *tdbi; + struct secpolicy *sp; + int error = 0; + + switch (dir) { + case PFIL_IN: + /* + * The input path doesn't do a transform. + */ + if ((inetsw[ip_protox[ip->ip_p]].pr_flags & PR_LASTHDR) != 0) + return (0); + /* + * Check if the packet has already had IPsec processing + * done. If so, then just pass it along. This tag gets + * set during AH, ESP, etc. input handling, before the + * packet is returned to the ip input queue for delivery. + */ + mtag = m_tag_find(*m, PACKET_TAG_IPSEC_IN_DONE, NULL); + if (mtag != NULL) { + tdbi = (struct tdb_ident *)(mtag + 1); + sp = ipsec_getpolicy(tdbi, IPSEC_DIR_INBOUND); + } else + sp = ipsec_getpolicybyaddr(*m, IPSEC_DIR_INBOUND, + IP_FORWARDING, &error); + + /* Check security policy against packet attributes. */ + if (sp != NULL) { + error = ipsec_in_reject(sp, *m); + KEY_FREESP(&sp); + } else + error = EINVAL; + break; + + case PFIL_OUT: + /* + * Check the security policy (SP) for the packet and, if + * required, do IPsec-related processing. There are two + * cases here; the first time a packet is sent through + * it will be untagged and handled by ipsec4_checkpolicy. + * If the packet is resubmitted to ip_output (e.g. after + * AH, ESP, etc. processing), there will be a tag to bypass + * the lookup and related policy checking. + */ + mtag = m_tag_find(*m, PACKET_TAG_IPSEC_PENDING_TDB, NULL); + if (mtag != NULL) { + tdbi = (struct tdb_ident *)(mtag + 1); + sp = ipsec_getpolicy(tdbi, IPSEC_DIR_OUTBOUND); + if (sp == NULL) { + error = -EINVAL; /* force silent drop */ + goto drop; + } + m_tag_delete(*m, mtag); + } else + sp = ipsec4_checkpolicy(*m, IPSEC_DIR_OUTBOUND, 0, + &error, inp); + + if (sp == NULL) { + if (error != 0) { + /* + * Hack: -EINVAL is used to signal that a packet + * should be silently discarded. This is typically + * because we asked key management for an SA and + * it was delayed (e.g. kicked up to IKE). + */ + if (error == -EINVAL) + error = 0; + goto drop; + } + return (0); + } + + /* Loop detection, check if ipsec processing already done */ + KASSERT(sp->req != NULL, ("ip_output: no ipsec request")); + + for (mtag = m_tag_first(*m); mtag != NULL; + mtag = m_tag_next(*m, mtag)) { + if (mtag->m_tag_cookie != MTAG_ABI_COMPAT) + continue; + if (mtag->m_tag_id != PACKET_TAG_IPSEC_OUT_DONE && + mtag->m_tag_id != PACKET_TAG_IPSEC_OUT_CRYPTO_NEEDED) + continue; + /* + * Check if policy has an SA associated with it. + * This can happen when an SP has yet to acquire + * an SA; e.g. on first reference. If it occurs, + * then we let ipsec4_process_packet do its thing. + */ + if (sp->req->sav == NULL) + break; + tdbi = (struct tdb_ident *)(mtag + 1); + if (tdbi->spi == sp->req->sav->spi && + tdbi->proto == sp->req->sav->sah->saidx.proto && + bcmp(&tdbi->dst, &sp->req->sav->sah->saidx.dst, + sizeof (union sockaddr_union)) == 0) { + /* + * No IPsec processing is needed, free + * reference to SP. + * + * NB: null pointer to avoid free at + * done: below. + */ + KEY_FREESP(&sp); + return (0); + } + } + + /* + * Do delayed checksums now because we send before + * this is done in the normal processing path. + */ + if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { + in_delayed_cksum(*m); + (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; + } +#ifdef SCTP + if ((*m)->m_pkthdr.csum_flags & CSUM_SCTP) { + struct ip *ip = mtod(*m, struct ip *); + + sctp_delayed_cksum(*m, (uint32_t)(ip->ip_hl << 2)); + (*m)->m_pkthdr.csum_flags &= ~CSUM_SCTP; + } +#endif + /* NB: callee frees mbuf */ + error = ipsec4_process_packet(*m, sp->req, 0, 0); + if (error == EJUSTRETURN) { + /* + * We had a SP with a level of 'use' and no SA. We + * will just continue to process the packet without + * IPsec processing and return without error. + */ + error = 0; + KEY_FREESP(&sp); + return (0); + } + /* + * Preserve KAME behaviour: ENOENT can be returned + * when an SA acquire is in progress. Don't propagate + * this to user-level; it confuses applications. + * + * XXX this will go away when the SADB is redone. + */ + if (error == ENOENT) + error = 0; + goto drop; + + break; + + default: + break; + } + +drop: + if (error < 0) + error = EACCES; + if (sp != NULL) + KEY_FREESP(&sp); + + m_freem(*m); + return (error); +} + +static int +ipsec_pfil_hook(int af) +{ + struct pfil_head *pfh; + + pfh = pfil_head_get(PFIL_TYPE_AF, af); + if (pfh == NULL) + return ENOENT; + + pfil_add_hook_order(ipsec_pfil_run, NULL, "ipsec", + (PFIL_IN | PFIL_OUT), PFIL_ORDER_FIRST, pfh); + + return (0); +} + +static int +ipsec_pfil_unhook(int af) +{ + struct pfil_head *pfh; + + pfh = pfil_head_get(PFIL_TYPE_AF, af); + if (pfh == NULL) + return ENOENT; + + pfil_remove_hook(ipsec_pfil_run, NULL, (PFIL_IN | PFIL_OUT), pfh); + + return (0); +} + +static void +ipsec_pfil_init(void) +{ + + (void)ipsec_pfil_hook(AF_INET); + (void)ipsec_pfil_unhook(AF_INET); +} + +SYSINIT(ipsec_pfil_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, ipsec_pfil_init, NULL); + From owner-svn-src-user@FreeBSD.ORG Sat Oct 27 14:35:08 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9DC0636; Sat, 27 Oct 2012 14:35:08 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4D4B38FC12; Sat, 27 Oct 2012 14:35:07 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so2841995lbd.13 for ; Sat, 27 Oct 2012 07:35:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=F4ftH1bv+YOyZDoaGOfTQ7zpHERruZALBxYUpqXYkBs=; b=g4ThgqQ3BJ6g0M0HnEDu4OD7a06KvVGaE1nPrnEAxkCUsHwLW26H48n+8J3TJEZzON kCYOl9r7bR0qZUqCTCFDhwu9XLGXo58HiFr/z46Vks3y0gHt+8cuvwKLBx61KJCzLFSb zBfuUGgEXgP2RCsZ+Za0/7gTcSKVkVFjCRmkSvFrtFaH4IoqCYSoHr2BocJkVQToxalg FDV5Qk2G/PIq6wnsQxFr7r+Cb6QhwBBQrX7HDV5lETs5yz15aTx3tlot7idDtScplNi0 9lSJ9J9yhu0kjxYaHhb9vGOB5/vH+QCVCUmctXZk4yhtLtYi+xyGJjlsLwadDSTj+zpi rjgg== MIME-Version: 1.0 Received: by 10.152.104.50 with SMTP id gb18mr23433631lab.9.1351348505893; Sat, 27 Oct 2012 07:35:05 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Sat, 27 Oct 2012 07:35:05 -0700 (PDT) In-Reply-To: <508A89EF.5070805@freebsd.org> References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <201210241414.30723.jhb@freebsd.org> <508965B3.2020705@freebsd.org> <5089A913.2040603@freebsd.org> <508A89EF.5070805@freebsd.org> Date: Sat, 27 Oct 2012 15:35:05 +0100 X-Google-Sender-Auth: 3HDSjAfCKHOsrN4UVWlQerQ8wH0 Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: Andre Oppermann Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, John Baldwin , svn-src-user@freebsd.org, Jeff Roberson , Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2012 14:35:08 -0000 On 10/26/12, Andre Oppermann wrote: > On 26.10.2012 08:27, Attilio Rao wrote: >> On Thu, Oct 25, 2012 at 10:03 PM, Andre Oppermann >> wrote: >>> On 25.10.2012 18:21, Attilio Rao wrote: >>>> Did you see my (and also Jeff) objection to your proposal about this? >>>> You are deliberating ignoring this? >>> >>> >>> Well, I'm allowed to have a different opinion, am I? I'm not ignoring >>> your objection in the sense as I'm not trying to commit any of this to >>> HEAD while it is disputed. >>> >>> Mind you this whole conversation was started because I was trying to >>> solve >>> a problem with unfortunate cache line sharing for global mutexes in the >>> kernel .bss section on my *personal* svn branch. >> >> Andre, >> I'm sorry if you felt I was being harsh or confrontative. This was >> really not my intention and I apologize. > > I apologize too for being a bit difficult and taking some time understand > the differences in __aligned() regarding padding behavior. > >> Said that, I fail in seeing a proper technical discussion on your side >> on how what I propose is "overdoing it" or how do you plan to address >> the concerns people are raising with your proposal of bumping all lock >> sizes indiscriminately. > > I'm wary of micro-optimizing and generally prefer clean and for a > reader obvious approaches. That said my assumption on the distribution > of mutex use cases in the kernel was wrong. By counting from a grep > it seems that about half of the mutexes could possibly benefit from > being padded and the other half doesn't because it is in structures > and next to its data. Besides that, you are likely misunderstanding something about what I propose: what I'm proposing is completely transparent to developers. You will just need to declare a mtx like: struct mtx_unshare Giant; and then you can use the mtx(9) interface on it without any issue. I don't see how this is less clean than what you propose. It just enables the alignment/padding on a selection basis rather than indiscriminately. >> However, here is the first half of the patch I'd like to see in: >> http:///www.freebsd.org/~attilio/mtx_decoupled.patch > > >> This is just the part to give the ability to crunch different >> structures to the mtx KPI. Please note that from the users perspective >> the mtx KPI remains absolutely the same, so there is theoretically no >> KPI discontinuity, the support is absolutely transparent. > > This seems rather complicated. Instead of mtxlock2mtx() wouldn't > __containerof() work just as well? The __DEVOLATILE() looks a bit > dangerous. Are you sure the compiler won't reorder things it should > not? What do you mean with "rather complicated"? For the users of the primitive nothing changes at all. For the people that might read the code it is pretty much self-explanatory, in particular if you know how lock classes work in our locking scheme. Maybe I can add a comment or two to clarify. About the __DEVOLATILE your statement makes absolutely no sense. We are not accessing the cookie, we are just modifying the value of the pointer to go lower and then point to the struct mtx. This has nothing to do with cache effects of the lock cookie. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Sat Oct 27 14:41:46 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F2BDA3E; Sat, 27 Oct 2012 14:41:46 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 379178FC14; Sat, 27 Oct 2012 14:41:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9REfkLM095682; Sat, 27 Oct 2012 14:41:46 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9REfklF095680; Sat, 27 Oct 2012 14:41:46 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210271441.q9REfklF095680@svn.freebsd.org> From: Andre Oppermann Date: Sat, 27 Oct 2012 14:41:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242178 - user/andre/tcp_workqueue/sys/netipsec X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2012 14:41:46 -0000 Author: andre Date: Sat Oct 27 14:41:45 2012 New Revision: 242178 URL: http://svn.freebsd.org/changeset/base/242178 Log: Extend the ipsec pfil input path with a direct in-path transform of inbound AH and ESP packets. Add description of how a pfil implemented ipsec is going to work. Modified: user/andre/tcp_workqueue/sys/netipsec/ipsec_pfil.c Modified: user/andre/tcp_workqueue/sys/netipsec/ipsec_pfil.c ============================================================================== --- user/andre/tcp_workqueue/sys/netipsec/ipsec_pfil.c Sat Oct 27 12:03:00 2012 (r242177) +++ user/andre/tcp_workqueue/sys/netipsec/ipsec_pfil.c Sat Oct 27 14:41:45 2012 (r242178) @@ -73,6 +73,39 @@ extern struct protosw inetsw[]; /* * Implement IPSec as pfil hook for host mode. + * + * Theory of operation. + * + * IPSec performs a couple of funtions that attach to different parts + * in the IP[46] network stack: + * 1. It enforces a packet encyption policy so that non-encrypted + * packets to certain destinations are not allow to pass through. + * This is firewall like, with deciding factor being the security + * policy and the state of the packet. + * 2. It provides encryption/authentication of packet between two + * hosts on their IP addresses. This is a transformation process + * that keeps the source/destination IP adresses intact and + * encrypts the payload. + * This is called transport mode and can be done directly and + * transparently in the IP input and output path. + * 3. It provides an encrypted tunnel between two hosts like a + * virtual interface and encapsulates complete packets in it. + * Here routing decisions on which packets to send into a particular + * tunnel have to be made. + * This should be represented as virtual interfaces in the kernel. + * + * Next steps: + * - Implement 1 in a pfil hook to block non-encrypted packets. + * - Implement 2 in a pfil hook to in-path transform transport mode packets. + * - Implement per tunnel virtual ipsec interfaces. + * - Implement capturing of AH/ESP protocol type in pfil hook. If it + * is transport mode, transform the packet and continue with next + * pfil hook. If it is tunnel mode decapsulated the packet and + * re-inject it into ip_input() as originating from that virtual + * tunnel interface. + * - Implement crypto process-to-completion in addition to callback. + * - Add better support for NIC based ipsec offloading. + * - Clean up the mtags. */ static int @@ -82,11 +115,43 @@ ipsec_pfil_run(void *arg, struct mbuf ** struct ip *ip = mtod(*m, struct ip *); struct m_tag *mtag; struct tdb_ident *tdbi; - struct secpolicy *sp; + struct secpolicy *sp = NULL; + struct in_ifaddr *ia; + int match = 0; + int checkif = 0; int error = 0; switch (dir) { case PFIL_IN: + if (ip->ip_p & (IPPROTO_AH | IPPROTO_ESP)) { + /* + * If the packet is for us do a transform. + * We're effectively filtering the traffic. + * + * If it was transport mode, re-inject into + * next pfil hook. + * + * If it was tunnel mode, re-inject into + * ip_input() with new source interface. + */ + IN_IFADDR_RLOCK(); + LIST_FOREACH(ia, INADDR_HASH(ip->ip_dst.s_addr), ia_hash) { + if (IA_SIN(ia)->sin_addr.s_addr == ip->ip_dst.s_addr && + (!checkif || ia->ia_ifp == ifp)) + match = 1; + } + IN_IFADDR_RUNLOCK(); + if (!match) + return (0); /* Not for us, pass on. */ + + error = ipsec4_common_input(*m, (ip->ip_hl << 2), + ip->ip_p); + if (error) + goto drop; + *m = NULL; /* mbuf was consumed. */ + return (0); + } + /* * The input path doesn't do a transform. */ @@ -225,7 +290,6 @@ ipsec_pfil_run(void *arg, struct mbuf ** if (error == ENOENT) error = 0; goto drop; - break; default: From owner-svn-src-user@FreeBSD.ORG Sat Oct 27 16:27:39 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C3BFC57; Sat, 27 Oct 2012 16:27:39 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id DB39C8FC08; Sat, 27 Oct 2012 16:27:37 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so3788374lag.13 for ; Sat, 27 Oct 2012 09:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=27oOg8jV+5kp1qD5N5c8T9sC2DUjdYwrtaoN8suylqQ=; b=Kbdjeh6zWvzQQPQ3mSpu0iVNCkyefcMD9USexwqDYtz6EtEJDi5X3K9uH7HUOFufWe XRSZm0+KlTBTTGUbhoYFpIS7UuWbLne0CL6NDbHUz/Noe9DFQnvIkesihqjXqYhx3RSl 3shL4GPzmrx+894wS8UEYFjOqTSiQh4C0YQh4BklnnaAtw3F4W8FmmEJZ3nWe/L7KC7a 4ghXpd9WDS69X44uaREWlTQ7M8Z7kzTHmE+IEVkymRStC+3ZRwpyWOQOpm3pXdGbuavI 8LHYhnlNNoDzqdwONmtVEouG68kpQcsSdhavjMVUpNnGo3nA9TzO1s1Egj20s5/rWVUT lImg== MIME-Version: 1.0 Received: by 10.152.105.103 with SMTP id gl7mr22873469lab.10.1351355256124; Sat, 27 Oct 2012 09:27:36 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Sat, 27 Oct 2012 09:27:36 -0700 (PDT) In-Reply-To: References: <201210221418.q9MEINkr026751@svn.freebsd.org> <201210241136.06154.jhb@freebsd.org> <201210241414.30723.jhb@freebsd.org> <508965B3.2020705@freebsd.org> <5089A913.2040603@freebsd.org> <508A89EF.5070805@freebsd.org> Date: Sat, 27 Oct 2012 17:27:36 +0100 X-Google-Sender-Auth: J6XaNZRkQPK1bp7sAnLJEDz1-LA Message-ID: Subject: Re: svn commit: r241889 - in user/andre/tcp_workqueue/sys: arm/arm cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/fs/zfs ddb dev/acpica dev/... From: Attilio Rao To: Andre Oppermann Content-Type: text/plain; charset=UTF-8 Cc: mdf@freebsd.org, src-committers@freebsd.org, John Baldwin , svn-src-user@freebsd.org, Jeff Roberson , Bruce Evans X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2012 16:27:39 -0000 On Sat, Oct 27, 2012 at 3:35 PM, Attilio Rao wrote: > On 10/26/12, Andre Oppermann wrote: >> On 26.10.2012 08:27, Attilio Rao wrote: >>> On Thu, Oct 25, 2012 at 10:03 PM, Andre Oppermann >>> wrote: >>>> On 25.10.2012 18:21, Attilio Rao wrote: >>>>> Did you see my (and also Jeff) objection to your proposal about this? >>>>> You are deliberating ignoring this? >>>> >>>> >>>> Well, I'm allowed to have a different opinion, am I? I'm not ignoring >>>> your objection in the sense as I'm not trying to commit any of this to >>>> HEAD while it is disputed. >>>> >>>> Mind you this whole conversation was started because I was trying to >>>> solve >>>> a problem with unfortunate cache line sharing for global mutexes in the >>>> kernel .bss section on my *personal* svn branch. >>> >>> Andre, >>> I'm sorry if you felt I was being harsh or confrontative. This was >>> really not my intention and I apologize. >> >> I apologize too for being a bit difficult and taking some time understand >> the differences in __aligned() regarding padding behavior. >> >>> Said that, I fail in seeing a proper technical discussion on your side >>> on how what I propose is "overdoing it" or how do you plan to address >>> the concerns people are raising with your proposal of bumping all lock >>> sizes indiscriminately. >> >> I'm wary of micro-optimizing and generally prefer clean and for a >> reader obvious approaches. That said my assumption on the distribution >> of mutex use cases in the kernel was wrong. By counting from a grep >> it seems that about half of the mutexes could possibly benefit from >> being padded and the other half doesn't because it is in structures >> and next to its data. > > Besides that, you are likely misunderstanding something about what I > propose: what I'm proposing is completely transparent to developers. > You will just need to declare a mtx like: > > struct mtx_unshare Giant; > > and then you can use the mtx(9) interface on it without any issue. I > don't see how this is less clean than what you propose. It just > enables the alignment/padding on a selection basis rather than > indiscriminately. > >>> However, here is the first half of the patch I'd like to see in: >>> http:///www.freebsd.org/~attilio/mtx_decoupled.patch >> > >>> This is just the part to give the ability to crunch different >>> structures to the mtx KPI. Please note that from the users perspective >>> the mtx KPI remains absolutely the same, so there is theoretically no >>> KPI discontinuity, the support is absolutely transparent. >> >> This seems rather complicated. Instead of mtxlock2mtx() wouldn't >> __containerof() work just as well? The __DEVOLATILE() looks a bit >> dangerous. Are you sure the compiler won't reorder things it should >> not? > > What do you mean with "rather complicated"? > For the users of the primitive nothing changes at all. > For the people that might read the code it is pretty much > self-explanatory, in particular if you know how lock classes work in > our locking scheme. Maybe I can add a comment or two to clarify. Here we go with further comments tweaks. Also, in order to make it a complete NOP from KPI perspective I had to change the way the mtx_assert() wrapper was implemented as in v1 it wasn't correctly handling the const qualifier. I think the result is better now and you should refer to this patch for reviews: http://www.freebsd.org/~attilio/mtx_decoupled2.patch Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-user@FreeBSD.ORG Sat Oct 27 16:44:41 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ECA6E238; Sat, 27 Oct 2012 16:44:41 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D4BCE8FC0C; Sat, 27 Oct 2012 16:44:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9RGifme015289; Sat, 27 Oct 2012 16:44:41 GMT (envelope-from crees@svn.freebsd.org) Received: (from crees@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RGifWQ015286; Sat, 27 Oct 2012 16:44:41 GMT (envelope-from crees@svn.freebsd.org) Message-Id: <201210271644.q9RGifWQ015286@svn.freebsd.org> From: Chris Rees Date: Sat, 27 Oct 2012 16:44:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242180 - user/crees/rclint X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2012 16:44:42 -0000 Author: crees (ports committer) Date: Sat Oct 27 16:44:41 2012 New Revision: 242180 URL: http://svn.freebsd.org/changeset/base/242180 Log: Fix python3 failure Noticed by: demon Modified: user/crees/rclint/rclint.py Modified: user/crees/rclint/rclint.py ============================================================================== --- user/crees/rclint/rclint.py Sat Oct 27 16:07:38 2012 (r242179) +++ user/crees/rclint/rclint.py Sat Oct 27 16:44:41 2012 (r242180) @@ -429,7 +429,7 @@ parser.add_argument('-p', action='store_ args = parser.parse_args() mode = 'base' if args.b else 'ports' -verbosity = args.v +verbosity = args.v if args.v != None else 0 logging.basicConfig(level=logging.DEBUG if verbosity > 1 else logging.WARN) error = Db('errors', args.language[0]) From owner-svn-src-user@FreeBSD.ORG Sat Oct 27 21:03:29 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDAE5931; Sat, 27 Oct 2012 21:03:29 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB9EC8FC16; Sat, 27 Oct 2012 21:03:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9RL3TeS058268; Sat, 27 Oct 2012 21:03:29 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RL3TbK058266; Sat, 27 Oct 2012 21:03:29 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210272103.q9RL3TbK058266@svn.freebsd.org> From: Andre Oppermann Date: Sat, 27 Oct 2012 21:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242190 - user/andre/tcp_workqueue/sys/netipsec X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2012 21:03:30 -0000 Author: andre Date: Sat Oct 27 21:03:29 2012 New Revision: 242190 URL: http://svn.freebsd.org/changeset/base/242190 Log: Add ASCII art to ipsec pfil description for better overview. Modified: user/andre/tcp_workqueue/sys/netipsec/ipsec_pfil.c Modified: user/andre/tcp_workqueue/sys/netipsec/ipsec_pfil.c ============================================================================== --- user/andre/tcp_workqueue/sys/netipsec/ipsec_pfil.c Sat Oct 27 20:17:59 2012 (r242189) +++ user/andre/tcp_workqueue/sys/netipsec/ipsec_pfil.c Sat Oct 27 21:03:29 2012 (r242190) @@ -94,6 +94,41 @@ extern struct protosw inetsw[]; * tunnel have to be made. * This should be represented as virtual interfaces in the kernel. * + * + * + +--------------------------------------+ip_enqueue() + * | | ^ + * v v | + * ip_input() | + * + | + * | | + * v | + * pfil_run_hooks()+---+ | + * | | + * v | + * ipsec_pfil_run()+------>AH|ESP? | + * + + + | + * | no | | yes | + * | policy?<----+ | | + * | + + | | + * | no | | yes | | + * |<-----+ | v | + * | | verify/decrypt | + * | | no + + | + * | X------+ | | + * | drop v | + * | next_hdr | + * | + + | + * | other | | ip + + * |<------------------+ +------>find_if() + * | + * v + * next_pfil_hook() + * v + + * | | + * |<------------+ + * | + * v + * * Next steps: * - Implement 1 in a pfil hook to block non-encrypted packets. * - Implement 2 in a pfil hook to in-path transform transport mode packets.