From owner-svn-src-user@FreeBSD.ORG Sun Feb 5 17:37:27 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F311106564A; Sun, 5 Feb 2012 17:37:27 +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 6D03A8FC0C; Sun, 5 Feb 2012 17:37: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 q15HbRmn093503; Sun, 5 Feb 2012 17:37:27 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q15HbR4a093494; Sun, 5 Feb 2012 17:37:27 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201202051737.q15HbR4a093494@svn.freebsd.org> From: Attilio Rao Date: Sun, 5 Feb 2012 17:37:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231027 - in user/attilio/vmcontention/sys: kern vm X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Feb 2012 17:37:27 -0000 Author: attilio Date: Sun Feb 5 17:37:26 2012 New Revision: 231027 URL: http://svn.freebsd.org/changeset/base/231027 Log: Remove the panic from vm_radix_insert() and propagate the error to the callers of vm_page_insert(). The default action for every caller is to unwind-back the operation besides vm_page_rename() where this has proven to be impossible to do. For that case, it just spins until the page is not available to be allocated. However, due to vm_page_rename() to be mostly rare (and having never hit this panic in the past) it is tought to be a very seldom thing and not a possible performance factor. The patch has been tested with an atomic counter returning NULL from the zone allocator every 1/100000 allocations. Per-printf, I've verified that a typical buildkernel could trigger this 30 times. The patch survived to 2 hours of repeated buildkernel/world. Several technical notes: - The vm_page_insert() is moved, in several callers, closer to failure points. This could be committed separately before vmcontention hits the tree just to verify -CURRENT is happy with it. - vm_page_rename() does not need to have the page lock in the callers as it hide that as an implementation detail. Do the locking internally. - now vm_page_insert() returns an int, with 0 meaning everything was ok, thus KPI is broken by this patch. Modified: user/attilio/vmcontention/sys/kern/subr_uio.c user/attilio/vmcontention/sys/vm/device_pager.c user/attilio/vmcontention/sys/vm/sg_pager.c user/attilio/vmcontention/sys/vm/vm_fault.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_radix.c Modified: user/attilio/vmcontention/sys/kern/subr_uio.c ============================================================================== --- user/attilio/vmcontention/sys/kern/subr_uio.c Sun Feb 5 16:54:26 2012 (r231026) +++ user/attilio/vmcontention/sys/kern/subr_uio.c Sun Feb 5 17:37:26 2012 (r231027) @@ -85,6 +85,7 @@ vm_pgmoveco(vm_map_t mapa, vm_offset_t k vm_map_entry_t entry; vm_pindex_t upindex; vm_prot_t prot; + vm_page_bits_t vbits; boolean_t wired; KASSERT((uaddr & PAGE_MASK) == 0, @@ -95,6 +96,7 @@ vm_pgmoveco(vm_map_t mapa, vm_offset_t k * unwired in sf_buf_mext(). */ kern_pg = PHYS_TO_VM_PAGE(vtophys(kaddr)); + vbits = kern_pg->valid; kern_pg->valid = VM_PAGE_BITS_ALL; KASSERT(kern_pg->queue == PQ_NONE && kern_pg->wire_count == 1, ("vm_pgmoveco: kern_pg is not correctly wired")); @@ -105,6 +107,13 @@ vm_pgmoveco(vm_map_t mapa, vm_offset_t k return(EFAULT); } VM_OBJECT_LOCK(uobject); + if (vm_page_insert(kern_pg, uobject, upindex) != 0) { + kern_pg->valid = vbits; + VM_OBJECT_UNLOCK(uobject); + vm_map_lookup_done(map, entry); + return(ENOMEM); + } + vm_page_dirty(kern_pg); retry: if ((user_pg = vm_page_lookup(uobject, upindex)) != NULL) { if (vm_page_sleep_if_busy(user_pg, TRUE, "vm_pgmoveco")) @@ -122,8 +131,6 @@ retry: if (uobject->backing_object != NULL) pmap_remove(map->pmap, uaddr, uaddr + PAGE_SIZE); } - vm_page_insert(kern_pg, uobject, upindex); - vm_page_dirty(kern_pg); VM_OBJECT_UNLOCK(uobject); vm_map_lookup_done(map, entry); return(KERN_SUCCESS); Modified: user/attilio/vmcontention/sys/vm/device_pager.c ============================================================================== --- user/attilio/vmcontention/sys/vm/device_pager.c Sun Feb 5 16:54:26 2012 (r231026) +++ user/attilio/vmcontention/sys/vm/device_pager.c Sun Feb 5 17:37:26 2012 (r231027) @@ -307,11 +307,14 @@ old_dev_pager_fault(vm_object_t object, */ page = vm_page_getfake(paddr, memattr); VM_OBJECT_LOCK(object); + if (vm_page_insert(page, object, offset) != 0) { + vm_page_putfake(page); + return (VM_PAGER_FAIL); + } vm_page_lock(*mres); vm_page_free(*mres); vm_page_unlock(*mres); *mres = page; - vm_page_insert(page, object, pidx); } page->valid = VM_PAGE_BITS_ALL; return (VM_PAGER_OK); Modified: user/attilio/vmcontention/sys/vm/sg_pager.c ============================================================================== --- user/attilio/vmcontention/sys/vm/sg_pager.c Sun Feb 5 16:54:26 2012 (r231026) +++ user/attilio/vmcontention/sys/vm/sg_pager.c Sun Feb 5 17:37:26 2012 (r231027) @@ -179,6 +179,10 @@ sg_pager_getpages(vm_object_t object, vm /* Construct a new fake page. */ page = vm_page_getfake(paddr, memattr); VM_OBJECT_LOCK(object); + if (vm_page_insert(page, object, offset) != 0) { + vm_page_putfake(page); + return (VM_PAGER_FAIL); + } TAILQ_INSERT_TAIL(&object->un_pager.sgp.sgp_pglist, page, pageq); /* Free the original pages and insert this fake page into the object. */ @@ -187,7 +191,6 @@ sg_pager_getpages(vm_object_t object, vm vm_page_free(m[i]); vm_page_unlock(m[i]); } - vm_page_insert(page, object, offset); m[reqpage] = page; page->valid = VM_PAGE_BITS_ALL; Modified: user/attilio/vmcontention/sys/vm/vm_fault.c ============================================================================== --- user/attilio/vmcontention/sys/vm/vm_fault.c Sun Feb 5 16:54:26 2012 (r231026) +++ user/attilio/vmcontention/sys/vm/vm_fault.c Sun Feb 5 17:37:26 2012 (r231027) @@ -769,9 +769,7 @@ vnode_locked: * process'es object. The page is * automatically made dirty. */ - vm_page_lock(fs.m); vm_page_rename(fs.m, fs.first_object, fs.first_pindex); - vm_page_unlock(fs.m); vm_page_busy(fs.m); fs.first_m = fs.m; fs.m = NULL; Modified: user/attilio/vmcontention/sys/vm/vm_object.c ============================================================================== --- user/attilio/vmcontention/sys/vm/vm_object.c Sun Feb 5 16:54:26 2012 (r231026) +++ user/attilio/vmcontention/sys/vm/vm_object.c Sun Feb 5 17:37:26 2012 (r231027) @@ -1397,9 +1397,7 @@ retry: vm_reserv_rename(m, new_object, orig_object, offidxstart); #endif - vm_page_lock(m); vm_page_rename(m, new_object, idx); - vm_page_unlock(m); /* * page automatically made dirty by rename and * cache handled @@ -1654,9 +1652,7 @@ restart: * If the page was mapped to a process, it can remain * mapped through the rename. */ - vm_page_lock(p); vm_page_rename(p, object, new_pindex); - vm_page_unlock(p); /* page automatically made dirty by rename */ } } Modified: user/attilio/vmcontention/sys/vm/vm_page.c ============================================================================== --- user/attilio/vmcontention/sys/vm/vm_page.c Sun Feb 5 16:54:26 2012 (r231026) +++ user/attilio/vmcontention/sys/vm/vm_page.c Sun Feb 5 17:37:26 2012 (r231027) @@ -109,6 +109,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include /* @@ -777,13 +778,15 @@ vm_page_dirty(vm_page_t m) * The object and page must be locked. * This routine may not block. */ -void +int vm_page_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex) { vm_page_t neighbor; + vm_pindex_t cpindex; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); if (m->object != NULL) panic("vm_page_insert: page already inserted"); + cpindex = m->pindex; /* * Record the object/offset pair in this page @@ -804,8 +807,13 @@ vm_page_insert(vm_page_t m, vm_object_t } else TAILQ_INSERT_TAIL(&object->memq, m, listq); } - if (vm_radix_insert(&object->rtree, pindex, m) != 0) - panic("vm_page_insert: unable to insert the new page"); + + if (vm_radix_insert(&object->rtree, pindex, m) != 0) { + TAILQ_REMOVE(&object->memq, m, listq); + m->object = NULL; + m->pindex = cpindex; + return (ENOMEM); + } /* * show that the object has one more resident page. @@ -823,6 +831,7 @@ vm_page_insert(vm_page_t m, vm_object_t */ if (m->aflags & PGA_WRITEABLE) vm_object_set_writeable_dirty(object); + return (0); } /* @@ -967,9 +976,20 @@ vm_page_prev(vm_page_t m) void vm_page_rename(vm_page_t m, vm_object_t new_object, vm_pindex_t new_pindex) { + u_int i; + + MPASS(m->object != NULL); + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); + VM_OBJECT_LOCK_ASSERT(new_object, MA_OWNED); + vm_page_lock(m); vm_page_remove(m); - vm_page_insert(m, new_object, new_pindex); + vm_page_unlock(m); + while (vm_page_insert(m, new_object, new_pindex) != 0) { + pagedaemon_wakeup(); + for (i = 0; i < 10000000; i++) + cpu_spinwait(); + } vm_page_dirty(m); } @@ -1250,7 +1270,19 @@ vm_page_alloc(vm_object_t object, vm_pin if (object->memattr != VM_MEMATTR_DEFAULT && object->type != OBJT_DEVICE && object->type != OBJT_SG) pmap_page_set_memattr(m, object->memattr); - vm_page_insert(m, object, pindex); + if (vm_page_insert(m, object, pindex) != 0) { + + /* See the comment below about hold count handling. */ + if (vp != NULL) + vdrop(vp); + vm_page_lock(m); + if (req & VM_ALLOC_WIRED) + vm_page_unwire(m, 0); + vm_page_free(m); + vm_page_unlock(m); + pagedaemon_wakeup(); + return (NULL); + } } else m->pindex = pindex; @@ -1317,6 +1349,7 @@ vm_page_alloc_contig(vm_object_t object, { struct vnode *drop; vm_page_t deferred_vdrop_list, m, m_ret; + vm_pindex_t cpindex; u_int flags, oflags; int req_class; @@ -1403,6 +1436,7 @@ retry: memattr == VM_MEMATTR_DEFAULT) memattr = object->memattr; } + cpindex = pindex; for (m = m_ret; m < &m_ret[npages]; m++) { m->aflags = 0; m->flags &= flags; @@ -1412,12 +1446,30 @@ retry: m->oflags = oflags; if (memattr != VM_MEMATTR_DEFAULT) pmap_page_set_memattr(m, memattr); - if (object != NULL) - vm_page_insert(m, object, pindex); - else - m->pindex = pindex; pindex++; } + for (m = m_ret; m < &m_ret[npages]; m++) { + if (object != NULL) { + if (vm_page_insert(m, object, cpindex) != 0) { + while (deferred_vdrop_list != NULL) { + vdrop((struct vnode *)deferred_vdrop_list->pageq.tqe_prev); + deferred_vdrop_list = + deferred_vdrop_list->pageq.tqe_next; + } + for (m = m_ret; m < &m_ret[npages]; m++) { + vm_page_lock(m); + if (req & VM_ALLOC_WIRED) + vm_page_unwire(m, 0); + vm_page_free(m); + vm_page_unlock(m); + } + pagedaemon_wakeup(); + return (NULL); + } + } else + m->pindex = cpindex; + cpindex++; + } while (deferred_vdrop_list != NULL) { vdrop((struct vnode *)deferred_vdrop_list->pageq.tqe_prev); deferred_vdrop_list = deferred_vdrop_list->pageq.tqe_next; @@ -2642,11 +2694,8 @@ vm_page_cowfault(vm_page_t m) pindex = m->pindex; retry_alloc: - pmap_remove_all(m); - vm_page_remove(m); mnew = vm_page_alloc(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY); if (mnew == NULL) { - vm_page_insert(m, object, pindex); vm_page_unlock(m); VM_OBJECT_UNLOCK(object); VM_WAIT; @@ -2672,8 +2721,9 @@ vm_page_cowfault(vm_page_t m) vm_page_lock(mnew); vm_page_free(mnew); vm_page_unlock(mnew); - vm_page_insert(m, object, pindex); } else { /* clear COW & copy page */ + pmap_remove_all(m); + vm_page_remove(m); if (!so_zerocp_fullpage) pmap_copy_page(m, mnew); mnew->valid = VM_PAGE_BITS_ALL; Modified: user/attilio/vmcontention/sys/vm/vm_page.h ============================================================================== --- user/attilio/vmcontention/sys/vm/vm_page.h Sun Feb 5 16:54:26 2012 (r231026) +++ user/attilio/vmcontention/sys/vm/vm_page.h Sun Feb 5 17:37:26 2012 (r231027) @@ -386,7 +386,7 @@ void vm_page_dontneed(vm_page_t); void vm_page_deactivate (vm_page_t); vm_page_t vm_page_find_least(vm_object_t, vm_pindex_t); vm_page_t vm_page_getfake(vm_paddr_t paddr, vm_memattr_t memattr); -void vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); +int vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); vm_page_t vm_page_lookup (vm_object_t, vm_pindex_t); vm_page_t vm_page_next(vm_page_t m); int vm_page_pa_tryrelock(pmap_t, vm_paddr_t, vm_paddr_t *); Modified: user/attilio/vmcontention/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmcontention/sys/vm/vm_radix.c Sun Feb 5 16:54:26 2012 (r231026) +++ user/attilio/vmcontention/sys/vm/vm_radix.c Sun Feb 5 17:37:26 2012 (r231027) @@ -55,6 +55,7 @@ #include CTASSERT(sizeof(struct vm_radix_node) < PAGE_SIZE); +CTASSERT((sizeof(u_int) * NBBY) >= VM_RADIX_LIMIT); static uma_zone_t vm_radix_node_zone; @@ -211,6 +212,24 @@ vm_radix_setroot(struct vm_radix *rtree, rtree->rt_root = root; } +static inline void +vm_radix_unwind_heightup(struct vm_radix *rtree, struct vm_radix_node *root, + struct vm_radix_node *iroot, int ilevel) +{ + struct vm_radix_node *rnode; + + CTR4(KTR_VM, "unwind: tree %p, root %p, iroot %p, ilevel %d", + rtree, root, iroot, ilevel); + while (iroot != root && root != NULL) { + rnode = root; + MPASS(rnode->rn_count == 0 || rnode->rn_count == 1); + rnode->rn_count = 0; + root = rnode->rn_child[0]; + vm_radix_node_put(rnode); + } + vm_radix_setroot(rtree, iroot, ilevel); +} + static inline void * vm_radix_match(void *child, int color) { @@ -262,10 +281,9 @@ vm_radix_reclaim_allnodes_internal(struc int vm_radix_insert(struct vm_radix *rtree, vm_pindex_t index, void *val) { - struct vm_radix_node *rnode; - struct vm_radix_node *root; - int level; - int slot; + struct vm_radix_node *iroot, *rnode, *root; + u_int allocmsk; + int clev, ilevel, level, slot; CTR3(KTR_VM, "insert: tree %p, index %ju, val %p", rtree, (uintmax_t)index, val); @@ -276,6 +294,8 @@ vm_radix_insert(struct vm_radix *rtree, * Increase the height by adding nodes at the root until * there is sufficient space. */ + ilevel = level; + iroot = root; while (level == 0 || index > VM_RADIX_MAX(level)) { CTR3(KTR_VM, "insert: expanding %ju > %ju height %d", (uintmax_t)index, (uintmax_t)VM_RADIX_MAX(level), level); @@ -292,6 +312,8 @@ vm_radix_insert(struct vm_radix *rtree, CTR4(KTR_VM, "insert: tree %p, root %p, index: %ju, level: %d ENOMEM", rtree, root, (uintmax_t)index, level); + vm_radix_unwind_heightup(rtree, root, iroot, + ilevel); return (ENOMEM); } /* @@ -309,6 +331,8 @@ vm_radix_insert(struct vm_radix *rtree, } /* Now that the tree is tall enough, fill in the path to the index. */ + allocmsk = 0; + clev = level; rnode = root; for (level = level - 1; level > 0; level--) { slot = vm_radix_slot(index, level); @@ -324,9 +348,35 @@ vm_radix_insert(struct vm_radix *rtree, "insert: tree %p, rnode %p, child %p, count %u ENOMEM", rtree, rnode, rnode->rn_child[slot], rnode->rn_count); + MPASS(level != clev || allocmsk == 0); + while (allocmsk != 0) { + rnode = root; + level = clev; + level--; + CTR4(KTR_VM, + "insert: unwind root %p, level %d, slot %d, allocmsk: 0x%x", + root, level, slot, allocmsk); + slot = vm_radix_slot(index, level); + MPASS(level >= (ffs(allocmsk) - 1)); + while (level > (ffs(allocmsk) - 1)) { + MPASS(level > 0); + slot = vm_radix_slot(index, + level); + rnode = rnode->rn_child[slot]; + level--; + } + MPASS((allocmsk & (1 << level)) != 0); + allocmsk &= ~(1 << level); + rnode->rn_count--; + vm_radix_node_put(rnode->rn_child[slot]); + rnode->rn_child[slot] = NULL; + } + vm_radix_unwind_heightup(rtree, root, iroot, + ilevel); return (ENOMEM); } rnode->rn_count++; + allocmsk |= (1 << level); } CTR5(KTR_VM, "insert: tree %p, index %ju, level %d, slot %d, rnode %p", From owner-svn-src-user@FreeBSD.ORG Sun Feb 5 18:55:20 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A07F810656D0; Sun, 5 Feb 2012 18:55:20 +0000 (UTC) (envelope-from flo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B4FD8FC15; Sun, 5 Feb 2012 18:55:20 +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 q15ItKqX096117; Sun, 5 Feb 2012 18:55:20 GMT (envelope-from flo@svn.freebsd.org) Received: (from flo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q15ItKYR096115; Sun, 5 Feb 2012 18:55:20 GMT (envelope-from flo@svn.freebsd.org) Message-Id: <201202051855.q15ItKYR096115@svn.freebsd.org> From: Florian Smeets Date: Sun, 5 Feb 2012 18:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231031 - user/attilio/vmcontention/sys/vm X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Feb 2012 18:55:20 -0000 Author: flo (ports committer) Date: Sun Feb 5 18:55:20 2012 New Revision: 231031 URL: http://svn.freebsd.org/changeset/base/231031 Log: fix KTR consistency I'm committing this on behalf of Attilio as he cannot access svn right now. Modified: user/attilio/vmcontention/sys/vm/vm_radix.c Modified: user/attilio/vmcontention/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmcontention/sys/vm/vm_radix.c Sun Feb 5 18:39:11 2012 (r231030) +++ user/attilio/vmcontention/sys/vm/vm_radix.c Sun Feb 5 18:55:20 2012 (r231031) @@ -353,10 +353,10 @@ vm_radix_insert(struct vm_radix *rtree, rnode = root; level = clev; level--; + slot = vm_radix_slot(index, level); CTR4(KTR_VM, "insert: unwind root %p, level %d, slot %d, allocmsk: 0x%x", root, level, slot, allocmsk); - slot = vm_radix_slot(index, level); MPASS(level >= (ffs(allocmsk) - 1)); while (level > (ffs(allocmsk) - 1)) { MPASS(level > 0); From owner-svn-src-user@FreeBSD.ORG Sun Feb 5 23:02:42 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CF94106566B; Sun, 5 Feb 2012 23:02:42 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 175728FC21; Sun, 5 Feb 2012 23:02:42 +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 q15N2g1L005430; Sun, 5 Feb 2012 23:02:42 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q15N2fp3005428; Sun, 5 Feb 2012 23:02:41 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201202052302.q15N2fp3005428@svn.freebsd.org> From: Sean Bruno Date: Sun, 5 Feb 2012 23:02:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231056 - user/sbruno/1394dev/firewire X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Feb 2012 23:02:42 -0000 Author: sbruno Date: Sun Feb 5 23:02:41 2012 New Revision: 231056 URL: http://svn.freebsd.org/changeset/base/231056 Log: Catch up to head Modified: user/sbruno/1394dev/firewire/sbp_targ.c Directory Properties: user/sbruno/1394dev/firewire/ (props changed) user/sbruno/1394dev/fwcontrol/ (props changed) user/sbruno/1394dev/mod_build/ (props changed) Modified: user/sbruno/1394dev/firewire/sbp_targ.c ============================================================================== --- user/sbruno/1394dev/firewire/sbp_targ.c Sun Feb 5 23:02:13 2012 (r231055) +++ user/sbruno/1394dev/firewire/sbp_targ.c Sun Feb 5 23:02:41 2012 (r231056) @@ -62,6 +62,7 @@ #include #include #include +#include #define SBP_TARG_RECV_LEN 8 #define MAX_INITIATORS 8 @@ -186,6 +187,21 @@ struct morb4 { #endif }; + +/* + * Urestricted page table format + * states that the segment length + * and high base addr are in the first + * 32 bits and the base low is in + * the second + */ +struct unrestricted_page_table_fmt { + uint16_t segment_len; + uint16_t segment_base_high; + uint32_t segment_base_low; +}; + + struct orb_info { struct sbp_targ_softc *sc; struct fw_device *fwdev; @@ -208,7 +224,10 @@ struct orb_info { struct corb4 orb4; STAILQ_ENTRY(orb_info) link; uint32_t orb[8]; - uint32_t *page_table; + struct unrestricted_page_table_fmt *page_table; + struct unrestricted_page_table_fmt *cur_pte; + struct unrestricted_page_table_fmt *last_pte; + uint32_t last_block_read; struct sbp_status status; }; @@ -219,6 +238,7 @@ static char *orb_fun_name[] = { static void sbp_targ_recv(struct fw_xfer *); static void sbp_targ_fetch_orb(struct sbp_targ_softc *, struct fw_device *, uint16_t, uint32_t, struct sbp_targ_login *, int); +static void sbp_targ_xfer_pt(struct orb_info *); static void sbp_targ_abort(struct sbp_targ_softc *, struct orb_info *); static void @@ -252,13 +272,19 @@ sbp_targ_dealloc_login(struct sbp_targ_l } for (orbi = STAILQ_FIRST(&login->orbs); orbi != NULL; orbi = next) { next = STAILQ_NEXT(orbi, link); + if (debug) + printf("%s: free orbi %p\n", __func__, orbi); free(orbi, M_SBP_TARG); + orbi = NULL; } callout_stop(&login->hold_callout); STAILQ_REMOVE(&login->lstate->logins, login, sbp_targ_login, link); login->lstate->sc->logins[login->id] = NULL; + if (debug) + printf("%s: free login %p\n", __func__, login); free((void *)login, M_SBP_TARG); + login = NULL; } static void @@ -361,20 +387,26 @@ sbp_targ_find_devs(struct sbp_targ_softc if (ccb->ccb_h.target_id == CAM_TARGET_WILDCARD && ccb->ccb_h.target_lun == CAM_LUN_WILDCARD) { *lstate = sc->black_hole; + if (debug) + printf("setting black hole for this target id(%d)\n", ccb->ccb_h.target_id); return (CAM_REQ_CMP); } - if (ccb->ccb_h.target_id != 0) - return (CAM_TID_INVALID); - lun = ccb->ccb_h.target_lun; if (lun >= MAX_LUN) return (CAM_LUN_INVALID); *lstate = sc->lstate[lun]; - if (notfound_failure != 0 && *lstate == NULL) + if (notfound_failure != 0 && *lstate == NULL) { + if (debug) + printf("%s: lstate for lun is invalid, target(%d), lun(%d)\n", + __func__, ccb->ccb_h.target_id, lun); return (CAM_PATH_INVALID); + } else + if (debug) + printf("%s: setting lstate for tgt(%d) lun(%d)\n", + __func__,ccb->ccb_h.target_id, lun); return (CAM_REQ_CMP); } @@ -411,11 +443,18 @@ sbp_targ_en_lun(struct sbp_targ_softc *s printf("Couldn't allocate lstate\n"); ccb->ccb_h.status = CAM_RESRC_UNAVAIL; return; - } - if (ccb->ccb_h.target_id == CAM_TARGET_WILDCARD) + } else { + if (debug) + printf("%s: malloc'd lstate %p\n",__func__, lstate); + } + if (ccb->ccb_h.target_id == CAM_TARGET_WILDCARD) { sc->black_hole = lstate; - else + if (debug) + printf("Blackhole set due to target id == %d\n", + ccb->ccb_h.target_id); + } else sc->lstate[ccb->ccb_h.target_lun] = lstate; + memset(lstate, 0, sizeof(*lstate)); lstate->sc = sc; status = xpt_create_path(&lstate->path, /*periph*/NULL, @@ -424,6 +463,7 @@ sbp_targ_en_lun(struct sbp_targ_softc *s xpt_path_lun_id(ccb->ccb_h.path)); if (status != CAM_REQ_CMP) { free(lstate, M_SBP_TARG); + lstate = NULL; xpt_print_path(ccb->ccb_h.path); printf("Couldn't allocate path\n"); ccb->ccb_h.status = CAM_RESRC_UNAVAIL; @@ -443,6 +483,7 @@ sbp_targ_en_lun(struct sbp_targ_softc *s if (lstate == NULL) { ccb->ccb_h.status = CAM_LUN_INVALID; + printf("Invalid lstate for this target\n"); return; } ccb->ccb_h.status = CAM_REQ_CMP; @@ -458,6 +499,7 @@ sbp_targ_en_lun(struct sbp_targ_softc *s } if (ccb->ccb_h.status != CAM_REQ_CMP) { + printf("status != CAM_REQ_CMP\n"); return; } @@ -475,7 +517,10 @@ sbp_targ_en_lun(struct sbp_targ_softc *s sc->black_hole = NULL; else sc->lstate[ccb->ccb_h.target_lun] = NULL; + if (debug) + printf("%s: free lstate %p\n", __func__, lstate); free(lstate, M_SBP_TARG); + lstate = NULL; /* bus reset */ sc->fd.fc->ibr(sc->fd.fc); @@ -538,7 +583,7 @@ sbp_targ_get_orb_info(struct sbp_targ_ls if (orbi->orb_lo == tag_id) goto found; printf("%s: orb not found tag_id=0x%08x init_id=%d\n", - __func__, tag_id, init_id); + __func__, tag_id, init_id); return (NULL); found: return (orbi); @@ -559,12 +604,13 @@ sbp_targ_abort(struct sbp_targ_softc *sc xpt_done(orbi->ccb); orbi->ccb = NULL; } -#if 0 if (orbi->state <= ORBI_STATUS_ATIO) { sbp_targ_remove_orb_info_locked(orbi->login, orbi); + if (debug) + printf("%s: free orbi %p\n", __func__, orbi); free(orbi, M_SBP_TARG); + orbi = NULL; } else -#endif orbi->state = ORBI_STATUS_ABORTED; } } @@ -576,12 +622,21 @@ sbp_targ_free_orbi(struct fw_xfer *xfer) { struct orb_info *orbi; - orbi = (struct orb_info *)xfer->sc; if (xfer->resp != 0) { /* XXX */ printf("%s: xfer->resp = %d\n", __func__, xfer->resp); } + orbi = (struct orb_info *)xfer->sc; + if ( orbi->page_table != NULL ) { + if (debug) + printf("%s: free orbi->page_table %p\n", __func__, orbi->page_table); + free(orbi->page_table, M_SBP_TARG); + orbi->page_table = NULL; + } + if (debug) + printf("%s: free orbi %p\n", __func__, orbi); free(orbi, M_SBP_TARG); + orbi = NULL; fw_xfer_free(xfer); } @@ -595,7 +650,7 @@ sbp_targ_status_FIFO(struct orb_info *or sbp_targ_remove_orb_info(orbi->login, orbi); xfer = fwmem_write_block(orbi->fwdev, (void *)orbi, - /*spd*/2, fifo_hi, fifo_lo, + /*spd*/FWSPD_S400, fifo_hi, fifo_lo, sizeof(uint32_t) * (orbi->status.len + 1), (char *)&orbi->status, sbp_targ_free_orbi); @@ -605,6 +660,10 @@ sbp_targ_status_FIFO(struct orb_info *or } } +/* + * Generate the appropriate CAM status for the + * target. + */ static void sbp_targ_send_status(struct orb_info *orbi, union ccb *ccb) { @@ -621,6 +680,8 @@ sbp_targ_send_status(struct orb_info *or sbp_status->status = 0; /* XXX */ sbp_status->dead = 0; /* XXX */ + ccb->ccb_h.status= CAM_REQ_CMP; + switch (ccb->csio.scsi_status) { case SCSI_STATUS_OK: if (debug) @@ -628,8 +689,15 @@ sbp_targ_send_status(struct orb_info *or sbp_status->len = 1; break; case SCSI_STATUS_CHECK_COND: + if (debug) + printf("%s: STATUS SCSI_STATUS_CHECK_COND\n", __func__); + goto process_scsi_status; case SCSI_STATUS_BUSY: + if (debug) + printf("%s: STATUS SCSI_STATUS_BUSY\n", __func__); + goto process_scsi_status; case SCSI_STATUS_CMD_TERMINATED: +process_scsi_status: { struct sbp_cmd_status *sbp_cmd_status; struct scsi_sense_data *sense; @@ -640,9 +708,6 @@ sbp_targ_send_status(struct orb_info *or int64_t sinfo; int sense_len; - if (debug) - printf("%s: STATUS %d\n", __func__, - ccb->csio.scsi_status); sbp_cmd_status = (struct sbp_cmd_status *)&sbp_status->data[0]; sbp_cmd_status->status = ccb->csio.scsi_status; sense = &ccb->csio.sense_data; @@ -734,6 +799,7 @@ sbp_targ_send_status(struct orb_info *or if (scsi_get_sks(sense, sense_len, sks) == 0) { bcopy(sks, &sbp_cmd_status->s_keydep[0], sizeof(sks)); sbp_status->len = 5; + ccb->ccb_h.status |= CAM_SENT_SENSE; } break; @@ -743,13 +809,20 @@ sbp_targ_send_status(struct orb_info *or sbp_status->status); } - if (orbi->page_table != NULL) - free(orbi->page_table, M_SBP_TARG); sbp_targ_status_FIFO(orbi, orbi->login->fifo_hi, orbi->login->fifo_lo, /*dequeue*/1); } +/* + * Invoked as a callback handler from fwmem_read/write_block + * + * Process read/write of initiator address space + * completion and pass status onto the backend target. + * If this is a partial read/write for a CCB then + * we decrement the orbi's refcount to indicate + * the status of the read/write is complete + */ static void sbp_targ_cam_done(struct fw_xfer *xfer) { @@ -758,7 +831,7 @@ sbp_targ_cam_done(struct fw_xfer *xfer) orbi = (struct orb_info *)xfer->sc; - if (debug > 1) + if (debug) printf("%s: resp=%d refcount=%d\n", __func__, xfer->resp, orbi->refcount); @@ -779,13 +852,26 @@ sbp_targ_cam_done(struct fw_xfer *xfer) if (debug) printf("%s: orbi aborted\n", __func__); sbp_targ_remove_orb_info(orbi->login, orbi); - if (orbi->page_table != NULL) + if (orbi->page_table != NULL) { + if (debug) + printf("%s: free orbi->page_table %p\n", + __func__, orbi->page_table); free(orbi->page_table, M_SBP_TARG); + } + if (debug) + printf("%s: free orbi %p\n", __func__, orbi); free(orbi, M_SBP_TARG); - } else if (orbi->status.resp == 0) { - if ((ccb->ccb_h.flags & CAM_SEND_STATUS) != 0) + orbi = NULL; + } else if (orbi->status.resp == ORBI_STATUS_NONE) { + if ((ccb->ccb_h.flags & CAM_SEND_STATUS) != 0) { + if (debug) + printf("%s: CAM_SEND_STATUS set %0x\n", __func__, ccb->ccb_h.flags); sbp_targ_send_status(orbi, ccb); - ccb->ccb_h.status = CAM_REQ_CMP; + } else { + if (debug) + printf("%s: CAM_SEND_STATUS not set %0x\n", __func__, ccb->ccb_h.flags); + ccb->ccb_h.status = CAM_REQ_CMP; + } SBP_LOCK(orbi->sc); xpt_done(ccb); SBP_UNLOCK(orbi->sc); @@ -855,6 +941,13 @@ sbp_targ_abort_ccb(struct sbp_targ_softc return (CAM_PATH_INVALID); } +/* + * directly execute a read or write to the initiator + * address space and set hand(sbp_targ_cam_done) to + * process the completion from the SIM to the target. + * set orbi->refcount to inidicate that a read/write + * is inflight to/from the initiator. + */ static void sbp_targ_xfer_buf(struct orb_info *orbi, u_int offset, uint16_t dst_hi, uint32_t dst_lo, u_int size, @@ -874,16 +967,21 @@ sbp_targ_xfer_buf(struct orb_info *orbi, len = MIN(size, 2048 /* XXX */); size -= len; orbi->refcount ++; - if (ccb_dir == CAM_DIR_OUT) + if (ccb_dir == CAM_DIR_OUT) { + if (debug) + printf("%s: CAM_DIR_OUT --> read block in?\n",__func__); xfer = fwmem_read_block(orbi->fwdev, - (void *)orbi, /*spd*/2, + (void *)orbi, /*spd*/FWSPD_S400, dst_hi, dst_lo + off, len, ptr + off, hand); - else + } else { + if (debug) + printf("%s: CAM_DIR_IN --> write block out?\n",__func__); xfer = fwmem_write_block(orbi->fwdev, - (void *)orbi, /*spd*/2, + (void *)orbi, /*spd*/FWSPD_S400, dst_hi, dst_lo + off, len, ptr + off, hand); + } if (xfer == NULL) { printf("%s: xfer == NULL", __func__); /* XXX what should we do?? */ @@ -897,18 +995,22 @@ static void sbp_targ_pt_done(struct fw_xfer *xfer) { struct orb_info *orbi; - union ccb *ccb; - u_int i, offset, res, len; - uint32_t t1, t2, *p; + struct unrestricted_page_table_fmt *pt; + uint32_t i; orbi = (struct orb_info *)xfer->sc; - ccb = orbi->ccb; + if (orbi->state == ORBI_STATUS_ABORTED) { if (debug) printf("%s: orbi aborted\n", __func__); sbp_targ_remove_orb_info(orbi->login, orbi); + if (debug) { + printf("%s: free orbi->page_table %p\n", __func__, orbi->page_table); + printf("%s: free orbi %p\n", __func__, orbi); + } free(orbi->page_table, M_SBP_TARG); free(orbi, M_SBP_TARG); + orbi = NULL; fw_xfer_free(xfer); return; } @@ -920,60 +1022,158 @@ sbp_targ_pt_done(struct fw_xfer *xfer) orbi->status.len = 1; sbp_targ_abort(orbi->sc, STAILQ_NEXT(orbi, link)); + if (debug) + printf("%s: free orbi->page_table %p\n", __func__, orbi->page_table); + sbp_targ_status_FIFO(orbi, orbi->login->fifo_hi, orbi->login->fifo_lo, /*dequeue*/1); free(orbi->page_table, M_SBP_TARG); + orbi->page_table = NULL; fw_xfer_free(xfer); return; } - res = ccb->csio.dxfer_len; - offset = 0; - if (debug) - printf("%s: dxfer_len=%d\n", __func__, res); - orbi->refcount ++; - for (p = orbi->page_table, i = orbi->orb4.data_size; i > 0; i --) { - t1 = ntohl(*p++); - t2 = ntohl(*p++); - if (debug > 1) - printf("page_table: %04x:%08x %d\n", - t1 & 0xffff, t2, t1>>16); - len = MIN(t1 >> 16, res); - res -= len; - sbp_targ_xfer_buf(orbi, offset, t1 & 0xffff, t2, len, - sbp_targ_cam_done); - offset += len; - if (res == 0) - break; + orbi->refcount++; +/* + * Set endianess here so we don't have + * to deal with is later + */ + for (i = 0, pt = orbi->page_table; i < orbi->orb4.data_size; i++, pt++) { + pt->segment_len = ntohs(pt->segment_len); + if (debug) + printf("%s:segment_len = %u\n", __func__,pt->segment_len); + pt->segment_base_high = ntohs(pt->segment_base_high); + pt->segment_base_low = ntohl(pt->segment_base_low); } - orbi->refcount --; + + sbp_targ_xfer_pt(orbi); + + orbi->refcount--; if (orbi->refcount == 0) printf("%s: refcount == 0\n", __func__); - if (res !=0) - /* XXX handle res != 0 case */ - printf("%s: page table is too small(%d)\n", __func__, res); fw_xfer_free(xfer); return; } +static void sbp_targ_xfer_pt(struct orb_info *orbi) +{ + union ccb *ccb; + uint32_t res, offset, len; + + ccb = orbi->ccb; + if (debug) + printf("%s: dxfer_len=%d\n", __func__, ccb->csio.dxfer_len); + res = ccb->csio.dxfer_len; + /* + * If the page table required multiple CTIO's to + * complete, then cur_pte is non NULL + * and we need to start from the last position + * If this is the first pass over a page table + * then we just start at the beginning of the page + * table. + * + * Parse the unrestricted page table and figure out where we need + * to shove the data from this read request. + */ + for (offset = 0, len = 0; (res != 0) && (orbi->cur_pte < orbi->last_pte); offset += len) { + len = MIN(orbi->cur_pte->segment_len, res); + res -= len; + if (debug) + printf("%s:page_table: %04x:%08x segment_len(%u) res(%u) len(%u)\n", + __func__, orbi->cur_pte->segment_base_high, + orbi->cur_pte->segment_base_low, + orbi->cur_pte->segment_len, + res, len); + sbp_targ_xfer_buf(orbi, offset, + orbi->cur_pte->segment_base_high, + orbi->cur_pte->segment_base_low, + len, sbp_targ_cam_done); + /* + * If we have only written partially to + * this page table, then we need to save + * our position for the next CTIO. If we + * have completed the page table, then we + * are safe to move on to the next entry. + */ + if (len == orbi->cur_pte->segment_len) { + orbi->cur_pte++; + } else { + uint32_t saved_base_low; + + /* Handle transfers that cross a 4GB boundary. */ + saved_base_low = orbi->cur_pte->segment_base_low; + orbi->cur_pte->segment_base_low += len; + if (orbi->cur_pte->segment_base_low < saved_base_low) + orbi->cur_pte->segment_base_high++; + + orbi->cur_pte->segment_len -= len; + } + } + if (debug) { + printf("%s: base_low(%08x) page_table_off(%p) last_block(%u)\n", + __func__, orbi->cur_pte->segment_base_low, + orbi->cur_pte, orbi->last_block_read); + } + if (res != 0) + printf("Warning - short pt encountered. " + "Could not transfer all data.\n"); + return; +} + +/* + * Create page table in local memory + * and transfer it from the initiator + * in order to know where we are supposed + * to put the data. + */ + static void sbp_targ_fetch_pt(struct orb_info *orbi) { struct fw_xfer *xfer; - if (debug) - printf("%s: page_table_size=%d\n", - __func__, orbi->orb4.data_size); - orbi->page_table = malloc(orbi->orb4.data_size*8, M_SBP_TARG, M_NOWAIT); - if (orbi->page_table == NULL) - goto error; - xfer = fwmem_read_block(orbi->fwdev, (void *)orbi, /*spd*/2, - orbi->data_hi, orbi->data_lo, orbi->orb4.data_size*8, - (void *)orbi->page_table, sbp_targ_pt_done); - if (xfer != NULL) + /* + * Pull in page table from initiator + * and setup for data from our + * backend device. + */ + if (orbi->page_table == NULL) { + orbi->page_table = malloc(orbi->orb4.data_size* + sizeof(struct unrestricted_page_table_fmt), + M_SBP_TARG, M_NOWAIT|M_ZERO); + if (orbi->page_table == NULL) + goto error; + orbi->cur_pte = orbi->page_table; + orbi->last_pte = orbi->page_table + orbi->orb4.data_size; + orbi->last_block_read = orbi->orb4.data_size; + if (debug && orbi->page_table != NULL) + printf("%s: malloc'd orbi->page_table(%p), orb4.data_size(%u)\n", + __func__, orbi->page_table, orbi->orb4.data_size); + + xfer = fwmem_read_block(orbi->fwdev, (void *)orbi, /*spd*/FWSPD_S400, + orbi->data_hi, orbi->data_lo, orbi->orb4.data_size* + sizeof(struct unrestricted_page_table_fmt), + (void *)orbi->page_table, sbp_targ_pt_done); + + if (xfer != NULL) + return; + } else { + /* + * This is a CTIO for a page table we have + * already malloc'd, so just directly invoke + * the xfer function on the orbi. + */ + sbp_targ_xfer_pt(orbi); return; + } error: orbi->ccb->ccb_h.status = CAM_RESRC_UNAVAIL; + if (debug) + printf("%s: free orbi->page_table %p due to xfer == NULL\n", __func__, orbi->page_table); + if (orbi->page_table != NULL) { + free(orbi->page_table, M_SBP_TARG); + orbi->page_table = NULL; + } xpt_done(orbi->ccb); return; } @@ -1016,6 +1216,8 @@ sbp_targ_action1(struct cam_sim *sim, un if (debug) printf("%s: ctio aborted\n", __func__); sbp_targ_remove_orb_info_locked(orbi->login, orbi); + if (debug) + printf("%s: free orbi %p\n", __func__, orbi); free(orbi, M_SBP_TARG); ccb->ccb_h.status = CAM_REQ_ABORTED; xpt_done(ccb); @@ -1051,17 +1253,16 @@ sbp_targ_action1(struct cam_sim *sim, un } /* Sanity check */ - if (ccb_dir != CAM_DIR_NONE && - orbi->orb4.data_size != ccb->csio.dxfer_len) - printf("%s: data_size(%d) != dxfer_len(%d)\n", - __func__, orbi->orb4.data_size, - ccb->csio.dxfer_len); - - if (ccb_dir != CAM_DIR_NONE) + if (ccb_dir != CAM_DIR_NONE) { sbp_targ_xfer_buf(orbi, 0, orbi->data_hi, orbi->data_lo, MIN(orbi->orb4.data_size, ccb->csio.dxfer_len), sbp_targ_cam_done); + if ( orbi->orb4.data_size > ccb->csio.dxfer_len ) { + orbi->data_lo += ccb->csio.dxfer_len; + orbi->orb4.data_size -= ccb->csio.dxfer_len; + } + } if (ccb_dir == CAM_DIR_NONE) { if ((ccb->ccb_h.flags & CAM_SEND_STATUS) != 0) { @@ -1125,7 +1326,8 @@ sbp_targ_action1(struct cam_sim *sim, un cpi->target_sprt = PIT_PROCESSOR | PIT_DISCONNECT | PIT_TERM_IO; - cpi->hba_misc = PIM_NOBUSRESET | PIM_NO_6_BYTE; + cpi->transport = XPORT_SPI; /* FIXME add XPORT_FW type to cam */ + cpi->hba_misc = PIM_NOBUSRESET | PIM_NOBUSRESET; cpi->hba_eng_cnt = 0; cpi->max_target = 7; /* XXX */ cpi->max_lun = MAX_LUN - 1; @@ -1163,10 +1365,42 @@ sbp_targ_action1(struct cam_sim *sim, un xpt_done(ccb); break; } +#ifdef CAM_NEW_TRAN_CODE + case XPT_SET_TRAN_SETTINGS: + ccb->ccb_h.status = CAM_REQ_INVALID; + xpt_done(ccb); + break; + case XPT_GET_TRAN_SETTINGS: + { + struct ccb_trans_settings *cts = &ccb->cts; + struct ccb_trans_settings_scsi *scsi = + &cts->proto_specific.scsi; + struct ccb_trans_settings_spi *spi = + &cts->xport_specific.spi; + + cts->protocol = PROTO_SCSI; + cts->protocol_version = SCSI_REV_2; + cts->transport = XPORT_FW; /* should have a FireWire */ + cts->transport_version = 2; + spi->valid = CTS_SPI_VALID_DISC; + spi->flags = CTS_SPI_FLAGS_DISC_ENB; + scsi->valid = CTS_SCSI_VALID_TQ; + scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; +#if 0 + printf("%s:%d:%d XPT_GET_TRAN_SETTINGS:\n", + device_get_nameunit(sc->fd.dev), + ccb->ccb_h.target_id, ccb->ccb_h.target_lun); +#endif + cts->ccb_h.status = CAM_REQ_CMP; + xpt_done(ccb); + break; + } +#endif + default: - printf("%s: unknown function %d\n", + printf("%s: unknown function 0x%x\n", __func__, ccb->ccb_h.func_code); - ccb->ccb_h.status = CAM_REQ_INVALID; + ccb->ccb_h.status = CAM_PROVIDE_FAIL; xpt_done(ccb); break; } @@ -1245,7 +1479,7 @@ sbp_targ_cmd_handler(struct fw_xfer *xfe atio->ccb_h.target_id = 0; /* XXX */ atio->ccb_h.target_lun = orbi->login->lstate->lun; atio->sense_len = 0; - atio->tag_action = 1; /* XXX */ + atio->tag_action = MSG_SIMPLE_TASK; atio->tag_id = orbi->orb_lo; atio->init_id = orbi->login->id; @@ -1429,7 +1663,7 @@ sbp_targ_mgm_handler(struct fw_xfer *xfe login->loginres.recon_hold = htons(login->hold_sec); STAILQ_INSERT_TAIL(&lstate->logins, login, link); - fwmem_write_block(orbi->fwdev, NULL, /*spd*/2, orb[2], orb[3], + fwmem_write_block(orbi->fwdev, NULL, /*spd*/FWSPD_S400, orb[2], orb[3], sizeof(struct sbp_login_res), (void *)&login->loginres, fw_asy_callback_free); /* XXX return status after loginres is successfully written */ @@ -1515,10 +1749,11 @@ sbp_targ_fetch_orb(struct sbp_targ_softc orbi->orb_lo = orb_lo; orbi->status.orb_hi = htons(orb_hi); orbi->status.orb_lo = htonl(orb_lo); + orbi->page_table = NULL; switch (mode) { case FETCH_MGM: - fwmem_read_block(fwdev, (void *)orbi, /*spd*/2, orb_hi, orb_lo, + fwmem_read_block(fwdev, (void *)orbi, /*spd*/FWSPD_S400, orb_hi, orb_lo, sizeof(uint32_t) * 8, &orbi->orb[0], sbp_targ_mgm_handler); break; @@ -1545,14 +1780,14 @@ sbp_targ_fetch_orb(struct sbp_targ_softc SLIST_REMOVE_HEAD(&login->lstate->accept_tios, sim_links.sle); STAILQ_INSERT_TAIL(&login->orbs, orbi, link); SBP_UNLOCK(sc); - fwmem_read_block(fwdev, (void *)orbi, /*spd*/2, orb_hi, orb_lo, + fwmem_read_block(fwdev, (void *)orbi, /*spd*/FWSPD_S400, orb_hi, orb_lo, sizeof(uint32_t) * 8, &orbi->orb[0], sbp_targ_cmd_handler); break; case FETCH_POINTER: orbi->state = ORBI_STATUS_POINTER; login->flags |= F_LINK_ACTIVE; - fwmem_read_block(fwdev, (void *)orbi, /*spd*/2, orb_hi, orb_lo, + fwmem_read_block(fwdev, (void *)orbi, /*spd*/FWSPD_S400, orb_hi, orb_lo, sizeof(uint32_t) * 2, &orbi->orb[0], sbp_targ_pointer_handler); break; @@ -1709,7 +1944,7 @@ done: if (rtcode != 0) printf("%s: rtcode = %d\n", __func__, rtcode); sfp = &xfer->send.hdr; - xfer->send.spd = 2; /* XXX */ + xfer->send.spd = FWSPD_S400; xfer->hand = sbp_targ_resp_callback; sfp->mode.wres.dst = fp->mode.wreqb.src; sfp->mode.wres.tlrt = fp->mode.wreqb.tlrt; From owner-svn-src-user@FreeBSD.ORG Mon Feb 6 18:13:35 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 809781065673; Mon, 6 Feb 2012 18:13:35 +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 640BB8FC14; Mon, 6 Feb 2012 18:13:35 +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 q16IDZUK047691; Mon, 6 Feb 2012 18:13:35 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q16IDZ9X047687; Mon, 6 Feb 2012 18:13:35 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201202061813.q16IDZ9X047687@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 6 Feb 2012 18:13:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231094 - in user/gabor/tre-integration: contrib/tre/lib include X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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, 06 Feb 2012 18:13:35 -0000 Author: gabor Date: Mon Feb 6 18:13:34 2012 New Revision: 231094 URL: http://svn.freebsd.org/changeset/base/231094 Log: Implement some missing parts of the Wu-Manber algorithm. It is almost complete now. Modified: user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.c user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.h user/gabor/tre-integration/include/regex.h Modified: user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.c ============================================================================== --- user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.c Mon Feb 6 18:11:01 2012 (r231093) +++ user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.c Mon Feb 6 18:13:34 2012 (r231094) @@ -27,9 +27,18 @@ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ +#include +#include #include "tre-mfastmatch.h" #include "xmalloc.h" +/* TODO: + * + * - REG_ICASE + * - Store pattern and sizes in pat/wpat/siz/wsiz + * - Test + */ + #define WM_B 2 #define ALLOC(var, siz) \ @@ -40,6 +49,13 @@ goto fail; \ } +#define FAIL \ + do \ + { \ + err = REG_BADPAT; \ + goto fail; \ + } while (0) + #define _PROC_WM(pat_arr, siz_arr, char_size, sh_field, m_field) \ /* Determine shortest pattern length */ \ wm->m_field = size_arr[0]; \ @@ -71,13 +87,13 @@ entry->pref_list[0] = i; \ ret = hashtable_put(wm->sh_field, pat_arr[i], entry); \ if (ret != HASH_OK) \ - ; // XXX: error handling \ + FAIL; \ break; \ case HASH_OK: \ entry->shift = entry->shift < sh ? entry->shift : sh; \ entry->pref_list[entry->pref++] = i; \ if (ret != HASH_UPDATED) \ - ; // XXX: error handling \ + FAIL; \ } \ /* Intermediate fragments, only shift calculated */ \ for (int j = 1; j < size_arr[i] - WB_M; j++) \ @@ -93,12 +109,12 @@ ret = hashtable_put(wm->sh_field, &pat_arr[i][j], \ entry); \ if (ret != HASH_OK) \ - ; // XXX: error handling \ + FAIL; \ break; \ case HASH_OK: \ entry->shift = entry->shift < sh ? entry->shift : sh; \ if (ret != HASH_UPDATED) \ - ; // XXX: error handling \ + FAIL; \ } \ ret = hashtable_get(wm->sh_field, &pat_arr[i][n[i] - WB_M], \ entry); \ @@ -112,12 +128,12 @@ ret = hashtable_put(wm->sh_field, &pat_arr[i][n[i] - WB_M], \ entry); \ if (ret != HASH_OK) \ - ; // XXX: error handling \ + FAIL; \ case HASH_OK: \ entry->shift = entry->shift < sh ? entry->shift : sh; \ entry->suff_list[entry->suff++] = i; \ if (ret != HASH_UPDATED) \ - ; // XXX: error handling \ + FAIL; \ } \ } \ xfree(entry); @@ -204,16 +220,75 @@ fail: return err; } +#define MATCH(beg, end, p) \ + do \ + { \ + match->rm_so = beg; \ + match->rm_eo = end; \ + match->p = p; \ + err = REG_OK; \ + goto finish; \ + } while (0); + +#define _WMSEARCH(data, pats, sizes, mlen, tbl, dshift) \ + do \ + { \ + ret = hashtable_get(tbl, data[pos - WM_B], s_entry); \ + shift = (ret == HASH_OK) ? s_entry->shift : dshift; \ + if (shift == 0) \ + { \ + ret = hashtable_get(tbl, data[pos - mlen, p_entry); \ + if (ret == HASH_NOTFOUND) \ + { \ + pos += 1; \ + continue; \ + } \ + else \ + { \ + for (int i = 0; i < p_entry->pref; i++) \ + for (int j = 0; (j < s_entry->suff) && \ + (s_entry->suff_list[j] <= p_entry->pref_list[i]); \ + j++) \ + if (s_entry->suff_list[j] == p_entry->pref_list[i]) \ + { \ + size_t idx = s_entry->suff_list[j]; \ + int k; \ + \ + if (len - pos > sizes[idx] - mlen) \ + { \ + for (k = WM_B; k < sizes[idx]; k++) \ + if (pats[idx][k] != data[pos - mlen + k]) \ + break; \ + if (k == sizes[idx]) \ + // XXX: match \ + } \ + } \ + else \ + continue; \ + pos += 1; \ + } \ + } \ + else \ + pos += shift; \ + } while (0); + +#define WMSEARCH \ + _WMSEARCH(byte_str, wm->pat, wm->siz, wm->m, wm->hash, \ + wm->defsh) +#define WMSEARCH_WIDE \ + _WMSEARCH(wide_str, wm->wpats, wm->wsiz, wm->wm, wm->whash, \ + wm->wdefsh) + int tre_wmexec(const void *str, size_t len, tre_str_type_t type, size_t nmatch, regmatch_t pmatch[], int eflags, - const mregex_t *preg) + const mregex_t *preg, regmatch_t *match) { wmsearch_t *wm = preg->wm; wmentry_t *s_entry, *p_entry; tre_char_t *wide_str = str; char *byte_str = str; - size_t pos = preg->n; + size_t pos = preg->m; size_T shift; int ret; int err = REG_NOMATCH; @@ -224,47 +299,43 @@ tre_wmexec(const void *str, size_t len, while (pos < len) { if (type == STR_WIDE) - { - ret = hashtable_get(wm->wshift, wide_str[pos - WM_B], s_entry); - shift = (ret == HASH_OK) ? s_entry->shift : wm->wdefshift; - if (shift == 0) - { - ret = hashtable_get(wm->wshift, wide_str[pos - wm->wm, p_entry); - if (ret == HASH_NOTFOUND) - continue; - else - { - for (int i = 0; i < p_entry->pref; i++) - for (int j = 0; (j < s_entry->suff) && - (s_entry->suff_list[j] <= p_entry->pref_list[i]); j++) - if (s_entry->suff_list[j] == p_entry->pref_list[i]) - { - // XXX: compare - } - else - continue; - } - } - else - pos += shift; - } + WMSEARCH; else - { - ret = hashtable_get(wm->shift, byte_str[pos - WM_B], s_entry); - shift = (ret == HASH_OK) ? s_entry->shift : wm->defshift; - if (shift == 0) - { - // XXX: comapre - } - else - pos += shift; - } + WMSEARCH_WIDE; } fail: +finish: if (s_entry) xfree(s_entry); if (p_entry) xfree(p_entry); return err; } + +void +wmfree(mregex_t *preg) +{ + wmsearch_t wm = preg->wm; + + if (wm->hash) + hashtable_free(wm->hash); + for (int i = 0; i < wm->n; i++) + if (wm->pat[i]) + xfree(wm->pat[i]); + if (wm->pat) + xfree(wm->pat); + if (wm->siz) + xfree(wm->siz); +#ifdef TRE_WCHAR + if (wm->whash) + hashtable_free(wm->whash); + for (int i = 0; i < wm->wn; i++) + if (wm->wpat[i]) + xfree(wm->wpat[i]); + if (wm->wpat) + xfree(wm->wpat); + if (wm->wsiz) + xfree(wm->wsiz); +#endif +} Modified: user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.h ============================================================================== --- user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.h Mon Feb 6 18:11:01 2012 (r231093) +++ user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.h Mon Feb 6 18:13:34 2012 (r231094) @@ -10,10 +10,16 @@ #define WM_MAXPAT 64 typedef struct { + char **pat; /* Patterns */ + size_t *siz; /* Pattern sizes */ + size_t n; /* No of patterns */ size_t m; /* Shortest pattern length */ size_t defsh; /* Default shift */ void *hash; /* Wu-Manber shift table */ #ifdef TRE_WCHAR + tre_char_t **wpat; /* Patterns (wide) */ + size_t wsiz; /* Pattern sizes (wide) */ + size_t wn; /* No of patterns (wide) */ size_t wm; /* Shortest pattern length (wide) */ size_t wdefsh; /* Default shift (wide) */ void *whash; /* Wu-Manber shift table (wide) */ Modified: user/gabor/tre-integration/include/regex.h ============================================================================== --- user/gabor/tre-integration/include/regex.h Mon Feb 6 18:11:01 2012 (r231093) +++ user/gabor/tre-integration/include/regex.h Mon Feb 6 18:13:34 2012 (r231094) @@ -79,6 +79,7 @@ typedef struct { } regex_t; typedef struct { + size_t p; regoff_t rm_so; regoff_t rm_eo; } regmatch_t; From owner-svn-src-user@FreeBSD.ORG Tue Feb 7 11:24:18 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E74FD1065672; Tue, 7 Feb 2012 11:24:18 +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 BBC2A8FC25; Tue, 7 Feb 2012 11:24:18 +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 q17BOI8r087108; Tue, 7 Feb 2012 11:24:18 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q17BOI4s087106; Tue, 7 Feb 2012 11:24:18 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201202071124.q17BOI4s087106@svn.freebsd.org> From: Attilio Rao Date: Tue, 7 Feb 2012 11:24:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231124 - user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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, 07 Feb 2012 11:24:19 -0000 Author: attilio Date: Tue Feb 7 11:24:18 2012 New Revision: 231124 URL: http://svn.freebsd.org/changeset/base/231124 Log: Revert r230987. Modified: user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: 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_vnops.c Tue Feb 7 10:59:19 2012 (r231123) +++ user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Feb 7 11:24:18 2012 (r231124) @@ -321,32 +321,22 @@ page_lookup(vnode_t *vp, int64_t start, obj = vp->v_object; VM_OBJECT_LOCK_ASSERT(obj, MA_OWNED); - mtx_assert(&vm_page_queue_free_mtx, MA_NOTOWNED); for (;;) { - if ((pp = vm_radix_lookup(&obj->rtree, OFF_TO_IDX(start), - VM_RADIX_ANY)) != NULL) { - if (pp->flags & PG_CACHED) { - mtx_lock(&vm_page_queue_free_mtx); - if (pp->object == obj) - vm_page_cache_remove(pp); - mtx_unlock(&vm_page_queue_free_mtx); - pp = NULL; - } else if (vm_page_is_valid(pp, (vm_offset_t)off, - nbytes)) { - if ((pp->oflags & VPO_BUSY) != 0) { - /* - * Reference the page before unlocking - * and sleeping so that the page daemon - * is less likely to reclaim it. - */ - vm_page_reference(pp); - vm_page_sleep(pp, "zfsmwb"); - continue; - } - vm_page_busy(pp); - vm_page_undirty(pp); + if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && + vm_page_is_valid(pp, (vm_offset_t)off, nbytes)) { + if ((pp->oflags & VPO_BUSY) != 0) { + /* + * Reference the page before unlocking and + * sleeping so that the page daemon is less + * likely to reclaim it. + */ + vm_page_reference(pp); + vm_page_sleep(pp, "zfsmwb"); + continue; } + vm_page_busy(pp); + vm_page_undirty(pp); } else pp = NULL; break; From owner-svn-src-user@FreeBSD.ORG Tue Feb 7 11:25:36 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7627B10656AD; Tue, 7 Feb 2012 11:25:36 +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 6573B8FC0A; Tue, 7 Feb 2012 11:25:36 +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 q17BPaDl087193; Tue, 7 Feb 2012 11:25:36 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q17BPagD087191; Tue, 7 Feb 2012 11:25:36 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201202071125.q17BPagD087191@svn.freebsd.org> From: Attilio Rao Date: Tue, 7 Feb 2012 11:25:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231125 - user/attilio/vmcontention/sys/fs/tmpfs X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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, 07 Feb 2012 11:25:36 -0000 Author: attilio Date: Tue Feb 7 11:25:35 2012 New Revision: 231125 URL: http://svn.freebsd.org/changeset/base/231125 Log: Revert r230988. Modified: user/attilio/vmcontention/sys/fs/tmpfs/tmpfs_vnops.c Modified: user/attilio/vmcontention/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- user/attilio/vmcontention/sys/fs/tmpfs/tmpfs_vnops.c Tue Feb 7 11:24:18 2012 (r231124) +++ user/attilio/vmcontention/sys/fs/tmpfs/tmpfs_vnops.c Tue Feb 7 11:25:35 2012 (r231125) @@ -648,30 +648,21 @@ tmpfs_mappedwrite(vm_object_t vobj, vm_o goto nocache; } lookupvpg: - if ((vpg = vm_radix_lookup(&vobj->rtree, idx, VM_RADIX_ANY)) != NULL) { - if (vpg->flags & PG_CACHED) { - mtx_lock(&vm_page_queue_free_mtx); - if (vpg->object == vobj) - vm_page_cache_remove(vpg); - mtx_unlock(&vm_page_queue_free_mtx); - VM_OBJECT_UNLOCK(vobj); - vpg = NULL; - } else if (vm_page_is_valid(vpg, offset, tlen)) { - if ((vpg->oflags & VPO_BUSY) != 0) { - /* - * Reference the page before unlocking and - * sleeping so that the page daemon is less - * likely to reclaim it. - */ - vm_page_reference(vpg); - vm_page_sleep(vpg, "tmfsmw"); - goto lookupvpg; - } - vm_page_busy(vpg); - vm_page_undirty(vpg); - VM_OBJECT_UNLOCK(vobj); - error = uiomove_fromphys(&vpg, offset, tlen, uio); + if (((vpg = vm_page_lookup(vobj, idx)) != NULL) && + vm_page_is_valid(vpg, offset, tlen)) { + if ((vpg->oflags & VPO_BUSY) != 0) { + /* + * Reference the page before unlocking and sleeping so + * that the page daemon is less likely to reclaim it. + */ + vm_page_reference(vpg); + vm_page_sleep(vpg, "tmfsmw"); + goto lookupvpg; } + vm_page_busy(vpg); + vm_page_undirty(vpg); + VM_OBJECT_UNLOCK(vobj); + error = uiomove_fromphys(&vpg, offset, tlen, uio); } else { VM_OBJECT_UNLOCK(vobj); vpg = NULL; From owner-svn-src-user@FreeBSD.ORG Tue Feb 7 11:28:42 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B2C71065688; Tue, 7 Feb 2012 11:28:42 +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 261B18FC15; Tue, 7 Feb 2012 11:28:42 +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 q17BSgYi087372; Tue, 7 Feb 2012 11:28:42 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q17BSfc3087332; Tue, 7 Feb 2012 11:28:41 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201202071128.q17BSfc3087332@svn.freebsd.org> From: Attilio Rao Date: Tue, 7 Feb 2012 11:28:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231126 - in user/attilio/vmcontention: bin/sh contrib/llvm/tools/bugpoint contrib/llvm/tools/llc contrib/llvm/tools/lli contrib/llvm/tools/llvm-ar contrib/llvm/tools/llvm-as contrib/ll... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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, 07 Feb 2012 11:28:42 -0000 Author: attilio Date: Tue Feb 7 11:28:40 2012 New Revision: 231126 URL: http://svn.freebsd.org/changeset/base/231126 Log: MFC Added: user/attilio/vmcontention/contrib/llvm/tools/bugpoint/ - copied from r231125, head/contrib/llvm/tools/bugpoint/ user/attilio/vmcontention/contrib/llvm/tools/llc/ - copied from r231125, head/contrib/llvm/tools/llc/ user/attilio/vmcontention/contrib/llvm/tools/lli/ - copied from r231125, head/contrib/llvm/tools/lli/ user/attilio/vmcontention/contrib/llvm/tools/llvm-ar/ - copied from r231125, head/contrib/llvm/tools/llvm-ar/ user/attilio/vmcontention/contrib/llvm/tools/llvm-as/ - copied from r231125, head/contrib/llvm/tools/llvm-as/ user/attilio/vmcontention/contrib/llvm/tools/llvm-bcanalyzer/ - copied from r231125, head/contrib/llvm/tools/llvm-bcanalyzer/ user/attilio/vmcontention/contrib/llvm/tools/llvm-diff/ - copied from r231125, head/contrib/llvm/tools/llvm-diff/ user/attilio/vmcontention/contrib/llvm/tools/llvm-dis/ - copied from r231125, head/contrib/llvm/tools/llvm-dis/ user/attilio/vmcontention/contrib/llvm/tools/llvm-extract/ - copied from r231125, head/contrib/llvm/tools/llvm-extract/ user/attilio/vmcontention/contrib/llvm/tools/llvm-ld/ - copied from r231125, head/contrib/llvm/tools/llvm-ld/ user/attilio/vmcontention/contrib/llvm/tools/llvm-link/ - copied from r231125, head/contrib/llvm/tools/llvm-link/ user/attilio/vmcontention/contrib/llvm/tools/llvm-mc/ - copied from r231125, head/contrib/llvm/tools/llvm-mc/ user/attilio/vmcontention/contrib/llvm/tools/llvm-nm/ - copied from r231125, head/contrib/llvm/tools/llvm-nm/ user/attilio/vmcontention/contrib/llvm/tools/llvm-objdump/ - copied from r231125, head/contrib/llvm/tools/llvm-objdump/ user/attilio/vmcontention/contrib/llvm/tools/llvm-prof/ - copied from r231125, head/contrib/llvm/tools/llvm-prof/ user/attilio/vmcontention/contrib/llvm/tools/llvm-ranlib/ - copied from r231125, head/contrib/llvm/tools/llvm-ranlib/ user/attilio/vmcontention/contrib/llvm/tools/llvm-rtdyld/ - copied from r231125, head/contrib/llvm/tools/llvm-rtdyld/ user/attilio/vmcontention/contrib/llvm/tools/llvm-stub/ - copied from r231125, head/contrib/llvm/tools/llvm-stub/ user/attilio/vmcontention/contrib/llvm/tools/macho-dump/ - copied from r231125, head/contrib/llvm/tools/macho-dump/ user/attilio/vmcontention/contrib/llvm/tools/opt/ - copied from r231125, head/contrib/llvm/tools/opt/ user/attilio/vmcontention/lib/clang/libllvmarchive/ - copied from r231125, head/lib/clang/libllvmarchive/ user/attilio/vmcontention/lib/clang/libllvmdebuginfo/ - copied from r231125, head/lib/clang/libllvmdebuginfo/ user/attilio/vmcontention/lib/clang/libllvmexecutionengine/ - copied from r231125, head/lib/clang/libllvmexecutionengine/ user/attilio/vmcontention/lib/clang/libllvminterpreter/ - copied from r231125, head/lib/clang/libllvminterpreter/ user/attilio/vmcontention/lib/clang/libllvmjit/ - copied from r231125, head/lib/clang/libllvmjit/ user/attilio/vmcontention/lib/clang/libllvmlinker/ - copied from r231125, head/lib/clang/libllvmlinker/ user/attilio/vmcontention/lib/clang/libllvmmcdisassembler/ - copied from r231125, head/lib/clang/libllvmmcdisassembler/ user/attilio/vmcontention/lib/clang/libllvmmcjit/ - copied from r231125, head/lib/clang/libllvmmcjit/ user/attilio/vmcontention/lib/clang/libllvmobject/ - copied from r231125, head/lib/clang/libllvmobject/ user/attilio/vmcontention/lib/clang/libllvmruntimedyld/ - copied from r231125, head/lib/clang/libllvmruntimedyld/ user/attilio/vmcontention/sys/powerpc/ofw/ofw_pci.c - copied unchanged from r231125, head/sys/powerpc/ofw/ofw_pci.c user/attilio/vmcontention/sys/powerpc/ofw/ofw_pci.h - copied unchanged from r231125, head/sys/powerpc/ofw/ofw_pci.h user/attilio/vmcontention/tools/build/options/WITH_CLANG_EXTRAS - copied unchanged from r231125, head/tools/build/options/WITH_CLANG_EXTRAS user/attilio/vmcontention/tools/tools/fixwhite/ - copied from r231125, head/tools/tools/fixwhite/ user/attilio/vmcontention/usr.bin/clang/bugpoint/ - copied from r231125, head/usr.bin/clang/bugpoint/ user/attilio/vmcontention/usr.bin/clang/llc/ - copied from r231125, head/usr.bin/clang/llc/ user/attilio/vmcontention/usr.bin/clang/lli/ - copied from r231125, head/usr.bin/clang/lli/ user/attilio/vmcontention/usr.bin/clang/llvm-ar/ - copied from r231125, head/usr.bin/clang/llvm-ar/ user/attilio/vmcontention/usr.bin/clang/llvm-as/ - copied from r231125, head/usr.bin/clang/llvm-as/ user/attilio/vmcontention/usr.bin/clang/llvm-bcanalyzer/ - copied from r231125, head/usr.bin/clang/llvm-bcanalyzer/ user/attilio/vmcontention/usr.bin/clang/llvm-diff/ - copied from r231125, head/usr.bin/clang/llvm-diff/ user/attilio/vmcontention/usr.bin/clang/llvm-dis/ - copied from r231125, head/usr.bin/clang/llvm-dis/ user/attilio/vmcontention/usr.bin/clang/llvm-extract/ - copied from r231125, head/usr.bin/clang/llvm-extract/ user/attilio/vmcontention/usr.bin/clang/llvm-ld/ - copied from r231125, head/usr.bin/clang/llvm-ld/ user/attilio/vmcontention/usr.bin/clang/llvm-link/ - copied from r231125, head/usr.bin/clang/llvm-link/ user/attilio/vmcontention/usr.bin/clang/llvm-mc/ - copied from r231125, head/usr.bin/clang/llvm-mc/ user/attilio/vmcontention/usr.bin/clang/llvm-nm/ - copied from r231125, head/usr.bin/clang/llvm-nm/ user/attilio/vmcontention/usr.bin/clang/llvm-objdump/ - copied from r231125, head/usr.bin/clang/llvm-objdump/ user/attilio/vmcontention/usr.bin/clang/llvm-prof/ - copied from r231125, head/usr.bin/clang/llvm-prof/ user/attilio/vmcontention/usr.bin/clang/llvm-ranlib/ - copied from r231125, head/usr.bin/clang/llvm-ranlib/ user/attilio/vmcontention/usr.bin/clang/llvm-rtdyld/ - copied from r231125, head/usr.bin/clang/llvm-rtdyld/ user/attilio/vmcontention/usr.bin/clang/llvm-stub/ - copied from r231125, head/usr.bin/clang/llvm-stub/ user/attilio/vmcontention/usr.bin/clang/macho-dump/ - copied from r231125, head/usr.bin/clang/macho-dump/ user/attilio/vmcontention/usr.bin/clang/opt/ - copied from r231125, head/usr.bin/clang/opt/ Modified: user/attilio/vmcontention/bin/sh/eval.c user/attilio/vmcontention/bin/sh/jobs.c user/attilio/vmcontention/bin/sh/jobs.h user/attilio/vmcontention/bin/sh/var.c user/attilio/vmcontention/bin/sh/var.h user/attilio/vmcontention/etc/rc.d/routing user/attilio/vmcontention/include/rpc/Makefile user/attilio/vmcontention/include/rpcsvc/Makefile user/attilio/vmcontention/lib/clang/Makefile user/attilio/vmcontention/lib/clang/libllvmanalysis/Makefile user/attilio/vmcontention/lib/clang/libllvmipa/Makefile user/attilio/vmcontention/lib/clang/libllvmipo/Makefile user/attilio/vmcontention/lib/clang/libllvmmc/Makefile user/attilio/vmcontention/lib/clang/libllvmscalaropts/Makefile user/attilio/vmcontention/lib/clang/libllvmsupport/Makefile user/attilio/vmcontention/lib/clang/libllvmtransformutils/Makefile user/attilio/vmcontention/lib/clang/libllvmx86disassembler/Makefile user/attilio/vmcontention/lib/libc/powerpc/SYS.h user/attilio/vmcontention/lib/libc/powerpc/gen/setjmp.S user/attilio/vmcontention/lib/libc/powerpc64/SYS.h user/attilio/vmcontention/lib/libc/powerpc64/gen/setjmp.S user/attilio/vmcontention/lib/libc/rpc/Makefile.inc user/attilio/vmcontention/lib/libc/yp/Makefile.inc user/attilio/vmcontention/lib/librpcsvc/Makefile user/attilio/vmcontention/lib/libthr/thread/thr_list.c user/attilio/vmcontention/lib/libthr/thread/thr_private.h user/attilio/vmcontention/lib/libutil/pidfile.c user/attilio/vmcontention/lib/libypclnt/Makefile user/attilio/vmcontention/libexec/ypxfr/Makefile user/attilio/vmcontention/release/picobsd/tinyware/passwd/Makefile user/attilio/vmcontention/release/rc.local user/attilio/vmcontention/sbin/fsdb/fsdbutil.c user/attilio/vmcontention/sbin/hastd/primary.c user/attilio/vmcontention/sbin/ipfw/ipfw.8 user/attilio/vmcontention/sbin/ipfw/ipfw2.c user/attilio/vmcontention/sbin/route/route.c user/attilio/vmcontention/share/man/man4/tcp.4 user/attilio/vmcontention/share/man/man5/src.conf.5 user/attilio/vmcontention/share/man/man7/ports.7 user/attilio/vmcontention/share/mk/bsd.own.mk user/attilio/vmcontention/sys/boot/ficl/fileaccess.c user/attilio/vmcontention/sys/boot/ficl/i386/sysdep.h user/attilio/vmcontention/sys/cam/ctl/ctl_frontend_cam_sim.c user/attilio/vmcontention/sys/compat/freebsd32/freebsd32_signal.h user/attilio/vmcontention/sys/conf/files user/attilio/vmcontention/sys/conf/files.powerpc user/attilio/vmcontention/sys/dev/ath/ath_dfs/null/dfs_null.c user/attilio/vmcontention/sys/dev/cxgb/cxgb_adapter.h user/attilio/vmcontention/sys/dev/cxgb/cxgb_main.c user/attilio/vmcontention/sys/dev/cxgb/cxgb_sge.c user/attilio/vmcontention/sys/dev/cxgbe/adapter.h user/attilio/vmcontention/sys/dev/cxgbe/t4_l2t.c user/attilio/vmcontention/sys/dev/cxgbe/t4_l2t.h user/attilio/vmcontention/sys/dev/cxgbe/t4_main.c user/attilio/vmcontention/sys/dev/sound/pci/hda/hdacc.c user/attilio/vmcontention/sys/fs/ext2fs/inode.h user/attilio/vmcontention/sys/fs/nfsclient/nfs_clvnops.c user/attilio/vmcontention/sys/fs/nwfs/nwfs_vnops.c user/attilio/vmcontention/sys/fs/smbfs/smbfs_vnops.c user/attilio/vmcontention/sys/geom/journal/g_journal.c user/attilio/vmcontention/sys/geom/part/g_part.c user/attilio/vmcontention/sys/kern/kern_kthread.c user/attilio/vmcontention/sys/kern/subr_mchain.c user/attilio/vmcontention/sys/kern/tty.c user/attilio/vmcontention/sys/kern/tty_info.c user/attilio/vmcontention/sys/kern/tty_ttydisc.c user/attilio/vmcontention/sys/kern/vfs_aio.c user/attilio/vmcontention/sys/kern/vfs_cache.c user/attilio/vmcontention/sys/kern/vfs_mount.c user/attilio/vmcontention/sys/kern/vfs_subr.c user/attilio/vmcontention/sys/kern/vfs_syscalls.c user/attilio/vmcontention/sys/modules/Makefile user/attilio/vmcontention/sys/modules/kgssapi/Makefile user/attilio/vmcontention/sys/modules/kgssapi_krb5/Makefile user/attilio/vmcontention/sys/net/if.c user/attilio/vmcontention/sys/net80211/ieee80211.h user/attilio/vmcontention/sys/netinet/ipfw/ip_fw2.c user/attilio/vmcontention/sys/netinet/ipfw/ip_fw_sockopt.c user/attilio/vmcontention/sys/netinet/sctp_structs.h user/attilio/vmcontention/sys/netinet/tcp.h user/attilio/vmcontention/sys/netinet/tcp_input.c user/attilio/vmcontention/sys/netinet/tcp_syncache.c user/attilio/vmcontention/sys/netinet/tcp_timer.c user/attilio/vmcontention/sys/netinet/tcp_timer.h user/attilio/vmcontention/sys/netinet/tcp_usrreq.c user/attilio/vmcontention/sys/netinet/tcp_var.h user/attilio/vmcontention/sys/nfsclient/nfs_vnops.c user/attilio/vmcontention/sys/powerpc/aim/swtch64.S user/attilio/vmcontention/sys/powerpc/include/asm.h user/attilio/vmcontention/sys/powerpc/ofw/ofw_pcib_pci.c user/attilio/vmcontention/sys/powerpc/ofw/ofw_syscons.c user/attilio/vmcontention/sys/powerpc/powermac/cpcht.c user/attilio/vmcontention/sys/powerpc/powermac/grackle.c user/attilio/vmcontention/sys/powerpc/powermac/gracklevar.h user/attilio/vmcontention/sys/powerpc/powermac/uninorthpci.c user/attilio/vmcontention/sys/powerpc/powermac/uninorthvar.h user/attilio/vmcontention/sys/powerpc/ps3/ps3_syscons.c user/attilio/vmcontention/sys/sys/param.h user/attilio/vmcontention/sys/sys/proc.h user/attilio/vmcontention/sys/sys/ttycom.h user/attilio/vmcontention/sys/sys/ttydefaults.h user/attilio/vmcontention/sys/sys/vnode.h 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_vnops.c user/attilio/vmcontention/tools/build/mk/OptionalObsoleteFiles.inc user/attilio/vmcontention/usr.bin/clang/Makefile user/attilio/vmcontention/usr.bin/rpcgen/rpc_main.c user/attilio/vmcontention/usr.bin/rpcgen/rpcgen.1 user/attilio/vmcontention/usr.bin/systat/icmp.c user/attilio/vmcontention/usr.bin/systat/ifstat.c user/attilio/vmcontention/usr.bin/systat/iostat.c user/attilio/vmcontention/usr.bin/systat/ip.c user/attilio/vmcontention/usr.bin/systat/netcmds.c user/attilio/vmcontention/usr.bin/systat/netstat.c user/attilio/vmcontention/usr.bin/systat/pigs.c user/attilio/vmcontention/usr.bin/systat/tcp.c user/attilio/vmcontention/usr.sbin/amd/Makefile.inc user/attilio/vmcontention/usr.sbin/bootparamd/bootparamd/Makefile user/attilio/vmcontention/usr.sbin/bootparamd/callbootd/Makefile user/attilio/vmcontention/usr.sbin/gssd/Makefile user/attilio/vmcontention/usr.sbin/keyserv/Makefile user/attilio/vmcontention/usr.sbin/rpc.lockd/Makefile user/attilio/vmcontention/usr.sbin/rpc.statd/Makefile user/attilio/vmcontention/usr.sbin/rpc.yppasswdd/Makefile user/attilio/vmcontention/usr.sbin/rpc.ypupdated/Makefile user/attilio/vmcontention/usr.sbin/rpc.ypxfrd/Makefile user/attilio/vmcontention/usr.sbin/yppush/Makefile user/attilio/vmcontention/usr.sbin/ypserv/Makefile Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/contrib/llvm/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/lib/libutil/ (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/conf/ (props changed) Modified: user/attilio/vmcontention/bin/sh/eval.c ============================================================================== --- user/attilio/vmcontention/bin/sh/eval.c Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/bin/sh/eval.c Tue Feb 7 11:28:40 2012 (r231126) @@ -921,6 +921,15 @@ evalcommand(union node *cmd, int flags, if (pipe(pip) < 0) error("Pipe call failed: %s", strerror(errno)); } + if (cmdentry.cmdtype == CMDNORMAL && + cmd->ncmd.redirect == NULL && + varlist.list == NULL && + (mode == FORK_FG || mode == FORK_NOJOB) && + !disvforkset() && !iflag && !mflag) { + vforkexecshell(jp, argv, environment(), path, + cmdentry.u.index, flags & EV_BACKCMD ? pip : NULL); + goto parent; + } if (forkshell(jp, cmd, mode) != 0) goto parent; /* at end of routine */ if (flags & EV_BACKCMD) { Modified: user/attilio/vmcontention/bin/sh/jobs.c ============================================================================== --- user/attilio/vmcontention/bin/sh/jobs.c Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/bin/sh/jobs.c Tue Feb 7 11:28:40 2012 (r231126) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #undef CEOF /* syntax.h redefines this */ #endif #include "redir.h" +#include "exec.h" #include "show.h" #include "main.h" #include "parser.h" @@ -885,6 +886,54 @@ forkshell(struct job *jp, union node *n, } +pid_t +vforkexecshell(struct job *jp, char **argv, char **envp, const char *path, int idx, int pip[2]) +{ + pid_t pid; + struct jmploc jmploc; + struct jmploc *savehandler; + + TRACE(("vforkexecshell(%%%td, %p, %d) called\n", jp - jobtab, (void *)n, + mode)); + INTOFF; + flushall(); + savehandler = handler; + pid = vfork(); + if (pid == -1) { + TRACE(("Vfork failed, errno=%d\n", errno)); + INTON; + error("Cannot fork: %s", strerror(errno)); + } + if (pid == 0) { + TRACE(("Child shell %d\n", (int)getpid())); + if (setjmp(jmploc.loc)) + _exit(exception == EXEXEC ? exerrno : 2); + if (pip != NULL) { + close(pip[0]); + if (pip[1] != 1) { + dup2(pip[1], 1); + close(pip[1]); + } + } + handler = &jmploc; + shellexec(argv, envp, path, idx); + } + handler = savehandler; + if (jp) { + struct procstat *ps = &jp->ps[jp->nprocs++]; + ps->pid = pid; + ps->status = -1; + ps->cmd = nullstr; + jp->foreground = 1; +#if JOBS + setcurjob(jp); +#endif + } + INTON; + TRACE(("In parent shell: child = %d\n", (int)pid)); + return pid; +} + /* * Wait for job to finish. Modified: user/attilio/vmcontention/bin/sh/jobs.h ============================================================================== --- user/attilio/vmcontention/bin/sh/jobs.h Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/bin/sh/jobs.h Tue Feb 7 11:28:40 2012 (r231126) @@ -91,6 +91,7 @@ void setjobctl(int); void showjobs(int, int); struct job *makejob(union node *, int); pid_t forkshell(struct job *, union node *, int); +pid_t vforkexecshell(struct job *, char **, char **, const char *, int, int []); int waitforjob(struct job *, int *); int stoppedjobs(void); int backgndpidset(void); Modified: user/attilio/vmcontention/bin/sh/var.c ============================================================================== --- user/attilio/vmcontention/bin/sh/var.c Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/bin/sh/var.c Tue Feb 7 11:28:40 2012 (r231126) @@ -94,6 +94,7 @@ struct var vps2; struct var vps4; struct var vvers; static struct var voptind; +struct var vdisvfork; int forcelocal; @@ -125,6 +126,8 @@ static const struct varinit varinit[] = #endif { &voptind, 0, "OPTIND=1", getoptsreset }, + { &vdisvfork, VUNSET, "SH_DISABLE_VFORK=", + NULL }, { NULL, 0, NULL, NULL } }; @@ -600,7 +603,7 @@ showvarscmd(int argc __unused, char **ar } } - INTON; + INTOFF; vars = ckmalloc(n * sizeof(*vars)); i = 0; for (vpp = vartab; vpp < vartab + VTABSIZE; vpp++) { @@ -625,7 +628,7 @@ showvarscmd(int argc __unused, char **ar out1c('\n'); } ckfree(vars); - INTOFF; + INTON; return 0; } Modified: user/attilio/vmcontention/bin/sh/var.h ============================================================================== --- user/attilio/vmcontention/bin/sh/var.h Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/bin/sh/var.h Tue Feb 7 11:28:40 2012 (r231126) @@ -79,6 +79,7 @@ extern struct var vppid; extern struct var vps1; extern struct var vps2; extern struct var vps4; +extern struct var vdisvfork; #ifndef NO_HISTORY extern struct var vhistsize; extern struct var vterm; @@ -109,6 +110,7 @@ extern int initial_localeisutf8; #endif #define mpathset() ((vmpath.flags & VUNSET) == 0) +#define disvforkset() ((vdisvfork.flags & VUNSET) == 0) void initvar(void); void setvar(const char *, const char *, int); Modified: user/attilio/vmcontention/etc/rc.d/routing ============================================================================== --- user/attilio/vmcontention/etc/rc.d/routing Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/etc/rc.d/routing Tue Feb 7 11:28:40 2012 (r231126) @@ -98,8 +98,10 @@ routing_stop_inet6() local i route -n flush -inet6 - for i in ${ipv6_network_interfaces}; do - ifconfig $i inet6 -defaultif + for i in `list_net_interfaces`; do + if ipv6if $i; then + ifconfig $i inet6 -defaultif + fi done } Modified: user/attilio/vmcontention/include/rpc/Makefile ============================================================================== --- user/attilio/vmcontention/include/rpc/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/include/rpc/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -3,7 +3,7 @@ .SUFFIXES: .x -RPCCOM = rpcgen -C +RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen -C HDRS= rpcb_prot.h Modified: user/attilio/vmcontention/include/rpcsvc/Makefile ============================================================================== --- user/attilio/vmcontention/include/rpcsvc/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/include/rpcsvc/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -3,7 +3,7 @@ .SUFFIXES: .x -RPCCOM = rpcgen -C +RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen -C HDRS= key_prot.h klm_prot.h mount.h nfs_prot.h nlm_prot.h rex.h rnusers.h \ rquota.h rstat.h rwall.h sm_inter.h spray.h yppasswd.h yp.h \ Modified: user/attilio/vmcontention/lib/clang/Makefile ============================================================================== --- user/attilio/vmcontention/lib/clang/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/clang/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .if !make(install) SUBDIR= libclanganalysis \ libclangarcmigrate \ @@ -60,6 +62,19 @@ SUBDIR= libclanganalysis \ libllvmx86info \ libllvmx86instprinter \ libllvmx86utils + +.if ${MK_CLANG_EXTRAS} != "no" +SUBDIR+=libllvmarchive \ + libllvmdebuginfo \ + libllvmexecutionengine \ + libllvminterpreter \ + libllvmjit \ + libllvmlinker \ + libllvmmcdisassembler \ + libllvmmcjit \ + libllvmobject \ + libllvmruntimedyld +.endif .endif SUBDIR+= include Modified: user/attilio/vmcontention/lib/clang/libllvmanalysis/Makefile ============================================================================== --- user/attilio/vmcontention/lib/clang/libllvmanalysis/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/clang/libllvmanalysis/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmanalysis SRCDIR= lib/Analysis @@ -55,6 +57,14 @@ SRCS= AliasAnalysis.cpp \ TypeBasedAliasAnalysis.cpp \ ValueTracking.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= BlockFrequencyInfo.cpp \ + LibCallSemantics.cpp \ + PathNumbering.cpp \ + PathProfileInfo.cpp \ + PathProfileVerifier.cpp +.endif + TGHDRS= Intrinsics .include "../clang.lib.mk" Modified: user/attilio/vmcontention/lib/clang/libllvmipa/Makefile ============================================================================== --- user/attilio/vmcontention/lib/clang/libllvmipa/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/clang/libllvmipa/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmipa SRCDIR= lib/Analysis/IPA @@ -8,6 +10,10 @@ SRCS= CallGraph.cpp \ FindUsedTypes.cpp \ GlobalsModRef.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= IPA.cpp +.endif + TGHDRS= Intrinsics .include "../clang.lib.mk" Modified: user/attilio/vmcontention/lib/clang/libllvmipo/Makefile ============================================================================== --- user/attilio/vmcontention/lib/clang/libllvmipo/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/clang/libllvmipo/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmipo SRCDIR= lib/Transforms/IPO @@ -23,6 +25,10 @@ SRCS= ArgumentPromotion.cpp \ StripDeadPrototypes.cpp \ StripSymbols.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= IPO.cpp +.endif + TGHDRS= Intrinsics .include "../clang.lib.mk" Modified: user/attilio/vmcontention/lib/clang/libllvmmc/Makefile ============================================================================== --- user/attilio/vmcontention/lib/clang/libllvmmc/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/clang/libllvmmc/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmmc SRCDIR= lib/MC @@ -43,4 +45,8 @@ SRCS= ELFObjectWriter.cpp \ WinCOFFObjectWriter.cpp \ WinCOFFStreamer.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= MCDisassembler.cpp +.endif + .include "../clang.lib.mk" Modified: user/attilio/vmcontention/lib/clang/libllvmscalaropts/Makefile ============================================================================== --- user/attilio/vmcontention/lib/clang/libllvmscalaropts/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/clang/libllvmscalaropts/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmscalaropts SRCDIR= lib/Transforms/Scalar @@ -31,6 +33,13 @@ SRCS= ADCE.cpp \ Sink.cpp \ TailRecursionElimination.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= LoopInstSimplify.cpp \ + LowerAtomic.cpp \ + Reg2Mem.cpp \ + Scalar.cpp +.endif + TGHDRS= Intrinsics .include "../clang.lib.mk" Modified: user/attilio/vmcontention/lib/clang/libllvmsupport/Makefile ============================================================================== --- user/attilio/vmcontention/lib/clang/libllvmsupport/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/clang/libllvmsupport/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmsupport SRCDIR= lib/Support @@ -67,4 +69,14 @@ SRCS= APFloat.cpp \ system_error.cpp LLVM_REQUIRES_RTTI= +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= BlockFrequency.cpp \ + BranchProbability.cpp \ + DataExtractor.cpp \ + Disassembler.cpp \ + FileUtilities.cpp \ + MemoryObject.cpp \ + SystemUtils.cpp +.endif + .include "../clang.lib.mk" Modified: user/attilio/vmcontention/lib/clang/libllvmtransformutils/Makefile ============================================================================== --- user/attilio/vmcontention/lib/clang/libllvmtransformutils/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/clang/libllvmtransformutils/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= llvmtransformutils SRCDIR= lib/Transforms/Utils @@ -29,6 +31,11 @@ SRCS= AddrModeMatcher.cpp \ UnifyFunctionExitNodes.cpp \ ValueMapper.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= SimplifyInstructions.cpp \ + Utils.cpp +.endif + TGHDRS= Intrinsics .include "../clang.lib.mk" Modified: user/attilio/vmcontention/lib/clang/libllvmx86disassembler/Makefile ============================================================================== --- user/attilio/vmcontention/lib/clang/libllvmx86disassembler/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/clang/libllvmx86disassembler/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -1,11 +1,17 @@ # $FreeBSD$ +.include + LIB= llvmx86disassembler SRCDIR= lib/Target/X86/Disassembler INCDIR= lib/Target/X86 SRCS= X86Disassembler.cpp +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= X86DisassemblerDecoder.c +.endif + TGHDRS= X86GenDisassemblerTables \ X86GenEDInfo \ X86GenInstrInfo \ Modified: user/attilio/vmcontention/lib/libc/powerpc/SYS.h ============================================================================== --- user/attilio/vmcontention/lib/libc/powerpc/SYS.h Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/libc/powerpc/SYS.h Tue Feb 7 11:28:40 2012 (r231126) @@ -33,38 +33,38 @@ #include #include -#define _SYSCALL(x) \ +#define _SYSCALL(name) \ .text; \ .align 2; \ - li 0,(__CONCAT(SYS_,x)); \ + li 0,(__CONCAT(SYS_, name)); \ sc -#define SYSCALL(x) \ +#define SYSCALL(name) \ .text; \ .align 2; \ 2: b PIC_PLT(CNAME(HIDENAME(cerror))); \ -ENTRY(__CONCAT(__sys_,x)); \ - WEAK_ALIAS(x,__CONCAT(__sys_,x)); \ - WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x)); \ - _SYSCALL(x); \ +ENTRY(__CONCAT(__sys_, name)); \ + WEAK_REFERENCE(__CONCAT(__sys_, name), name); \ + WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name));\ + _SYSCALL(name); \ bso 2b -#define PSEUDO(x) \ +#define PSEUDO(name) \ .text; \ .align 2; \ -ENTRY(__CONCAT(__sys_,x)); \ - WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x)); \ - _SYSCALL(x); \ +ENTRY(__CONCAT(__sys_, name)); \ + WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name));\ + _SYSCALL(name); \ bnslr; \ b PIC_PLT(CNAME(HIDENAME(cerror))) -#define RSYSCALL(x) \ +#define RSYSCALL(name) \ .text; \ .align 2; \ 2: b PIC_PLT(CNAME(HIDENAME(cerror))); \ -ENTRY(__CONCAT(__sys_,x)); \ - WEAK_ALIAS(x,__CONCAT(__sys_,x)); \ - WEAK_ALIAS(__CONCAT(_,x), __CONCAT(__sys_,x)); \ - _SYSCALL(x); \ +ENTRY(__CONCAT(__sys_, name)); \ + WEAK_REFERENCE(__CONCAT(__sys_, name), name); \ + WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name));\ + _SYSCALL(name); \ bnslr; \ b PIC_PLT(CNAME(HIDENAME(cerror))) Modified: user/attilio/vmcontention/lib/libc/powerpc/gen/setjmp.S ============================================================================== --- user/attilio/vmcontention/lib/libc/powerpc/gen/setjmp.S Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/libc/powerpc/gen/setjmp.S Tue Feb 7 11:28:40 2012 (r231126) @@ -69,7 +69,7 @@ ENTRY(setjmp) li %r3,0 /* return (0) */ blr - WEAK_ALIAS(longjmp, __longjmp) + WEAK_REFERENCE(CNAME(__longjmp), longjmp) ENTRY(__longjmp) lmw %r9,20(%r3) /* restore regs */ mr %r6,%r4 /* save val param */ Modified: user/attilio/vmcontention/lib/libc/powerpc64/SYS.h ============================================================================== --- user/attilio/vmcontention/lib/libc/powerpc64/SYS.h Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/libc/powerpc64/SYS.h Tue Feb 7 11:28:40 2012 (r231126) @@ -33,13 +33,13 @@ #include #include -#define _SYSCALL(x) \ +#define _SYSCALL(name) \ .text; \ .align 2; \ - li 0,(__CONCAT(SYS_,x)); \ + li 0,(__CONCAT(SYS_, name)); \ sc -#define SYSCALL(x) \ +#define SYSCALL(name) \ .text; \ .align 2; \ 2: mflr %r0; \ @@ -51,18 +51,18 @@ ld %r0,16(%r1); \ mtlr %r0; \ blr; \ -ENTRY(__CONCAT(__sys_,x)); \ - WEAK_ALIAS(x,__CONCAT(__sys_,x)); \ - WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x)); \ - _SYSCALL(x); \ +ENTRY(__CONCAT(__sys_, name)); \ + WEAK_REFERENCE(__CONCAT(__sys_, name), name); \ + WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name)); \ + _SYSCALL(name); \ bso 2b -#define PSEUDO(x) \ +#define PSEUDO(name) \ .text; \ .align 2; \ -ENTRY(__CONCAT(__sys_,x)); \ - WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x)); \ - _SYSCALL(x); \ +ENTRY(__CONCAT(__sys_, name)); \ + WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name)); \ + _SYSCALL(name); \ bnslr; \ mflr %r0; \ std %r0,16(%r1); \ @@ -74,13 +74,13 @@ ENTRY(__CONCAT(__sys_,x)); \ mtlr %r0; \ blr; -#define RSYSCALL(x) \ +#define RSYSCALL(name) \ .text; \ .align 2; \ -ENTRY(__CONCAT(__sys_,x)); \ - WEAK_ALIAS(x,__CONCAT(__sys_,x)); \ - WEAK_ALIAS(__CONCAT(_,x), __CONCAT(__sys_,x)); \ - _SYSCALL(x); \ +ENTRY(__CONCAT(__sys_, name)); \ + WEAK_REFERENCE(__CONCAT(__sys_, name), name); \ + WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name));\ + _SYSCALL(name); \ bnslr; \ \ mflr %r0; \ Modified: user/attilio/vmcontention/lib/libc/powerpc64/gen/setjmp.S ============================================================================== --- user/attilio/vmcontention/lib/libc/powerpc64/gen/setjmp.S Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/libc/powerpc64/gen/setjmp.S Tue Feb 7 11:28:40 2012 (r231126) @@ -93,7 +93,7 @@ ENTRY(setjmp) li %r3,0 /* return (0) */ blr - WEAK_ALIAS(longjmp, __longjmp) + WEAK_REFERENCE(__longjmp, longjmp) ENTRY(__longjmp) ld %r9,40 + 0*8(%r3) ld %r10,40 + 1*8(%r3) Modified: user/attilio/vmcontention/lib/libc/rpc/Makefile.inc ============================================================================== --- user/attilio/vmcontention/lib/libc/rpc/Makefile.inc Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/libc/rpc/Makefile.inc Tue Feb 7 11:28:40 2012 (r231126) @@ -34,7 +34,7 @@ CFLAGS+= -I${.CURDIR}/rpc CLEANFILES+= crypt_clnt.c crypt_xdr.c crypt.h RPCDIR= ${DESTDIR}/usr/include/rpcsvc -RPCGEN= rpcgen -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C crypt_clnt.c: ${RPCDIR}/crypt.x crypt.h ${RPCGEN} -l -o ${.TARGET} ${RPCDIR}/crypt.x Modified: user/attilio/vmcontention/lib/libc/yp/Makefile.inc ============================================================================== --- user/attilio/vmcontention/lib/libc/yp/Makefile.inc Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/libc/yp/Makefile.inc Tue Feb 7 11:28:40 2012 (r231126) @@ -10,7 +10,7 @@ CLEANFILES+= yp.h yp_xdr.c SYM_MAPS+= ${.CURDIR}/yp/Symbol.map RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x -RPCGEN= rpcgen -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C yp_xdr.c: ${RPCSRC} ${RPCGEN} -c -o ${.TARGET} ${RPCSRC} Modified: user/attilio/vmcontention/lib/librpcsvc/Makefile ============================================================================== --- user/attilio/vmcontention/lib/librpcsvc/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/librpcsvc/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -18,7 +18,7 @@ SECRPCSRCS= secretkey.c xcrypt.c OTHERSRCS+= yp_passwd.c yp_update.c .endif -RPCCOM = rpcgen -C +RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen -C INCDIRS= -I${DESTDIR}/usr/include/rpcsvc Modified: user/attilio/vmcontention/lib/libthr/thread/thr_list.c ============================================================================== --- user/attilio/vmcontention/lib/libthr/thread/thr_list.c Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/libthr/thread/thr_list.c Tue Feb 7 11:28:40 2012 (r231126) @@ -149,11 +149,16 @@ _thr_alloc(struct pthread *curthread) if (total_threads > MAX_THREADS) return (NULL); atomic_fetchadd_int(&total_threads, 1); - thread = malloc(sizeof(struct pthread)); + thread = calloc(1, sizeof(struct pthread)); if (thread == NULL) { atomic_fetchadd_int(&total_threads, -1); return (NULL); } + thread->sleepqueue = _sleepq_alloc(); + thread->wake_addr = _thr_alloc_wake_addr(); + } else { + bzero(&thread->_pthread_startzero, + __rangeof(struct pthread, _pthread_startzero, _pthread_endzero)); } if (curthread != NULL) { THR_LOCK_ACQUIRE(curthread, &tcb_lock); @@ -163,10 +168,7 @@ _thr_alloc(struct pthread *curthread) tcb = _tcb_ctor(thread, 1 /* initial tls */); } if (tcb != NULL) { - memset(thread, 0, sizeof(*thread)); thread->tcb = tcb; - thread->sleepqueue = _sleepq_alloc(); - thread->wake_addr = _thr_alloc_wake_addr(); } else { thr_destroy(curthread, thread); atomic_fetchadd_int(&total_threads, -1); @@ -194,8 +196,6 @@ _thr_free(struct pthread *curthread, str } thread->tcb = NULL; if ((curthread == NULL) || (free_thread_count >= MAX_CACHED_THREADS)) { - _sleepq_free(thread->sleepqueue); - _thr_release_wake_addr(thread->wake_addr); thr_destroy(curthread, thread); atomic_fetchadd_int(&total_threads, -1); } else { @@ -213,6 +213,10 @@ _thr_free(struct pthread *curthread, str static void thr_destroy(struct pthread *curthread __unused, struct pthread *thread) { + if (thread->sleepqueue != NULL) + _sleepq_free(thread->sleepqueue); + if (thread->wake_addr != NULL) + _thr_release_wake_addr(thread->wake_addr); free(thread); } Modified: user/attilio/vmcontention/lib/libthr/thread/thr_private.h ============================================================================== --- user/attilio/vmcontention/lib/libthr/thread/thr_private.h Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/libthr/thread/thr_private.h Tue Feb 7 11:28:40 2012 (r231126) @@ -343,6 +343,7 @@ struct pthread_key { * Thread structure. */ struct pthread { +#define _pthread_startzero tid /* Kernel thread id. */ long tid; #define TID_TERMINATED 1 @@ -506,12 +507,6 @@ struct pthread { /* Event */ td_event_msg_t event_buf; - struct wake_addr *wake_addr; -#define WAKE_ADDR(td) ((td)->wake_addr) - - /* Sleep queue */ - struct sleepqueue *sleepqueue; - /* Wait channel */ void *wchan; @@ -526,6 +521,14 @@ struct pthread { /* Deferred threads from pthread_cond_signal. */ unsigned int *defer_waiters[MAX_DEFER_WAITERS]; +#define _pthread_endzero wake_addr + + struct wake_addr *wake_addr; +#define WAKE_ADDR(td) ((td)->wake_addr) + + /* Sleep queue */ + struct sleepqueue *sleepqueue; + }; #define THR_SHOULD_GC(thrd) \ Modified: user/attilio/vmcontention/lib/libutil/pidfile.c ============================================================================== --- user/attilio/vmcontention/lib/libutil/pidfile.c Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/libutil/pidfile.c Tue Feb 7 11:28:40 2012 (r231126) @@ -124,7 +124,7 @@ pidfile_open(const char *path, mode_t mo * pidfile_write() can be called multiple times. */ fd = flopen(pfh->pf_path, - O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode); + O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK, mode); if (fd == -1) { if (errno == EWOULDBLOCK && pidptr != NULL) { count = 20; Modified: user/attilio/vmcontention/lib/libypclnt/Makefile ============================================================================== --- user/attilio/vmcontention/lib/libypclnt/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/lib/libypclnt/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -22,7 +22,7 @@ GENSRCS=yp.h \ yppasswd_private_clnt.c \ yppasswd_private_xdr.c -RPCGEN= rpcgen -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C RPCSRC= ${.CURDIR}/../../include/rpcsvc/yp.x RPCSRC_PW= ${.CURDIR}/../../include/rpcsvc/yppasswd.x RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x Modified: user/attilio/vmcontention/libexec/ypxfr/Makefile ============================================================================== --- user/attilio/vmcontention/libexec/ypxfr/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/libexec/ypxfr/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -22,7 +22,7 @@ LDADD= -lrpcsvc CLEANFILES= ${GENSRCS} RPCDIR= ${.CURDIR}/../../include/rpcsvc -RPCGEN= rpcgen -I -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C ypxfr_clnt.c: ${RPCDIR}/yp.x rm -f ${.TARGET} Modified: user/attilio/vmcontention/release/picobsd/tinyware/passwd/Makefile ============================================================================== --- user/attilio/vmcontention/release/picobsd/tinyware/passwd/Makefile Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/release/picobsd/tinyware/passwd/Makefile Tue Feb 7 11:28:40 2012 (r231126) @@ -26,7 +26,7 @@ CFLAGS+= -DLOGIN_CAP -DCRYPT -I. -I${.CU CLEANFILES= ${GENSRCS} -RPCGEN= rpcgen -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x RPCSRC_PW= ${DESTDIR}/usr/include/rpcsvc/yppasswd.x RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x Modified: user/attilio/vmcontention/release/rc.local ============================================================================== --- user/attilio/vmcontention/release/rc.local Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/release/rc.local Tue Feb 7 11:28:40 2012 (r231126) @@ -8,17 +8,23 @@ : ${DIALOG_ITEM_HELP=4} : ${DIALOG_ESC=255} +MACHINE=`uname -m` + kbdcontrol -d >/dev/null 2>&1 if [ $? -eq 0 ]; then # Syscons: use xterm, start interesting things on other VTYs - TERM=xterm + if [ ${MACHINE} = "pc98" ]; then + TERM=cons25w + else + TERM=xterm + fi if [ -z "$EXTERNAL_VTY_STARTED" ]; then # Init will clean these processes up if/when the system # goes multiuser touch /tmp/bsdinstall_log tail -f /tmp/bsdinstall_log > /dev/ttyv2 & - /usr/libexec/getty autologin ttyv3 + /usr/libexec/getty autologin ttyv3 & EXTERNAL_VTY_STARTED=1 fi else @@ -31,6 +37,7 @@ else echo " ansi Standard ANSI terminal" echo " vt100 VT100 or compatible terminal" echo " xterm xterm terminal emulator (or compatible)" + echo " cons25w cons25w terminal" echo echo -n "Console type [vt100]: " read TERM Modified: user/attilio/vmcontention/sbin/fsdb/fsdbutil.c ============================================================================== --- user/attilio/vmcontention/sbin/fsdb/fsdbutil.c Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/sbin/fsdb/fsdbutil.c Tue Feb 7 11:28:40 2012 (r231126) @@ -293,22 +293,21 @@ printblocks(ino_t inum, union dinode *dp printf("Blocks for inode %d:\n", inum); printf("Direct blocks:\n"); ndb = howmany(DIP(dp, di_size), sblock.fs_bsize); - for (i = 0; i < NDADDR; i++) { - if (DIP(dp, di_db[i]) == 0) { - putchar('\n'); - return; - } + for (i = 0; i < NDADDR && i < ndb; i++) { if (i > 0) printf(", "); blkno = DIP(dp, di_db[i]); printf("%jd", (intmax_t)blkno); - if (--ndb == 0 && (offset = blkoff(&sblock, DIP(dp, di_size))) != 0) { + } + if (ndb <= NDADDR) { + offset = blkoff(&sblock, DIP(dp, di_size)); + if (offset != 0) { nfrags = numfrags(&sblock, fragroundup(&sblock, offset)); printf(" (%d frag%s)", nfrags, nfrags > 1? "s": ""); } } putchar('\n'); - if (ndb == 0) + if (ndb <= NDADDR) return; bufp = malloc((unsigned int)sblock.fs_bsize); Modified: user/attilio/vmcontention/sbin/hastd/primary.c ============================================================================== --- user/attilio/vmcontention/sbin/hastd/primary.c Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/sbin/hastd/primary.c Tue Feb 7 11:28:40 2012 (r231126) @@ -1255,7 +1255,7 @@ ggate_recv_thread(void *arg) pjdlog_debug(2, "ggate_recv: (%p) Moving request to the send queues.", hio); refcount_init(&hio->hio_countdown, ncomps); - for (ii = ncomp; ii < ncomps; ii++) + for (ii = ncomp; ii < ncomp + ncomps; ii++) QUEUE_INSERT1(hio, send, ii); } /* NOTREACHED */ @@ -1326,7 +1326,8 @@ local_send_thread(void *arg) } else { hio->hio_errors[ncomp] = 0; if (hio->hio_replication == - HAST_REPLICATION_ASYNC) { + HAST_REPLICATION_ASYNC && + !ISSYNCREQ(hio)) { ggio->gctl_error = 0; write_complete(res, hio); } Modified: user/attilio/vmcontention/sbin/ipfw/ipfw.8 ============================================================================== --- user/attilio/vmcontention/sbin/ipfw/ipfw.8 Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/sbin/ipfw/ipfw.8 Tue Feb 7 11:28:40 2012 (r231126) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 10, 2011 +.Dd February 6, 2012 .Dt IPFW 8 .Os .Sh NAME @@ -1652,10 +1652,12 @@ option for details on matching fragmente TCP packets only. Match if the TCP header sequence number field is set to .Ar seq . -.It Cm tcpwin Ar win -TCP packets only. -Match if the TCP header window field is set to -.Ar win . +.It Cm tcpwin Ar tcpwin-list +Matches TCP packets whose header window field is set to +.Ar tcpwin-list , +which is either a single value or a list of values or ranges +specified in the same way as +.Ar ports . .It Cm tcpoptions Ar spec TCP packets only. Match if the TCP header contains the comma separated list of Modified: user/attilio/vmcontention/sbin/ipfw/ipfw2.c ============================================================================== --- user/attilio/vmcontention/sbin/ipfw/ipfw2.c Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/sbin/ipfw/ipfw2.c Tue Feb 7 11:28:40 2012 (r231126) @@ -512,6 +512,7 @@ static struct _s_x _port_name[] = { {"ipttl", O_IPTTL}, {"mac-type", O_MAC_TYPE}, {"tcpdatalen", O_TCPDATALEN}, + {"tcpwin", O_TCPWIN}, {"tagged", O_TAGGED}, {NULL, 0} }; @@ -1480,7 +1481,11 @@ show_ipfw(struct ip_fw *rule, int pcwidt break; case O_TCPWIN: - printf(" tcpwin %d", ntohs(cmd->arg1)); + if (F_LEN(cmd) == 1) + printf(" tcpwin %u", cmd->arg1); + else + print_newports((ipfw_insn_u16 *)cmd, 0, + O_TCPWIN); break; case O_TCPACK: @@ -3447,8 +3452,12 @@ read_options: case TOK_TCPWIN: NEED1("tcpwin requires length"); - fill_cmd(cmd, O_TCPWIN, 0, - htons(strtoul(*av, NULL, 0))); + if (strpbrk(*av, "-,")) { + if (!add_ports(cmd, *av, 0, O_TCPWIN)) + errx(EX_DATAERR, "invalid tcpwin len %s", *av); + } else + fill_cmd(cmd, O_TCPWIN, 0, + strtoul(*av, NULL, 0)); av++; break; Modified: user/attilio/vmcontention/sbin/route/route.c ============================================================================== --- user/attilio/vmcontention/sbin/route/route.c Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/sbin/route/route.c Tue Feb 7 11:28:40 2012 (r231126) @@ -460,8 +460,8 @@ netname(struct sockaddr *sa) * Guess at the subnet mask, assuming reasonable * width subnet fields. */ - while (in.s_addr &~ mask) - mask = (long)mask >> subnetshift; + while (in.s_addr & ~mask) + mask |= mask >> subnetshift; net = in.s_addr & mask; while ((mask & 1) == 0) mask >>= 1, net >>= 1; Modified: user/attilio/vmcontention/share/man/man4/tcp.4 ============================================================================== --- user/attilio/vmcontention/share/man/man4/tcp.4 Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/share/man/man4/tcp.4 Tue Feb 7 11:28:40 2012 (r231126) @@ -38,7 +38,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd November 14, 2011 +.Dd February 5, 2012 .Dt TCP 4 .Os .Sh NAME @@ -146,6 +146,65 @@ connection. See .Xr mod_cc 4 for details. +.It Dv TCP_KEEPINIT +This write-only +.Xr setsockopt 2 +option accepts a per-socket timeout argument of +.Vt "u_int" +in seconds, for new, non-established +.Tn TCP +connections. +For the global default in milliseconds see +.Va keepinit +in the +.Sx MIB Variables +section further down. +.It Dv TCP_KEEPIDLE +This write-only +.Xr setsockopt 2 +option accepts an argument of +.Vt "u_int" +for the amount of time, in seconds, that the connection must be idle +before keepalive probes (if enabled) are sent for the connection of this +socket. +If set on a listening socket, the value is inherited by the newly created +socket upon +.Xr accept 2 . +For the global default in milliseconds see +.Va keepidle +in the +.Sx MIB Variables +section further down. +.It Dv TCP_KEEPINTVL +This write-only +.Xr setsockopt 2 +option accepts an argument of +.Vt "u_int" +to set the per-socket interval, in seconds, between keepalive probes sent +to a peer. +If set on a listening socket, the value is inherited by the newly created +socket upon +.Xr accept 2 . +For the global default in milliseconds see +.Va keepintvl +in the +.Sx MIB Variables +section further down. +.It Dv TCP_KEEPCNT +This write-only +.Xr setsockopt 2 +option accepts an argument of +.Vt "u_int" +and allows a per-socket tuning of the number of probes sent, with no response, +before the connection will be dropped. +If set on a listening socket, the value is inherited by the newly created +socket upon +.Xr accept 2 . +For the global default see the +.Va keepcnt +in the +.Sx MIB Variables +section further down. .It Dv TCP_NODELAY Under most circumstances, .Tn TCP @@ -296,17 +355,21 @@ The Maximum Segment Lifetime, in millise Timeout, in milliseconds, for new, non-established .Tn TCP connections. +The default is 75000 msec. .It Va keepidle Amount of time, in milliseconds, that the connection must be idle before keepalive probes (if enabled) are sent. +The default is 7200000 msec (2 hours). .It Va keepintvl The interval, in milliseconds, between keepalive probes sent to remote machines, when no response is received on a .Va keepidle probe. -After -.Dv TCPTV_KEEPCNT -(default 8) probes are sent, with no response, the connection is dropped. +The default is 75000 msec. +.It Va keepcnt +Number of probes sent, with no response, before a connection +is dropped. +The default is 8 packets. .It Va always_keepalive Assume that .Dv SO_KEEPALIVE Modified: user/attilio/vmcontention/share/man/man5/src.conf.5 ============================================================================== --- user/attilio/vmcontention/share/man/man5/src.conf.5 Tue Feb 7 11:25:35 2012 (r231125) +++ user/attilio/vmcontention/share/man/man5/src.conf.5 Tue Feb 7 11:28:40 2012 (r231126) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd January 13, 2012 +.Dd February 6, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -271,12 +271,21 @@ Set to not build the Clang C/C++ compile .Pp It is a default setting on arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb and sparc64/sparc64. +When set, it also enforces the following options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_CLANG_EXTRAS +.El .It Va WITH_CLANG .\" from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru Set to build the Clang C/C++ compiler. .Pp It is a default setting on amd64/amd64, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. +.It Va WITH_CLANG_EXTRAS +.\" $FreeBSD$ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Feb 7 11:40:39 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37E871065686; Tue, 7 Feb 2012 11:40:39 +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 1BD8B8FC0C; Tue, 7 Feb 2012 11:40:39 +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 q17BecsH087765; Tue, 7 Feb 2012 11:40:38 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q17BecEF087761; Tue, 7 Feb 2012 11:40:38 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201202071140.q17BecEF087761@svn.freebsd.org> From: Gabor Kovesdan Date: Tue, 7 Feb 2012 11:40:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231127 - user/gabor/tre-integration/contrib/tre/lib X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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, 07 Feb 2012 11:40:39 -0000 Author: gabor Date: Tue Feb 7 11:40:38 2012 New Revision: 231127 URL: http://svn.freebsd.org/changeset/base/231127 Log: - Complete the Wu-Manber algorithm. Still untested and dependent code is incomplete. Modified: user/gabor/tre-integration/contrib/tre/lib/mregcomp.c user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.c Modified: user/gabor/tre-integration/contrib/tre/lib/mregcomp.c ============================================================================== --- user/gabor/tre-integration/contrib/tre/lib/mregcomp.c Tue Feb 7 11:28:40 2012 (r231126) +++ user/gabor/tre-integration/contrib/tre/lib/mregcomp.c Tue Feb 7 11:40:38 2012 (r231127) @@ -46,6 +46,13 @@ __weak_reference(tre_mregwncomp, mregwnc __weak_reference(tre_mregfree, mregfree); #endif +/* TODO: + * + * - compilation + * - REG_ICASE + * - Test + */ + int tre_mcompile(mregex_t *preg, size_t nr, const char *regex[], size_t n[], int cflags) @@ -78,7 +85,7 @@ tre_mregncomp(mregex_t *preg, size_t nr, goto fail; } - // XXX ret = tre_mcompile(preg, nr, regex, n, cflags); + ret = tre_mcompile(preg, nr, regex, n, cflags); fail: for (int j = 0; j++; j < i) @@ -136,7 +143,7 @@ tre_mregwcomp(mregex_t *preg, size_t nr, void tre_mregfree(mregex_t *preg) { - + wmfree(preg); } /* EOF */ Modified: user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.c ============================================================================== --- user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.c Tue Feb 7 11:28:40 2012 (r231126) +++ user/gabor/tre-integration/contrib/tre/lib/tre-mfastmatch.c Tue Feb 7 11:40:38 2012 (r231127) @@ -32,13 +32,6 @@ #include "tre-mfastmatch.h" #include "xmalloc.h" -/* TODO: - * - * - REG_ICASE - * - Store pattern and sizes in pat/wpat/siz/wsiz - * - Test - */ - #define WM_B 2 #define ALLOC(var, siz) \ @@ -138,6 +131,24 @@ } \ xfree(entry); +#ifdef _SAVE_PATTERNS(dst, s) \ + do \ + { \ + ALLOC(dst, sizeof(tre_char_t *) * nr); \ + ALLOC(s, sizeof(size_t) * nr); \ + for (int i = 0; i < nr; i++) \ + { \ + ALLOC(dst[i], n[i]); \ + memcpy(dst[i], regex[i], n[i] * sizeof(tre_char_t)); \ + s[i] = n[i]; \ + } \ + } while (0); + +#define SAVE_PATTERNS \ + _SAVE_PATTERNS(wm->pat, wm->siz) +#define SAVE_PATTERNS_WIDE \ + _SAVE_PATTERNS(wm->wpat, wm->wsiz) + #ifdef TRE_WCHAR #define PROC_WM(par_arr, size_arr) \ _PROC_WM(pat_arr, size_arr, 1, shift, m) @@ -174,7 +185,7 @@ tre_wmcomp(mregex_t *preg, size_t nr, co PROC_WM_WIDE(regex, n); ALLOC(bregex, sizeof(char *) * nr); - ALLOC(bn, sizeof(int) * nr); + ALLOC(bn, sizeof(size_t) * nr); for (int i = 0; i < nr; i++) { @@ -189,30 +200,31 @@ tre_wmcomp(mregex_t *preg, size_t nr, co goto fail; } } + + wm->wpat = bregex; + wm->wsize = bn; + PROC_WM(bregex, bn); for (int i = 0; i < nr; i++) xfree(bregex[i]); xfree(bregex); + + SAVE_PATTERNS; + SAVE_PATTERNS_WIDE; #else PROC_WM(regex, n); + SAVE_PATTERNS; #endif preg->searchdata = &wm; return REG_OK; fail: #ifdef TRE_WCHAR - if (wm->wshift) - hashtable_free(wm->wshift); - if (bregex) - { - for (int i = 0; i < nr; i++) - if (bregex[i] - xfree(bregex[i]); - xfree(bregex); - } + if (wm->whash) + hashtable_free(wm->whash); #endif - if (wm->shift) - hashtable_free(wm->shift); + if (wm->hash) + hashtable_free(wm->hash); if (wm) xfree(wm); if (entry) @@ -260,7 +272,8 @@ fail: if (pats[idx][k] != data[pos - mlen + k]) \ break; \ if (k == sizes[idx]) \ - // XXX: match \ + MATCH(pos - mlen, pos - mlen + sizes[idx], \ + idx); \ } \ } \ else \ @@ -289,7 +302,7 @@ tre_wmexec(const void *str, size_t len, tre_char_t *wide_str = str; char *byte_str = str; size_t pos = preg->m; - size_T shift; + size_t shift; int ret; int err = REG_NOMATCH; From owner-svn-src-user@FreeBSD.ORG Fri Feb 10 18:31:36 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA4E91065677; Fri, 10 Feb 2012 18:31:36 +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 A023B8FC08; Fri, 10 Feb 2012 18:31:36 +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 q1AIVaJk087367; Fri, 10 Feb 2012 18:31:36 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1AIVa36087333; Fri, 10 Feb 2012 18:31:36 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201202101831.q1AIVa36087333@svn.freebsd.org> From: Attilio Rao Date: Fri, 10 Feb 2012 18:31:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231394 - in user/attilio/vmcontention: cddl/contrib/opensolaris/cmd/zfs contrib/gcc etc etc/defaults etc/periodic/daily etc/rc.d lib/libc/gen lib/libc/net lib/libc/sys lib/libprocstat ... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 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, 10 Feb 2012 18:31:36 -0000 Author: attilio Date: Fri Feb 10 18:31:35 2012 New Revision: 231394 URL: http://svn.freebsd.org/changeset/base/231394 Log: MFC Added: user/attilio/vmcontention/share/man/man3/offsetof.3 - copied unchanged from r231393, head/share/man/man3/offsetof.3 Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c user/attilio/vmcontention/contrib/gcc/gcc.c user/attilio/vmcontention/etc/Makefile user/attilio/vmcontention/etc/defaults/periodic.conf user/attilio/vmcontention/etc/defaults/rc.conf user/attilio/vmcontention/etc/periodic/daily/404.status-zfs user/attilio/vmcontention/etc/rc.d/devfs user/attilio/vmcontention/etc/rc.resume user/attilio/vmcontention/etc/rc.suspend user/attilio/vmcontention/lib/libc/gen/directory.3 user/attilio/vmcontention/lib/libc/net/eui64.3 user/attilio/vmcontention/lib/libc/sys/jail.2 user/attilio/vmcontention/lib/libprocstat/common_kvm.c user/attilio/vmcontention/lib/libthr/arch/mips/include/pthread_md.h user/attilio/vmcontention/lib/libthr/arch/mips/mips/pthread_md.c user/attilio/vmcontention/lib/libutil/login_class.c user/attilio/vmcontention/lib/libutil/pidfile.3 user/attilio/vmcontention/lib/libutil/pw_util.c user/attilio/vmcontention/libexec/rtld-elf/mips/reloc.c user/attilio/vmcontention/libexec/rtld-elf/mips/rtld_machdep.h user/attilio/vmcontention/libexec/rtld-elf/rtld.c user/attilio/vmcontention/sbin/fsck_ffs/fsck_ffs.8 user/attilio/vmcontention/sbin/fsck_ffs/setup.c user/attilio/vmcontention/sbin/reboot/nextboot.sh user/attilio/vmcontention/share/man/man3/Makefile user/attilio/vmcontention/share/man/man4/ada.4 user/attilio/vmcontention/share/man/man4/cd.4 user/attilio/vmcontention/share/man/man4/da.4 user/attilio/vmcontention/share/man/man4/ed.4 user/attilio/vmcontention/share/man/man4/lmc.4 user/attilio/vmcontention/share/man/man4/mps.4 user/attilio/vmcontention/share/man/man4/sbp.4 user/attilio/vmcontention/share/man/man4/sdhci.4 user/attilio/vmcontention/share/man/man4/sfxge.4 user/attilio/vmcontention/share/man/man4/u3g.4 user/attilio/vmcontention/share/man/man4/usb_quirk.4 user/attilio/vmcontention/share/man/man5/devfs.5 user/attilio/vmcontention/share/man/man5/periodic.conf.5 user/attilio/vmcontention/share/man/man5/portindex.5 user/attilio/vmcontention/share/man/man5/rc.conf.5 user/attilio/vmcontention/share/man/man7/ports.7 user/attilio/vmcontention/share/man/man7/security.7 user/attilio/vmcontention/share/man/man9/DEVICE_PROBE.9 user/attilio/vmcontention/share/man/man9/devtoname.9 user/attilio/vmcontention/share/misc/committers-ports.dot user/attilio/vmcontention/sys/amd64/acpica/acpi_wakeup.c user/attilio/vmcontention/sys/amd64/amd64/apic_vector.S user/attilio/vmcontention/sys/boot/pc98/loader/Makefile user/attilio/vmcontention/sys/compat/linux/linux_stats.c user/attilio/vmcontention/sys/compat/linux/linux_util.c user/attilio/vmcontention/sys/compat/linux/linux_util.h user/attilio/vmcontention/sys/dev/acpica/acpi.c user/attilio/vmcontention/sys/dev/acpica/acpi_ec.c user/attilio/vmcontention/sys/dev/acpica/acpi_hpet.c user/attilio/vmcontention/sys/dev/acpica/acpi_timer.c user/attilio/vmcontention/sys/dev/acpica/acpivar.h user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416.h user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c user/attilio/vmcontention/sys/dev/ath/if_ath.c user/attilio/vmcontention/sys/dev/ath/if_athvar.h user/attilio/vmcontention/sys/dev/bge/if_bge.c user/attilio/vmcontention/sys/dev/cxgb/cxgb_main.c user/attilio/vmcontention/sys/dev/cxgb/cxgb_sge.c user/attilio/vmcontention/sys/dev/cxgbe/t4_main.c user/attilio/vmcontention/sys/dev/isci/isci.h (contents, props changed) user/attilio/vmcontention/sys/dev/isci/isci_io_request.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/isci_remote_device.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_abort_task_set.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_controller.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_stp_request.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_controller.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_controller_state_handlers.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_domain.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_io_request.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_remote_device.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_remote_device_ready_substates.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_smp_io_request.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_smp_remote_device.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_stp_io_request.c (contents, props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_stp_task_request.c (contents, props changed) user/attilio/vmcontention/sys/dev/iscsi/initiator/isc_sm.c user/attilio/vmcontention/sys/dev/mps/mps.c user/attilio/vmcontention/sys/dev/mps/mps_sas.c user/attilio/vmcontention/sys/dev/mps/mps_sas.h user/attilio/vmcontention/sys/dev/mps/mps_sas_lsi.c user/attilio/vmcontention/sys/dev/mps/mps_user.c user/attilio/vmcontention/sys/dev/mps/mpsvar.h 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/netmap/if_em_netmap.h user/attilio/vmcontention/sys/dev/netmap/if_igb_netmap.h user/attilio/vmcontention/sys/dev/netmap/if_lem_netmap.h user/attilio/vmcontention/sys/dev/netmap/if_re_netmap.h user/attilio/vmcontention/sys/dev/netmap/ixgbe_netmap.h user/attilio/vmcontention/sys/dev/netmap/netmap.c user/attilio/vmcontention/sys/dev/netmap/netmap_kern.h user/attilio/vmcontention/sys/dev/sdhci/sdhci.c user/attilio/vmcontention/sys/dev/sdhci/sdhci.h user/attilio/vmcontention/sys/dev/sound/pcm/mixer.c user/attilio/vmcontention/sys/dev/usb/usb_dev.c user/attilio/vmcontention/sys/dev/wtap/if_wtap.c user/attilio/vmcontention/sys/fs/devfs/devfs.h user/attilio/vmcontention/sys/fs/devfs/devfs_devs.c user/attilio/vmcontention/sys/fs/devfs/devfs_rule.c user/attilio/vmcontention/sys/fs/devfs/devfs_vfsops.c user/attilio/vmcontention/sys/fs/ext2fs/ext2_dinode.h user/attilio/vmcontention/sys/fs/ext2fs/ext2fs.h user/attilio/vmcontention/sys/fs/ext2fs/inode.h user/attilio/vmcontention/sys/fs/nfsclient/nfs_clstate.c user/attilio/vmcontention/sys/fs/nullfs/null_vfsops.c user/attilio/vmcontention/sys/geom/part/g_part_apm.c user/attilio/vmcontention/sys/geom/part/g_part_mbr.c user/attilio/vmcontention/sys/ia64/ia64/vm_machdep.c user/attilio/vmcontention/sys/kern/kern_conf.c user/attilio/vmcontention/sys/kern/kern_fork.c user/attilio/vmcontention/sys/kern/kern_jail.c user/attilio/vmcontention/sys/kern/kern_tc.c user/attilio/vmcontention/sys/kern/sys_process.c user/attilio/vmcontention/sys/kern/sysv_shm.c user/attilio/vmcontention/sys/kern/vfs_cluster.c user/attilio/vmcontention/sys/mips/include/mips_opcode.h user/attilio/vmcontention/sys/mips/mips/trap.c user/attilio/vmcontention/sys/mips/mips/vm_machdep.c user/attilio/vmcontention/sys/modules/isci/Makefile (contents, props changed) user/attilio/vmcontention/sys/net/if.c user/attilio/vmcontention/sys/net/if_bridge.c user/attilio/vmcontention/sys/net/if_var.h user/attilio/vmcontention/sys/net/netmap.h user/attilio/vmcontention/sys/net/netmap_user.h user/attilio/vmcontention/sys/net80211/ieee80211.h user/attilio/vmcontention/sys/netgraph/ng_device.c user/attilio/vmcontention/sys/netinet/ip_carp.c user/attilio/vmcontention/sys/pc98/conf/GENERIC user/attilio/vmcontention/sys/powerpc/ofw/ofw_pci.c user/attilio/vmcontention/sys/security/mac_biba/mac_biba.c user/attilio/vmcontention/sys/security/mac_lomac/mac_lomac.c user/attilio/vmcontention/sys/security/mac_mls/mac_mls.c user/attilio/vmcontention/sys/sys/conf.h user/attilio/vmcontention/sys/sys/diskmbr.h user/attilio/vmcontention/sys/sys/jail.h user/attilio/vmcontention/sys/sys/proc.h user/attilio/vmcontention/sys/sys/ptrace.h user/attilio/vmcontention/sys/sys/vnode.h user/attilio/vmcontention/sys/ufs/ffs/ffs_vfsops.c user/attilio/vmcontention/sys/ufs/ffs/ffs_vnops.c user/attilio/vmcontention/sys/vm/swap_pager.c user/attilio/vmcontention/tools/tools/netmap/pkt-gen.c user/attilio/vmcontention/usr.bin/calendar/calendars/calendar.freebsd user/attilio/vmcontention/usr.sbin/jail/jail.8 user/attilio/vmcontention/usr.sbin/pkg_install/create/perform.c user/attilio/vmcontention/usr.sbin/tzsetup/tzsetup.c user/attilio/vmcontention/usr.sbin/vipw/vipw.8 user/attilio/vmcontention/usr.sbin/wpa/hostapd/hostapd.8 Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/contrib/gcc/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/lib/libutil/ (props changed) user/attilio/vmcontention/sbin/ (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/dev/isci/README (props changed) user/attilio/vmcontention/sys/dev/isci/environment.h (props changed) user/attilio/vmcontention/sys/dev/isci/isci.c (props changed) user/attilio/vmcontention/sys/dev/isci/isci_controller.c (props changed) user/attilio/vmcontention/sys/dev/isci/isci_domain.c (props changed) user/attilio/vmcontention/sys/dev/isci/isci_interrupt.c (props changed) user/attilio/vmcontention/sys/dev/isci/isci_logger.c (props changed) user/attilio/vmcontention/sys/dev/isci/isci_oem_parameters.c (props changed) user/attilio/vmcontention/sys/dev/isci/isci_sysctl.c (props changed) user/attilio/vmcontention/sys/dev/isci/isci_task_request.c (props changed) user/attilio/vmcontention/sys/dev/isci/isci_timer.c (props changed) user/attilio/vmcontention/sys/dev/isci/sci_environment.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/intel_ata.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/intel_pci.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/intel_sas.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/intel_sat.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/intel_sata.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/intel_scsi.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_abort_task_set.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_atapi.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_atapi.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_callbacks.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_design.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_device.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_device.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_inquiry.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_inquiry.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_log_sense.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_log_sense.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_lun_reset.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_lun_reset.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_mode_pages.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_mode_pages.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_mode_select.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_mode_select.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_mode_sense.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_mode_sense.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_mode_sense_10.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_mode_sense_10.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_mode_sense_6.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_mode_sense_6.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_move.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_move.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_passthrough.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_passthrough.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_read.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_read.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_read_buffer.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_read_buffer.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_read_capacity.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_read_capacity.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_reassign_blocks.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_reassign_blocks.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_report_luns.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_report_luns.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_request_sense.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_request_sense.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_start_stop_unit.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_start_stop_unit.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_synchronize_cache.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_synchronize_cache.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_test_unit_ready.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_test_unit_ready.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_translator_sequence.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_types.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_unmap.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_unmap.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_util.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_util.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_verify.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_verify.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_write.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_write.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_write_and_verify.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_write_and_verify.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_write_buffer.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_write_buffer.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_write_long.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sati_write_long.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_abstract_list.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_abstract_list.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_controller.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_controller.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_domain.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_domain.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_iterator.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_iterator.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_library.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_library.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_logger.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_logger.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_memory_descriptor_list.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_memory_descriptor_list.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_memory_descriptor_list_decorator.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_object.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_object.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_observer.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_observer.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_phy.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_phy.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_port.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_port.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_remote_device.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_remote_device.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_request.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_state.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_state_machine.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_state_machine.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_state_machine_logger.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_state_machine_logger.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_state_machine_observer.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_state_machine_observer.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_subject.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_base_subject.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_controller.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_controller_constants.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_fast_list.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_iterator.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_library.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_logger.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_memory_descriptor_list.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_memory_descriptor_list_decorator.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_object.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_overview.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_pool.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_simple_list.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_status.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_types.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_util.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/sci_util.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_config_parameters.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_controller.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_io_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_library.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_logger.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_overview.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_phy.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_port.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_remote_device.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_controller.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_controller_registers.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_library.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_library.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_logger.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_pci.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_pci.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_phy.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_phy.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_phy_registers.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_port.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_port.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_port_configuration_agent.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_port_configuration_agent.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_port_registers.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_remote_device.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_remote_device.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_remote_node_context.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_remote_node_context.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_remote_node_table.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_remote_node_table.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_request.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_sgpio.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_smp_remote_device.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_smp_request.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_smp_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_ssp_request.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_stp_packet_request.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_stp_packet_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_stp_pio_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_stp_remote_device.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_stp_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_unsolicited_frame_control.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sds_unsolicited_frame_control.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_sgpio.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_task_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scic_user_callback.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_config_parameters.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_controller.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_domain.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_io_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_library.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_logger.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_overview.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_remote_device.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_constants.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_controller.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_controller_states.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_design.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_domain.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_domain_state_handlers.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_domain_states.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_high_priority_request_queue.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_high_priority_request_queue.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_internal_io_request.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_internal_io_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_io_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_io_request_state_handlers.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_io_request_states.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_library.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_library.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_logger.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_remote_device.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_remote_device_ready_substate_handlers.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_remote_device_starting_substate_handlers.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_remote_device_starting_substates.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_remote_device_state_handlers.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_remote_device_states.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_request.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_sati_binding.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_smp_activity_clear_affiliation.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_smp_io_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_smp_phy.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_smp_phy.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_smp_remote_device.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_stp_io_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_stp_remote_device.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_stp_remote_device.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_stp_task_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_task_request.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_task_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_task_request_state_handlers.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_task_request_states.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_sas_timer.c (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_task_request.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scif_user_callback.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scu_bios_definitions.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scu_completion_codes.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scu_constants.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scu_event_codes.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scu_registers.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scu_remote_node_context.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scu_task_context.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scu_unsolicited_frame.h (props changed) user/attilio/vmcontention/sys/dev/isci/scil/scu_viit_data.h (props changed) user/attilio/vmcontention/sys/dev/isci/types.h (props changed) user/attilio/vmcontention/usr.bin/calendar/ (props changed) Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Fri Feb 10 18:31:35 2012 (r231394) @@ -590,7 +590,7 @@ zfs_do_clone(int argc, char **argv) zfs_handle_t *zhp = NULL; boolean_t parents = B_FALSE; nvlist_t *props; - int ret; + int ret = 0; int c; if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) @@ -1052,7 +1052,7 @@ destroy_print_cb(zfs_handle_t *zhp, void static int destroy_print_snapshots(zfs_handle_t *fs_zhp, destroy_cbdata_t *cb) { - int err; + int err = 0; assert(cb->cb_firstsnap == NULL); assert(cb->cb_prevsnap == NULL); err = zfs_iter_snapshots_sorted(fs_zhp, destroy_print_cb, cb); @@ -1130,7 +1130,7 @@ destroy_clones(destroy_cbdata_t *cb) ZFS_TYPE_SNAPSHOT); if (zhp != NULL) { boolean_t defer = cb->cb_defer_destroy; - int err; + int err = 0; /* * We can't defer destroy non-snapshots, so set it to @@ -1207,7 +1207,7 @@ zfs_do_destroy(int argc, char **argv) at = strchr(argv[0], '@'); if (at != NULL) { - int err; + int err = 0; /* Build the list of snaps to destroy in cb_nvl. */ if (nvlist_alloc(&cb.cb_nvl, NV_UNIQUE_NAME, 0) != 0) @@ -1474,7 +1474,7 @@ zfs_do_get(int argc, char **argv) zprop_get_cbdata_t cb = { 0 }; int i, c, flags = ZFS_ITER_ARGS_CAN_BE_PATHS; char *value, *fields; - int ret; + int ret = 0; int limit = 0; zprop_list_t fake_name = { 0 }; @@ -1711,7 +1711,7 @@ zfs_do_inherit(int argc, char **argv) zfs_prop_t prop; inherit_cbdata_t cb = { 0 }; char *propname; - int ret; + int ret = 0; int flags = 0; boolean_t received = B_FALSE; @@ -1917,7 +1917,7 @@ zfs_do_upgrade(int argc, char **argv) { boolean_t all = B_FALSE; boolean_t showversions = B_FALSE; - int ret; + int ret = 0; upgrade_cbdata_t cb = { 0 }; char c; int flags = ZFS_ITER_ARGS_CAN_BE_PATHS; @@ -2206,7 +2206,7 @@ userspace_cb(void *arg, const char *doma uid_t id; uint64_t classes; #ifdef sun - int err; + int err = 0; directory_error_t e; #endif @@ -2562,7 +2562,7 @@ zfs_do_userspace(int argc, char **argv) boolean_t prtnum = B_FALSE; boolean_t parseable = B_FALSE; boolean_t sid2posix = B_FALSE; - int error; + int error = 0; int c; zfs_sort_column_t *default_sortcol = NULL; zfs_sort_column_t *sortcol = NULL; @@ -2925,7 +2925,7 @@ zfs_do_list(int argc, char **argv) list_cbdata_t cb = { 0 }; char *value; int limit = 0; - int ret; + int ret = 0; zfs_sort_column_t *sortcol = NULL; int flags = ZFS_ITER_PROP_LISTSNAPS | ZFS_ITER_ARGS_CAN_BE_PATHS; @@ -3062,7 +3062,9 @@ zfs_do_rename(int argc, char **argv) { zfs_handle_t *zhp; renameflags_t flags = { 0 }; - int c, ret, types; + int c; + int ret = 0; + int types; boolean_t parents = B_FALSE; /* check options */ @@ -3155,7 +3157,7 @@ static int zfs_do_promote(int argc, char **argv) { zfs_handle_t *zhp; - int ret; + int ret = 0; /* check options */ if (argc > 1 && argv[1][0] == '-') { @@ -3276,7 +3278,7 @@ rollback_check(zfs_handle_t *zhp, void * static int zfs_do_rollback(int argc, char **argv) { - int ret; + int ret = 0; int c; boolean_t force = B_FALSE; rollback_cbdata_t cb = { 0 }; @@ -3394,7 +3396,7 @@ static int zfs_do_set(int argc, char **argv) { set_cbdata_t cb; - int ret; + int ret = 0; /* check for options */ if (argc > 1 && argv[1][0] == '-') { @@ -3448,7 +3450,7 @@ static int zfs_do_snapshot(int argc, char **argv) { boolean_t recursive = B_FALSE; - int ret; + int ret = 0; char c; nvlist_t *props; @@ -5286,7 +5288,7 @@ zfs_do_holds(int argc, char **argv) holds_cbdata_t cb = { 0 }; int limit = 0; - int ret; + int ret = 0; int flags = 0; /* check options */ @@ -5863,7 +5865,7 @@ static int unshare_unmount_path(int op, char *path, int flags, boolean_t is_manual) { zfs_handle_t *zhp; - int ret; + int ret = 0; struct stat64 statbuf; struct extmnttab entry; const char *cmdname = (op == OP_SHARE) ? "unshare" : "unmount"; @@ -6331,7 +6333,7 @@ manual_mount(int argc, char **argv) zfs_handle_t *zhp; char mountpoint[ZFS_MAXPROPLEN]; char mntopts[MNT_LINE_MAX] = { '\0' }; - int ret; + int ret = 0; int c; int flags = 0; char *dataset, *path; @@ -6481,7 +6483,7 @@ zfs_do_diff(int argc, char **argv) char *tosnap = NULL; char *fromsnap = NULL; char *atp, *copy; - int err; + int err = 0; int c; while ((c = getopt(argc, argv, "FHt")) != -1) { @@ -6551,7 +6553,7 @@ zfs_do_diff(int argc, char **argv) int main(int argc, char **argv) { - int ret; + int ret = 0; int i; char *progname; char *cmdname; Modified: user/attilio/vmcontention/contrib/gcc/gcc.c ============================================================================== --- user/attilio/vmcontention/contrib/gcc/gcc.c Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/contrib/gcc/gcc.c Fri Feb 10 18:31:35 2012 (r231394) @@ -2696,6 +2696,17 @@ find_a_file (const struct path_prefix *p return xstrdup (DEFAULT_LINKER); #endif +#ifdef FREEBSD_NATIVE + if (! strcmp(name, "include")) + { +#ifdef CROSS_INCLUDE_DIR + return xstrdup(CROSS_INCLUDE_DIR); +#else + return xstrdup(STANDARD_INCLUDE_DIR); +#endif + } +#endif + /* Determine the filename to execute (special case for absolute paths). */ if (IS_ABSOLUTE_PATH (name)) Modified: user/attilio/vmcontention/etc/Makefile ============================================================================== --- user/attilio/vmcontention/etc/Makefile Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/etc/Makefile Fri Feb 10 18:31:35 2012 (r231394) @@ -7,18 +7,48 @@ SUBDIR= sendmail .endif -BIN1= auth.conf \ - crontab devd.conf devfs.conf \ - ddb.conf dhclient.conf disktab fbtab \ - ftpusers gettytab group \ - hosts hosts.allow hosts.equiv \ - inetd.conf libalias.conf login.access login.conf mac.conf motd \ - netconfig network.subr networks newsyslog.conf nsswitch.conf \ - phones profile protocols \ - rc rc.bsdextended rc.firewall rc.initdiskless \ - rc.sendmail rc.shutdown \ - rc.subr remote rpc services shells \ - sysctl.conf syslog.conf termcap.small +BIN1= auth.conf +BIN1+= crontab +BIN1+= devd.conf +BIN1+= devfs.conf +BIN1+= ddb.conf +BIN1+= dhclient.conf +BIN1+= disktab +BIN1+= fbtab +BIN1+= ftpusers +BIN1+= gettytab +BIN1+= group +BIN1+= hosts +BIN1+= hosts.allow +BIN1+= hosts.equiv +BIN1+= inetd.conf +BIN1+= libalias.conf +BIN1+= login.access +BIN1+= login.conf +BIN1+= mac.conf +BIN1+= motd +BIN1+= netconfig +BIN1+= network.subr +BIN1+= networks +BIN1+= newsyslog.conf +BIN1+= nsswitch.conf +BIN1+= phones +BIN1+= profile +BIN1+= protocols +BIN1+= rc +BIN1+= rc.bsdextended +BIN1+= rc.firewall +BIN1+= rc.initdiskless +BIN1+= rc.sendmail +BIN1+= rc.shutdown +BIN1+= rc.subr +BIN1+= remote +BIN1+= rpc +BIN1+= services +BIN1+= shells +BIN1+= sysctl.conf +BIN1+= syslog.conf +BIN1+= termcap.small .if exists(${.CURDIR}/etc.${MACHINE}/ttys) BIN1+= etc.${MACHINE}/ttys Modified: user/attilio/vmcontention/etc/defaults/periodic.conf ============================================================================== --- user/attilio/vmcontention/etc/defaults/periodic.conf Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/etc/defaults/periodic.conf Fri Feb 10 18:31:35 2012 (r231394) @@ -96,6 +96,7 @@ daily_status_disks_df_flags="-l -h" # d # 404.status-zfs daily_status_zfs_enable="NO" # Check ZFS +daily_status_zfs_zpool_list_enable="YES" # List ZFS pools # 405.status-ata_raid daily_status_ata_raid_enable="NO" # Check ATA raid status Modified: user/attilio/vmcontention/etc/defaults/rc.conf ============================================================================== --- user/attilio/vmcontention/etc/defaults/rc.conf Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/etc/defaults/rc.conf Fri Feb 10 18:31:35 2012 (r231394) @@ -648,6 +648,7 @@ devfs_rulesets="/etc/defaults/devfs.rule devfs_system_ruleset="" # The name (NOT number) of a ruleset to apply to /dev devfs_set_rulesets="" # A list of /mount/dev=ruleset_name settings to # apply (must be mounted already, i.e. fstab(5)) +devfs_load_rulesets="NO" # Enable to always load the default rulesets performance_cx_lowest="HIGH" # Online CPU idle state performance_cpu_freq="NONE" # Online CPU frequency economy_cx_lowest="HIGH" # Offline CPU idle state Modified: user/attilio/vmcontention/etc/periodic/daily/404.status-zfs ============================================================================== --- user/attilio/vmcontention/etc/periodic/daily/404.status-zfs Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/etc/periodic/daily/404.status-zfs Fri Feb 10 18:31:35 2012 (r231394) @@ -16,12 +16,21 @@ case "$daily_status_zfs_enable" in echo echo 'Checking status of zfs pools:' - out=`zpool status -x` - echo "$out" + case "$daily_status_zfs_zpool_list_enable" in + [Yy][Ee][Ss]) + lout=`zpool list` + echo "$lout" + echo + ;; + *) + ;; + esac + sout=`zpool status -x` + echo "$sout" # zpool status -x always exits with 0, so we have to interpret its # output to see what's going on. - if [ "$out" = "all pools are healthy" \ - -o "$out" = "no pools available" ]; then + if [ "$sout" = "all pools are healthy" \ + -o "$sout" = "no pools available" ]; then rc=0 else rc=1 Modified: user/attilio/vmcontention/etc/rc.d/devfs ============================================================================== --- user/attilio/vmcontention/etc/rc.d/devfs Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/etc/rc.d/devfs Fri Feb 10 18:31:35 2012 (r231394) @@ -16,7 +16,8 @@ stop_cmd=':' devfs_start() { - if [ -n "$devfs_system_ruleset" -o -n "$devfs_set_rulesets" ]; then + if [ -n "$devfs_system_ruleset" -o -n "$devfs_set_rulesets" ] || + checkyesno devfs_load_rulesets; then devfs_init_rulesets if [ -n "$devfs_system_ruleset" ]; then devfs_set_ruleset $devfs_system_ruleset /dev Modified: user/attilio/vmcontention/etc/rc.resume ============================================================================== --- user/attilio/vmcontention/etc/rc.resume Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/etc/rc.resume Fri Feb 10 18:31:35 2012 (r231394) @@ -43,12 +43,6 @@ if [ -r /var/run/rc.suspend.pid ]; then echo 'rc.resume: killed rc.suspend that was still around' fi -if [ -r /var/run/rc.suspend.tch ]; then - _t=`cat /var/run/rc.suspend.tch` - /sbin/sysctl -n kern.timecounter.hardware=$_t > /dev/null 2>&1 - /bin/rm -f /var/run/rc.suspend.tch -fi - if [ -r /var/run/moused.pid ]; then pkill -HUP -F /var/run/moused.pid fi Modified: user/attilio/vmcontention/etc/rc.suspend ============================================================================== --- user/attilio/vmcontention/etc/rc.suspend Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/etc/rc.suspend Fri Feb 10 18:31:35 2012 (r231394) @@ -43,18 +43,6 @@ fi echo $$ 2> /dev/null > /var/run/rc.suspend.pid -_t=`/sbin/sysctl -n kern.timecounter.hardware 2> /dev/null` -case ${_t#ACPI-} in -fast|safe) - /bin/rm -f /var/run/rc.suspend.tch - ;; -*) - { /sbin/sysctl -n kern.timecounter.hardware=ACPI-fast || \ - /sbin/sysctl -n kern.timecounter.hardware=ACPI-safe; } \ - > /dev/null 2>&1 && echo $_t > /var/run/rc.suspend.tch - ;; -esac - # If you have troubles on suspending with PC-CARD modem, try this. # See also contrib/pccardq.c (Only for PAO users). # pccardq | awk -F '~' '$5 == "filled" && $4 ~ /uart/ \ Modified: user/attilio/vmcontention/lib/libc/gen/directory.3 ============================================================================== --- user/attilio/vmcontention/lib/libc/gen/directory.3 Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/lib/libc/gen/directory.3 Fri Feb 10 18:31:35 2012 (r231394) @@ -122,9 +122,12 @@ function returns a pointer to the next directory entry. It returns .Dv NULL -upon reaching the end of the directory or detecting an invalid -.Fn seekdir -operation. +upon reaching the end of the directory or on error. +In the event of an error, +.Va errno +may be set to any of the values documented for the +.Xr getdirentries 2 +system call. .Pp The .Fn readdir_r Modified: user/attilio/vmcontention/lib/libc/net/eui64.3 ============================================================================== --- user/attilio/vmcontention/lib/libc/net/eui64.3 Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/lib/libc/net/eui64.3 Fri Feb 10 18:31:35 2012 (r231394) @@ -221,10 +221,3 @@ These functions first appears in They are derived from the .Xr ethers 3 family of functions. -.Sh BUGS -The -.Fn eui64_aton -and -.Fn eui64_ntoa -functions returns values that are stored in static memory areas -which may be overwritten the next time they are called. Modified: user/attilio/vmcontention/lib/libc/sys/jail.2 ============================================================================== --- user/attilio/vmcontention/lib/libc/sys/jail.2 Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/lib/libc/sys/jail.2 Fri Feb 10 18:31:35 2012 (r231394) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 23, 2009 +.Dd February 8, 2012 .Dt JAIL 2 .Os .Sh NAME @@ -400,6 +400,8 @@ and system calls will fail if: .Bl -tag -width Er +.It Bq Er EPERM +A user other than the super-user attempted to attach to or remove a jail. .It Bq Er EINVAL The jail specified by .Fa jid Modified: user/attilio/vmcontention/lib/libprocstat/common_kvm.c ============================================================================== --- user/attilio/vmcontention/lib/libprocstat/common_kvm.c Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/lib/libprocstat/common_kvm.c Fri Feb 10 18:31:35 2012 (r231394) @@ -80,7 +80,7 @@ kdevtoname(kvm_t *kd, struct cdev *dev, assert(buf); if (!kvm_read_all(kd, (unsigned long)dev, &si, sizeof(si))) return (1); - strlcpy(buf, si.__si_namebuf, SPECNAMELEN + 1); + strlcpy(buf, si.si_name, SPECNAMELEN + 1); return (0); } Modified: user/attilio/vmcontention/lib/libthr/arch/mips/include/pthread_md.h ============================================================================== --- user/attilio/vmcontention/lib/libthr/arch/mips/include/pthread_md.h Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/lib/libthr/arch/mips/include/pthread_md.h Fri Feb 10 18:31:35 2012 (r231394) @@ -39,15 +39,19 @@ #define CPU_SPINWAIT #define DTV_OFFSET offsetof(struct tcb, tcb_dtv) +#ifdef __mips_n64 +#define TP_OFFSET 0x7010 +#else +#define TP_OFFSET 0x7008 +#endif /* - * Variant II tcb, first two members are required by rtld. + * Variant I tcb. The structure layout is fixed, don't blindly + * change it! */ struct tcb { - struct tcb *tcb_self; /* required by rtld */ - void *tcb_dtv; /* required by rtld */ - struct pthread *tcb_thread; /* our hook */ - void *tcb_spare[1]; + void *tcb_dtv; + struct pthread *tcb_thread; }; /* @@ -61,7 +65,7 @@ static __inline void _tcb_set(struct tcb *tcb) { - sysarch(MIPS_SET_TLS, tcb); + sysarch(MIPS_SET_TLS, ((uint8_t*)tcb + TP_OFFSET)); } /* @@ -70,10 +74,10 @@ _tcb_set(struct tcb *tcb) static __inline struct tcb * _tcb_get(void) { - void *tcb; + uint8_t *tcb; sysarch(MIPS_GET_TLS, &tcb); - return tcb; + return ((struct tcb *)(tcb - TP_OFFSET)); } extern struct pthread *_thr_initial; Modified: user/attilio/vmcontention/lib/libthr/arch/mips/mips/pthread_md.c ============================================================================== --- user/attilio/vmcontention/lib/libthr/arch/mips/mips/pthread_md.c Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/lib/libthr/arch/mips/mips/pthread_md.c Fri Feb 10 18:31:35 2012 (r231394) @@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "pthread_md.h" struct tcb * @@ -41,16 +43,17 @@ _tcb_ctor(struct pthread *thread, int in { struct tcb *tcb; - tcb = malloc(sizeof(struct tcb)); - if (tcb) { - bzero(tcb, sizeof(struct tcb)); + tcb = _rtld_allocate_tls((initial) ? _tcb_get() : NULL, + sizeof(struct tcb), 16); + if (tcb) tcb->tcb_thread = thread; - } + return (tcb); } void _tcb_dtor(struct tcb *tcb) { - free(tcb); + + _rtld_free_tls(tcb, sizeof(struct tcb), 16); } Modified: user/attilio/vmcontention/lib/libutil/login_class.c ============================================================================== --- user/attilio/vmcontention/lib/libutil/login_class.c Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/lib/libutil/login_class.c Fri Feb 10 18:31:35 2012 (r231394) @@ -452,18 +452,21 @@ setusercontext(login_cap_t *lc, const st p = (rtp.prio > RTP_PRIO_MAX) ? 31 : p; if (rtprio(RTP_SET, 0, &rtp)) syslog(LOG_WARNING, "rtprio '%s' (%s): %m", - pwd->pw_name, lc ? lc->lc_class : LOGIN_DEFCLASS); + pwd ? pwd->pw_name : "-", + lc ? lc->lc_class : LOGIN_DEFCLASS); } else if (p < PRIO_MIN) { rtp.type = RTP_PRIO_REALTIME; rtp.prio = abs(p - PRIO_MIN + RTP_PRIO_MAX); p = (rtp.prio > RTP_PRIO_MAX) ? 1 : p; if (rtprio(RTP_SET, 0, &rtp)) syslog(LOG_WARNING, "rtprio '%s' (%s): %m", - pwd->pw_name, lc ? lc->lc_class : LOGIN_DEFCLASS); + pwd ? pwd->pw_name : "-", + lc ? lc->lc_class : LOGIN_DEFCLASS); } else { if (setpriority(PRIO_PROCESS, 0, (int)p) != 0) syslog(LOG_WARNING, "setpriority '%s' (%s): %m", - pwd->pw_name, lc ? lc->lc_class : LOGIN_DEFCLASS); + pwd ? pwd->pw_name : "-", + lc ? lc->lc_class : LOGIN_DEFCLASS); } } Modified: user/attilio/vmcontention/lib/libutil/pidfile.3 ============================================================================== --- user/attilio/vmcontention/lib/libutil/pidfile.3 Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/lib/libutil/pidfile.3 Fri Feb 10 18:31:35 2012 (r231394) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 16, 2011 +.Dd February 8, 2012 .Dt PIDFILE 3 .Os .Sh NAME @@ -85,6 +85,9 @@ function sets the O_CLOEXEC close-on-exe The .Fn pidfile_write function writes process' PID into a previously opened file. +The file is truncated before write, so calling the +.Fn pidfile_write +function multiple times is supported. .Pp The .Fn pidfile_close @@ -147,6 +150,11 @@ if (pfh == NULL) { } /* If we cannot create pidfile from other reasons, only warn. */ warn("Cannot open or create pidfile"); + /* + * Eventhough pfh is NULL we can continue, as the other pidfile_* + * function can handle such situation by doing nothing except setting + * errno to EDOOFUS. + */ } if (daemon(0, 0) == -1) { Modified: user/attilio/vmcontention/lib/libutil/pw_util.c ============================================================================== --- user/attilio/vmcontention/lib/libutil/pw_util.c Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/lib/libutil/pw_util.c Fri Feb 10 18:31:35 2012 (r231394) @@ -347,7 +347,8 @@ pw_edit(int notsetuid) sigprocmask(SIG_SETMASK, &oldsigset, NULL); if (stat(tempname, &st2) == -1) return (-1); - return (st1.st_mtime != st2.st_mtime); + return (st1.st_mtim.tv_sec != st2.st_mtim.tv_sec || + st1.st_mtim.tv_nsec != st2.st_mtim.tv_nsec); } /* Modified: user/attilio/vmcontention/libexec/rtld-elf/mips/reloc.c ============================================================================== --- user/attilio/vmcontention/libexec/rtld-elf/mips/reloc.c Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/libexec/rtld-elf/mips/reloc.c Fri Feb 10 18:31:35 2012 (r231394) @@ -37,9 +37,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include + +#include #include "debug.h" #include "rtld.h" +#include "rtld_printf.h" #ifdef __mips_n64 #define GOT1_MASK 0x8000000000000000UL @@ -244,9 +248,9 @@ _mips_rtld_bind(Obj_Entry *obj, Elf_Size _rtld_error("bind failed no symbol"); target = (Elf_Addr)(defobj->relocbase + def->st_value); - dbg("bind now/fixup at %s sym # %d in %s --> was=%p new=%p", + dbg("bind now/fixup at %s sym # %jd in %s --> was=%p new=%p", obj->path, - reloff, defobj->strtab + def->st_name, + (intmax_t)reloff, defobj->strtab + def->st_name, (void *)got[obj->local_gotno + reloff - obj->gotsym], (void *)target); got[obj->local_gotno + reloff - obj->gotsym] = target; @@ -283,8 +287,8 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry /* Relocate the local GOT entries */ got += i; - dbg("got:%p for %d entries adding %x", - got, obj->local_gotno, (uint32_t)obj->relocbase); + dbg("got:%p for %d entries adding %p", + got, obj->local_gotno, obj->relocbase); for (; i < obj->local_gotno; i++) { *got += (Elf_Addr)obj->relocbase; got++; @@ -339,8 +343,8 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry */ *got = sym->st_value + (Elf_Addr)obj->relocbase; if ((Elf_Addr)(*got) == (Elf_Addr)obj->relocbase) { - dbg("Warning2, i:%d maps to relocbase address:%x", - i, (uint32_t)obj->relocbase); + dbg("Warning2, i:%d maps to relocbase address:%p", + i, obj->relocbase); } } else if (sym->st_info == ELF_ST_INFO(STB_GLOBAL, STT_SECTION)) { @@ -349,8 +353,8 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *got = sym->st_value + (Elf_Addr)obj->relocbase; if ((Elf_Addr)(*got) == (Elf_Addr)obj->relocbase) { - dbg("Warning3, i:%d maps to relocbase address:%x", - i, (uint32_t)obj->relocbase); + dbg("Warning3, i:%d maps to relocbase address:%p", + i, obj->relocbase); } } } else { @@ -363,8 +367,8 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry } *got = def->st_value + (Elf_Addr)defobj->relocbase; if ((Elf_Addr)(*got) == (Elf_Addr)obj->relocbase) { - dbg("Warning4, i:%d maps to relocbase address:%x", - i, (uint32_t)obj->relocbase); + dbg("Warning4, i:%d maps to relocbase address:%p", + i, obj->relocbase); dbg("via first obj symbol %s", obj->strtab + obj->symtab[i].st_name); dbg("found in obj %p:%s", @@ -470,8 +474,8 @@ reloc_plt(Obj_Entry *obj) const Elf_Rel *rellim; const Elf_Rel *rel; - dbg("reloc_plt obj:%p pltrel:%p sz:%d", obj, obj->pltrel, (int)obj->pltrelsize); - dbg("gottable %p num syms:%d", obj->pltgot, obj->symtabno ); + dbg("reloc_plt obj:%p pltrel:%p sz:%s", obj, obj->pltrel, (int)obj->pltrelsize); + dbg("gottable %p num syms:%s", obj->pltgot, obj->symtabno ); dbg("*****************************************************"); rellim = (const Elf_Rel *)((char *)obj->pltrel + obj->pltrelsize); @@ -527,11 +531,32 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr void allocate_initial_tls(Obj_Entry *objs) { + char *tls; + /* + * Fix the size of the static TLS block by using the maximum + * offset allocated so far and adding a bit for dynamic modules to + * use. + */ + tls_static_space = tls_last_offset + tls_last_size + RTLD_STATIC_TLS_EXTRA; + + tls = ((char *) allocate_tls(objs, NULL, TLS_TCB_SIZE, 8) + + TLS_TP_OFFSET + TLS_TCB_SIZE); + + sysarch(MIPS_SET_TLS, tls); + rtld_printf("allocate_initial_tls -> %p(%p)\n", tls, tls - TLS_TP_OFFSET - TLS_TCB_SIZE); } void * __tls_get_addr(tls_index* ti) { - return (NULL); + Elf_Addr** tls; + char *p; + + sysarch(MIPS_GET_TLS, &tls); + + p = tls_get_addr_common((Elf_Addr**)((Elf_Addr)tls - TLS_TP_OFFSET + - TLS_TCB_SIZE), ti->ti_module, ti->ti_offset); + + return (p + TLS_DTV_OFFSET); } Modified: user/attilio/vmcontention/libexec/rtld-elf/mips/rtld_machdep.h ============================================================================== --- user/attilio/vmcontention/libexec/rtld-elf/mips/rtld_machdep.h Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/libexec/rtld-elf/mips/rtld_machdep.h Fri Feb 10 18:31:35 2012 (r231394) @@ -47,21 +47,32 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, #define call_initfini_pointer(obj, target) \ (((InitFunc)(target))()) - + +/* + * TLS + */ + +#define TLS_TP_OFFSET 0x7000 +#define TLS_DTV_OFFSET 0x8000 +#ifdef __mips_n64 +#define TLS_TCB_SIZE 16 +#else +#define TLS_TCB_SIZE 8 +#endif + typedef struct { unsigned long ti_module; unsigned long ti_offset; } tls_index; #define round(size, align) \ - (((size) + (align) - 1) & ~((align) - 1)) + (((size) + (align) - 1) & ~((align) - 1)) #define calculate_first_tls_offset(size, align) \ - round(size, align) + round(TLS_TCB_SIZE, align) #define calculate_tls_offset(prev_offset, prev_size, size, align) \ - round(prev_offset + prev_size, align) + round(prev_offset + prev_size, align) #define calculate_tls_end(off, size) ((off) + (size)) - - + /* * Lazy binding entry point, called via PLT. */ Modified: user/attilio/vmcontention/libexec/rtld-elf/rtld.c ============================================================================== --- user/attilio/vmcontention/libexec/rtld-elf/rtld.c Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/libexec/rtld-elf/rtld.c Fri Feb 10 18:31:35 2012 (r231394) @@ -3543,7 +3543,7 @@ tls_get_addr_common(Elf_Addr** dtvp, int /* XXX not sure what variants to use for arm. */ -#if defined(__ia64__) || defined(__powerpc__) +#if defined(__ia64__) || defined(__powerpc__) || defined(__mips__) /* * Allocate Static TLS using the Variant I method. @@ -3625,7 +3625,7 @@ free_tls(void *tcb, size_t tcbsize, size #endif #if defined(__i386__) || defined(__amd64__) || defined(__sparc64__) || \ - defined(__arm__) || defined(__mips__) + defined(__arm__) /* * Allocate Static TLS using the Variant II method. Modified: user/attilio/vmcontention/sbin/fsck_ffs/fsck_ffs.8 ============================================================================== --- user/attilio/vmcontention/sbin/fsck_ffs/fsck_ffs.8 Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/sbin/fsck_ffs/fsck_ffs.8 Fri Feb 10 18:31:35 2012 (r231394) @@ -29,7 +29,7 @@ .\" @(#)fsck.8 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd April 27, 2011 +.Dd February 10, 2012 .Dt FSCK_FFS 8 .Os .Sh NAME @@ -193,6 +193,11 @@ Use the block specified immediately afte the super block for the file system. An alternate super block is usually located at block 32 for UFS1, and block 160 for UFS2. +.Pp +See the +.Fl N +flag of +.Xr newfs 8 . .It Fl C Check if file system was dismounted cleanly. If so, skip file system checks (like "preen"). Modified: user/attilio/vmcontention/sbin/fsck_ffs/setup.c ============================================================================== --- user/attilio/vmcontention/sbin/fsck_ffs/setup.c Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/sbin/fsck_ffs/setup.c Fri Feb 10 18:31:35 2012 (r231394) @@ -194,7 +194,7 @@ setup(char *dev) "-b OPTION TO FSCK TO SPECIFY THE", "LOCATION OF AN ALTERNATE", "SUPER-BLOCK TO SUPPLY NEEDED", - "INFORMATION; SEE fsck(8)."); + "INFORMATION; SEE fsck_ffs(8)."); bflag = 0; return(0); } Modified: user/attilio/vmcontention/sbin/reboot/nextboot.sh ============================================================================== --- user/attilio/vmcontention/sbin/reboot/nextboot.sh Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/sbin/reboot/nextboot.sh Fri Feb 10 18:31:35 2012 (r231394) @@ -1,9 +1,29 @@ #! /bin/sh # -# Copyright 2002. Gordon Tetlow. -# gordon@FreeBSD.org +# Copyright (c) 2002 Gordon Tetlow. All rights reserved. # Copyright (c) 2012 Sandvine Incorporated. 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. +# +# 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. +# # $FreeBSD$ delete="NO" Modified: user/attilio/vmcontention/share/man/man3/Makefile ============================================================================== --- user/attilio/vmcontention/share/man/man3/Makefile Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/share/man/man3/Makefile Fri Feb 10 18:31:35 2012 (r231394) @@ -10,6 +10,7 @@ MAN= assert.3 \ fpgetround.3 \ intro.3 \ makedev.3 \ + offsetof.3 \ ${PTHREAD_MAN} \ queue.3 \ siginfo.3 \ Copied: user/attilio/vmcontention/share/man/man3/offsetof.3 (from r231393, head/share/man/man3/offsetof.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmcontention/share/man/man3/offsetof.3 Fri Feb 10 18:31:35 2012 (r231394, copy of r231393, head/share/man/man3/offsetof.3) @@ -0,0 +1,47 @@ +.\" $OpenBSD: offsetof.3,v 1.2 2010/02/18 18:30:19 jmc Exp $ +.\" +.\" Copyright (c) 2010 Thomas Pfaff +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 18 2010 +.Dt OFFSETOF 3 +.Os +.Sh NAME +.Nm offsetof +.Nd offset of a structure member +.Sh SYNOPSIS +.Fd #include +.Ft size_t +.Fn offsetof "type" "member" +.Sh DESCRIPTION +The +.Fn offsetof +macro expands to an integer constant expression of type +.Ft size_t +and yields the offset, +in bytes, of the field +.Ar member +from the start of the structure +.Ar type . +.Pp +A compiler error will result if +.Ar member +is not aligned to a byte boundary (i.e. it is a bit-field). +.Sh STANDARDS +The +.Fn offsetof +macro conforms to +.St -ansiC . Modified: user/attilio/vmcontention/share/man/man4/ada.4 ============================================================================== --- user/attilio/vmcontention/share/man/man4/ada.4 Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/share/man/man4/ada.4 Fri Feb 10 18:31:35 2012 (r231394) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 8, 2011 +.Dd February 8, 2012 .Dt ADA 4 .Os .Sh NAME @@ -139,7 +139,6 @@ The per-device default is to leave it as ATA device nodes .El .Sh SEE ALSO -.Xr ad 4 , .Xr ahci 4 , .Xr cam 4 , .Xr da 4 , Modified: user/attilio/vmcontention/share/man/man4/cd.4 ============================================================================== --- user/attilio/vmcontention/share/man/man4/cd.4 Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/share/man/man4/cd.4 Fri Feb 10 18:31:35 2012 (r231394) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2009 +.Dd February 8, 2012 .Dt CD 4 .Os .Sh NAME @@ -52,7 +52,7 @@ but it will only last until the .Tn CD-ROM is unmounted. In general the interfaces are similar to those described by -.Xr ad 4 +.Xr ada 4 and .Xr da 4 . .Pp Modified: user/attilio/vmcontention/share/man/man4/da.4 ============================================================================== --- user/attilio/vmcontention/share/man/man4/da.4 Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/share/man/man4/da.4 Fri Feb 10 18:31:35 2012 (r231394) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 2, 2003 +.Dd February 8, 2012 .Dt DA 4 .Os .Sh NAME @@ -195,7 +195,7 @@ SCSI disk device nodes .Sh DIAGNOSTICS None. .Sh SEE ALSO -.Xr ad 4 , +.Xr ada 4 , .Xr cam 4 , .Xr geom 4 , .Xr bsdlabel 8 , Modified: user/attilio/vmcontention/share/man/man4/ed.4 ============================================================================== --- user/attilio/vmcontention/share/man/man4/ed.4 Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/share/man/man4/ed.4 Fri Feb 10 18:31:35 2012 (r231394) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 9, 2009 +.Dd February 8, 2012 .Dt ED 4 .Os .Sh NAME @@ -435,7 +435,7 @@ Some devices supported by do not generate the link state change events used by .Xr devd 8 to start -.Xr dhclinet 8 . +.Xr dhclient 8 . If you have problems with .Xr dhclient 8 not starting and the device is always attached to the network it may Modified: user/attilio/vmcontention/share/man/man4/lmc.4 ============================================================================== --- user/attilio/vmcontention/share/man/man4/lmc.4 Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/share/man/man4/lmc.4 Fri Feb 10 18:31:35 2012 (r231394) @@ -43,7 +43,7 @@ .\" this program; if not, write to the Free Software Foundation, Inc., 59 .\" Temple Place - Suite 330, Boston, MA 02111-1307, USA. .\" -.Dd July 23, 2011 +.Dd February 8, 2012 .Dt LMC 4 .Os .\" @@ -179,7 +179,7 @@ higher-level issues like protocol multip This driver is compatible with several line protocol packages: .Bl -tag -width "Generic HDLC" .It Sy "Netgraph" -.Xr Netgraph 4 +.Xr netgraph 4 implements many basic packet-handling functions as kernel loadable modules. They can be interconnected in a graph to implement many protocols. Configuration is done from userland without rebuilding the kernel. Modified: user/attilio/vmcontention/share/man/man4/mps.4 ============================================================================== --- user/attilio/vmcontention/share/man/man4/mps.4 Fri Feb 10 18:15:45 2012 (r231393) +++ user/attilio/vmcontention/share/man/man4/mps.4 Fri Feb 10 18:31:35 2012 (r231394) @@ -31,10 +31,10 @@ .\" .\" Author: Ken Merry .\" -.\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#4 $ +.\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $ .\" $FreeBSD$ .\" -.Dd September 13, 2010 +.Dd February 7, 2012 .Dt MPS 4 .Os .Sh NAME *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***