From owner-svn-src-user@FreeBSD.ORG Mon Jun 4 20:50:41 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F0A90106566B; Mon, 4 Jun 2012 20:50:41 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB6B18FC17; Mon, 4 Jun 2012 20:50:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q54Kofw8065017; Mon, 4 Jun 2012 20:50:41 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q54KoftF065013; Mon, 4 Jun 2012 20:50:41 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201206042050.q54KoftF065013@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 4 Jun 2012 20:50: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: r236580 - user/np/toe_iwarp/sys/dev/cxgbe 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, 04 Jun 2012 20:50:42 -0000 Author: np Date: Mon Jun 4 20:50:41 2012 New Revision: 236580 URL: http://svn.freebsd.org/changeset/base/236580 Log: Add a mechanism for the iWARP driver to register a handler for async notifications. Run the handler when such notifications are received. Modified: user/np/toe_iwarp/sys/dev/cxgbe/adapter.h user/np/toe_iwarp/sys/dev/cxgbe/t4_main.c user/np/toe_iwarp/sys/dev/cxgbe/t4_sge.c Modified: user/np/toe_iwarp/sys/dev/cxgbe/adapter.h ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgbe/adapter.h Mon Jun 4 20:45:33 2012 (r236579) +++ user/np/toe_iwarp/sys/dev/cxgbe/adapter.h Mon Jun 4 20:50:41 2012 (r236580) @@ -508,6 +508,7 @@ struct sge { struct rss_header; typedef int (*cpl_handler_t)(struct sge_iq *, const struct rss_header *, struct mbuf *); +typedef int (*an_handler_t)(struct sge_iq *, const struct rsp_ctrl *); struct adapter { SLIST_ENTRY(adapter) link; @@ -579,7 +580,8 @@ struct adapter { TAILQ_HEAD(, sge_fl) sfl; struct callout sfl_callout; - cpl_handler_t cpl_handler[256] __aligned(CACHE_LINE_SIZE); + an_handler_t an_handler __aligned(CACHE_LINE_SIZE); + cpl_handler_t cpl_handler[256]; }; #define ADAPTER_LOCK(sc) mtx_lock(&(sc)->sc_lock) @@ -737,6 +739,7 @@ void t4_os_portmod_changed(const struct void t4_os_link_changed(struct adapter *, int, int); void t4_iterate(void (*)(struct adapter *, void *), void *); int t4_register_cpl_handler(struct adapter *, int, cpl_handler_t); +int t4_register_an_handler(struct adapter *, an_handler_t); /* t4_sge.c */ void t4_sge_modload(void); Modified: user/np/toe_iwarp/sys/dev/cxgbe/t4_main.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgbe/t4_main.c Mon Jun 4 20:45:33 2012 (r236579) +++ user/np/toe_iwarp/sys/dev/cxgbe/t4_main.c Mon Jun 4 20:50:41 2012 (r236580) @@ -304,6 +304,7 @@ static void cxgbe_tick(void *); static void cxgbe_vlan_config(void *, struct ifnet *, uint16_t); static int cpl_not_handled(struct sge_iq *, const struct rss_header *, struct mbuf *); +static int an_not_handled(struct sge_iq *, const struct rsp_ctrl *); static int t4_sysctls(struct adapter *); static int cxgbe_sysctls(struct port_info *); static int sysctl_int_array(SYSCTL_HANDLER_ARGS); @@ -443,6 +444,7 @@ t4_attach(device_t dev) goto done; /* error message displayed already */ memset(sc->chan_map, 0xff, sizeof(sc->chan_map)); + sc->an_handler = an_not_handled; for (i = 0; i < ARRAY_SIZE(sc->cpl_handler); i++) sc->cpl_handler[i] = cpl_not_handled; t4_register_cpl_handler(sc, CPL_SET_TCB_RPL, filter_rpl); @@ -2914,6 +2916,7 @@ cxgbe_vlan_config(void *arg, struct ifne static int cpl_not_handled(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { + #ifdef INVARIANTS panic("%s: opcode 0x%02x on iq %p with payload %p", __func__, rss->opcode, iq, m); @@ -2941,6 +2944,31 @@ t4_register_cpl_handler(struct adapter * } static int +an_not_handled(struct sge_iq *iq, const struct rsp_ctrl *ctrl) +{ + +#ifdef INVARIANTS + panic("%s: async notification on iq %p (ctrl %p)", __func__, iq, ctrl); +#else + log(LOG_ERR, "%s: async notification on iq %p (ctrl %p)", + __func__, iq, ctrl); +#endif + return (EDOOFUS); +} + +int +t4_register_an_handler(struct adapter *sc, an_handler_t h) +{ + uintptr_t *loc, new; + + new = h ? (uintptr_t)h : (uintptr_t)an_not_handled; + loc = (uintptr_t *) &sc->an_handler; + atomic_store_rel_ptr(loc, new); + + return (0); +} + +static int t4_sysctls(struct adapter *sc) { struct sysctl_ctx_list *ctx; Modified: user/np/toe_iwarp/sys/dev/cxgbe/t4_sge.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgbe/t4_sge.c Mon Jun 4 20:45:33 2012 (r236579) +++ user/np/toe_iwarp/sys/dev/cxgbe/t4_sge.c Mon Jun 4 20:50:41 2012 (r236580) @@ -863,7 +863,8 @@ service_iq(struct sge_iq *iq, int budget break; default: - panic("%s: rsp_type %u", __func__, rsp_type); + sc->an_handler(iq, ctrl); + break; } iq_next(iq); From owner-svn-src-user@FreeBSD.ORG Tue Jun 5 23:48:21 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 28111106566B; Tue, 5 Jun 2012 23:48:21 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1019F8FC12; Tue, 5 Jun 2012 23:48:21 +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 q55NmLje052232; Tue, 5 Jun 2012 23:48:21 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q55NmKAN052210; Tue, 5 Jun 2012 23:48:20 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201206052348.q55NmKAN052210@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 5 Jun 2012 23:48: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: r236646 - in user/np/toe_iwarp/sys: dev/cxgb/ulp/iw_cxgb dev/cxgb/ulp/tom dev/cxgbe/tom i386/conf netinet 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, 05 Jun 2012 23:48:21 -0000 Author: np Date: Tue Jun 5 23:48:20 2012 New Revision: 236646 URL: http://svn.freebsd.org/changeset/base/236646 Log: - cxgb/ulp/tom, cxgb/ulp/iw_cxgb, and cxgbe/tom should all be stub modules when the kernel is being built without TCP_OFFLOAD. - Exclude rdma in the XEN kernconf. machine/xen/xen-os.h has some Linuxy definitions that collide with ofed/include/linux/*.h make universe is successful after these changes. Note that the point at which this workspace was branched off had unrelated build breakages. I tested make universe with a patch to head that is equivalent to the changes in this workspace. Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cq.c user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_dbg.c user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ev.c user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_mem.c user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_l2t.c user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_listen.c user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_tom.c user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_connect.c user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_cpl_io.c user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_listen.c user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_tom.c user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_tom_l2t.c user/np/toe_iwarp/sys/i386/conf/XEN user/np/toe_iwarp/sys/netinet/tcp_offload.c Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Tue Jun 5 23:48:20 2012 (r236646) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef TCP_OFFLOAD #include #include #include @@ -248,6 +249,7 @@ iwch_mod_unload(void) return (0); } +#endif /* TCP_OFFLOAD */ #undef MODULE_VERSION #include @@ -257,6 +259,7 @@ iwch_modevent(module_t mod, int cmd, voi { int rc = 0; +#ifdef TCP_OFFLOAD switch (cmd) { case MOD_LOAD: rc = iwch_mod_load(); @@ -277,7 +280,10 @@ iwch_modevent(module_t mod, int cmd, voi default: rc = EINVAL; } - +#else + printf("iw_cxgb: compiled without TCP_OFFLOAD support.\n"); + rc = EOPNOTSUPP; +#endif return (rc); } Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Tue Jun 5 23:48:20 2012 (r236646) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -1728,3 +1729,4 @@ iwch_cm_term_cpl(struct adapter *sc) t3_register_cpl_handler(sc, CPL_RDMA_TERMINATE, NULL); t3_register_cpl_handler(sc, CPL_RDMA_EC_STATUS, NULL); } +#endif Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cq.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cq.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cq.c Tue Jun 5 23:48:20 2012 (r236646) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -264,4 +265,4 @@ int iwch_poll_cq(struct ib_cq *ibcq, int return npolled; } } - +#endif Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_dbg.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_dbg.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_dbg.c Tue Jun 5 23:48:20 2012 (r236646) @@ -67,7 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef INVARIANTS +#if defined(INVARIANTS) && defined(TCP_OFFLOAD) #include #include #include Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ev.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ev.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ev.c Tue Jun 5 23:48:20 2012 (r236646) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -258,3 +259,4 @@ done: mtx_unlock(&chp->lock); iwch_qp_rem_ref(&qhp->ibqp); } +#endif Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c Tue Jun 5 23:48:20 2012 (r236646) @@ -1,4 +1,3 @@ - /************************************************************************** Copyright (c) 2007, Chelsio Inc. @@ -32,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -1336,3 +1336,4 @@ skip_cqe: } return ret; } +#endif Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_mem.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_mem.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_mem.c Tue Jun 5 23:48:20 2012 (r236646) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -236,3 +237,4 @@ int build_phys_page_list(struct ib_phys_ return 0; } +#endif Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Tue Jun 5 23:48:20 2012 (r236646) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -1153,3 +1154,4 @@ void iwch_unregister_device(struct iwch_ cxfree(dev->ibdev.iwcm); return; } +#endif Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c Tue Jun 5 23:48:20 2012 (r236646) @@ -1,4 +1,3 @@ - /************************************************************************** Copyright (c) 2007, Chelsio Inc. @@ -32,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -1104,3 +1104,4 @@ out: CTR2(KTR_IW_CXGB, "%s exit state %d", __FUNCTION__, qhp->attr.state); return ret; } +#endif Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c Tue Jun 5 23:48:20 2012 (r236646) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -372,3 +373,4 @@ void cxio_hal_rqtpool_destroy(struct cxi { gen_pool_destroy(rdev_p->rqt_pool); } +#endif Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Tue Jun 5 23:48:20 2012 (r236646) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -1859,3 +1860,4 @@ t3_init_cpl_io(struct adapter *sc) t3_register_cpl_handler(sc, CPL_SMT_WRITE_RPL, do_smt_write_rpl); t3_register_cpl_handler(sc, CPL_SET_TCB_RPL, do_set_tcb_rpl); } +#endif Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_l2t.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_l2t.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_l2t.c Tue Jun 5 23:48:20 2012 (r236646) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -456,3 +457,4 @@ t3_init_l2t_cpl_handlers(struct adapter { t3_register_cpl_handler(sc, CPL_L2T_WRITE_RPL, do_l2t_write_rpl); } +#endif Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_listen.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_listen.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_listen.c Tue Jun 5 23:48:20 2012 (r236646) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -1136,3 +1137,4 @@ t3_offload_socket(struct toedev *tod, vo make_established(so, cpl->snd_isn, cpl->rcv_isn, cpl->tcp_opt); update_tid(td, toep, synqe->tid); } +#endif Modified: user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_tom.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_tom.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgb/ulp/tom/cxgb_tom.c Tue Jun 5 23:48:20 2012 (r236646) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef TCP_OFFLOAD #include "cxgb_include.h" #include "ulp/tom/cxgb_tom.h" #include "ulp/tom/cxgb_l2t.h" @@ -357,12 +358,14 @@ t3_tom_mod_unload(void) return (0); } +#endif /* ifdef TCP_OFFLOAD */ static int t3_tom_modevent(module_t mod, int cmd, void *arg) { int rc = 0; +#ifdef TCP_OFFLOAD switch (cmd) { case MOD_LOAD: rc = t3_tom_mod_load(); @@ -375,7 +378,9 @@ t3_tom_modevent(module_t mod, int cmd, v default: rc = EINVAL; } - +#else + rc = EOPNOTSUPP; +#endif return (rc); } Modified: user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_connect.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_connect.c Tue Jun 5 23:48:20 2012 (r236646) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -373,3 +374,4 @@ failed: return (rc); } +#endif Modified: user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Jun 5 23:48:20 2012 (r236646) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -1255,3 +1256,4 @@ t4_init_cpl_io_handlers(struct adapter * t4_register_cpl_handler(sc, CPL_RX_DATA, do_rx_data); t4_register_cpl_handler(sc, CPL_FW4_ACK, do_fw4_ack); } +#endif Modified: user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_listen.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_listen.c Tue Jun 5 23:48:20 2012 (r236646) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -1358,3 +1359,4 @@ t4_init_listen_cpl_handlers(struct adapt t4_register_cpl_handler(sc, CPL_PASS_ACCEPT_REQ, do_pass_accept_req); t4_register_cpl_handler(sc, CPL_PASS_ESTABLISH, do_pass_establish); } +#endif Modified: user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_tom.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_tom.c Tue Jun 5 23:48:20 2012 (r236646) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -47,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef TCP_OFFLOAD #include "common/common.h" #include "common/t4_msg.h" #include "common/t4_regs.h" @@ -714,12 +716,14 @@ t4_tom_mod_unload(void) return (0); } +#endif /* TCP_OFFLOAD */ static int t4_tom_modevent(module_t mod, int cmd, void *arg) { int rc = 0; +#ifdef TCP_OFFLOAD switch (cmd) { case MOD_LOAD: rc = t4_tom_mod_load(); @@ -732,7 +736,10 @@ t4_tom_modevent(module_t mod, int cmd, v default: rc = EINVAL; } - +#else + printf("t4_tom: compiled without TCP_OFFLOAD support.\n"); + rc = EOPNOTSUPP; +#endif return (rc); } Modified: user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_tom_l2t.c ============================================================================== --- user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_tom_l2t.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/dev/cxgbe/tom/t4_tom_l2t.c Tue Jun 5 23:48:20 2012 (r236646) @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#ifdef TCP_OFFLOAD #include #include #include @@ -401,3 +402,4 @@ found: update_entry(sc, e, lladdr, vtag); mtx_unlock(&e->lock); } +#endif Modified: user/np/toe_iwarp/sys/i386/conf/XEN ============================================================================== --- user/np/toe_iwarp/sys/i386/conf/XEN Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/i386/conf/XEN Tue Jun 5 23:48:20 2012 (r236646) @@ -7,7 +7,7 @@ cpu I686_CPU ident XEN makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -makeoptions WITHOUT_MODULES="aha ahb amd cxgb dpt drm hptmv ida malo mps mwl nve sound sym trm xfs" +makeoptions WITHOUT_MODULES="aha ahb amd cxgb dpt drm hptmv ida malo mps mwl nve rdma sound sym trm xfs" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption Modified: user/np/toe_iwarp/sys/netinet/tcp_offload.c ============================================================================== --- user/np/toe_iwarp/sys/netinet/tcp_offload.c Tue Jun 5 22:02:27 2012 (r236645) +++ user/np/toe_iwarp/sys/netinet/tcp_offload.c Tue Jun 5 23:48:20 2012 (r236646) @@ -75,14 +75,10 @@ tcp_offload_connect(struct socket *so, s ifp = rt->rt_ifp; -#ifdef INET if (nam->sa_family == AF_INET && !(ifp->if_capenable & IFCAP_TOE4)) goto done; -#endif -#ifdef INET6 if (nam->sa_family == AF_INET6 && !(ifp->if_capenable & IFCAP_TOE6)) goto done; -#endif tod = TOEDEV(ifp); if (tod != NULL) From owner-svn-src-user@FreeBSD.ORG Wed Jun 6 21:41:50 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C4C38106566C; Wed, 6 Jun 2012 21:41:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B09688FC16; Wed, 6 Jun 2012 21:41:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q56LfoiU039957; Wed, 6 Jun 2012 21:41:50 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q56LfoD7039955; Wed, 6 Jun 2012 21:41:50 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201206062141.q56LfoD7039955@svn.freebsd.org> From: Doug Barton Date: Wed, 6 Jun 2012 21:41:50 +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: r236696 - user/dougb/portmaster 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: Wed, 06 Jun 2012 21:41:50 -0000 Author: dougb Date: Wed Jun 6 21:41:50 2012 New Revision: 236696 URL: http://svn.freebsd.org/changeset/base/236696 Log: Move 'make clean' to the background. There is no point waiting around for it to finish. In the case of very large work directories this may cause some I/O contention during the unpacking of the next port to build, but in most cases this should be lost in the noise. Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Wed Jun 6 21:16:26 2012 (r236695) +++ user/dougb/portmaster/portmaster Wed Jun 6 21:41:50 2012 (r236696) @@ -3879,8 +3879,8 @@ if [ -n "$MAKE_PACKAGE" ]; then fi if [ -z "$use_package" -a -z "$DONT_POST_CLEAN" ]; then - pm_sv Running \'make clean\' - pm_make_s clean NOCLEANDEPENDS=ncd2 + pm_sv Running \'make clean\' in the background + (pm_make_s clean NOCLEANDEPENDS=ncd2 >/dev/null)& echo '' fi From owner-svn-src-user@FreeBSD.ORG Wed Jun 6 21:42:23 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6576E1065672; Wed, 6 Jun 2012 21:42:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 162D58FC29; Wed, 6 Jun 2012 21:42:23 +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 q56LgM1f040026; Wed, 6 Jun 2012 21:42:22 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q56LgMKl040024; Wed, 6 Jun 2012 21:42:22 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201206062142.q56LgMKl040024@svn.freebsd.org> From: Doug Barton Date: Wed, 6 Jun 2012 21:42:22 +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: r236697 - user/dougb/portmaster 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: Wed, 06 Jun 2012 21:42:23 -0000 Author: dougb Date: Wed Jun 6 21:42:22 2012 New Revision: 236697 URL: http://svn.freebsd.org/changeset/base/236697 Log: Update copyright Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Wed Jun 6 21:41:50 2012 (r236696) +++ user/dougb/portmaster/portmaster Wed Jun 6 21:42:22 2012 (r236697) @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (c) 2005-2011 Douglas Barton, All rights reserved +# Copyright (c) 2005-2012 Douglas Barton, All rights reserved # Please see detailed copyright below trap trap_exit INT @@ -3943,7 +3943,7 @@ safe_exit #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Copyright (c) 2005-2011 Douglas Barton +# Copyright (c) 2005-2012 Douglas Barton # All rights reserved. # # Redistribution and use in source and binary forms, with or without From owner-svn-src-user@FreeBSD.ORG Thu Jun 7 09:21:49 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 891DF106566B; Thu, 7 Jun 2012 09:21:49 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 752488FC21; Thu, 7 Jun 2012 09:21:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q579LnIS073503; Thu, 7 Jun 2012 09:21:49 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q579LniQ073501; Thu, 7 Jun 2012 09:21:49 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201206070921.q579LniQ073501@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 7 Jun 2012 09:21:49 +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: r236708 - user/des/fbce/root/vote 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: Thu, 07 Jun 2012 09:21:49 -0000 Author: des Date: Thu Jun 7 09:21:48 2012 New Revision: 236708 URL: http://svn.freebsd.org/changeset/base/236708 Log: Show the number of voted in green if equal to the maximum and orange if below the maximum. Modified: user/des/fbce/root/vote/index.tt Modified: user/des/fbce/root/vote/index.tt ============================================================================== --- user/des/fbce/root/vote/index.tt Thu Jun 7 09:14:28 2012 (r236707) +++ user/des/fbce/root/vote/index.tt Thu Jun 7 09:21:48 2012 (r236708) @@ -5,8 +5,10 @@ total.innerHTML = new Number(n).toString(); if (n > [% max_votes ? max_votes : 0 %]) total.style.color = "red"; + else if (n == [% max_votes ? max_votes : 0 %]) + total.style.color = "green"; else - total.style.color = total.parentNode.style.color; + total.style.color = "orange"; } function updateTotal() { From owner-svn-src-user@FreeBSD.ORG Thu Jun 7 09:22:42 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4C6991065675; Thu, 7 Jun 2012 09:22:42 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 388588FC14; Thu, 7 Jun 2012 09:22: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 q579Mgn8073601; Thu, 7 Jun 2012 09:22:42 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q579Mg8o073599; Thu, 7 Jun 2012 09:22:42 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201206070922.q579Mg8o073599@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 7 Jun 2012 09:22:42 +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: r236709 - user/des/fbce/lib/FBCE/Controller 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: Thu, 07 Jun 2012 09:22:42 -0000 Author: des Date: Thu Jun 7 09:22:41 2012 New Revision: 236709 URL: http://svn.freebsd.org/changeset/base/236709 Log: Access the model through our context rather than directly from FBCE. Modified: user/des/fbce/lib/FBCE/Controller/Root.pm Modified: user/des/fbce/lib/FBCE/Controller/Root.pm ============================================================================== --- user/des/fbce/lib/FBCE/Controller/Root.pm Thu Jun 7 09:21:48 2012 (r236708) +++ user/des/fbce/lib/FBCE/Controller/Root.pm Thu Jun 7 09:22:41 2012 (r236709) @@ -30,10 +30,10 @@ sub auto :Private { my ($self, $c) = @_; # Stash schedule information etc. - $c->stash(title => FBCE->config->{'title'}); + $c->stash(title => $c->config->{'title'}); my $now = DateTime->now(); $c->stash(now => $now); - my $schedule = FBCE->model('Schedule'); + my $schedule = $c->model('Schedule'); foreach my $phase ("nominating", "voting") { foreach my $endpoint ("${phase}_starts", "${phase}_ends") { $c->stash($endpoint => $schedule->{$endpoint}); @@ -45,7 +45,7 @@ sub auto :Private { $c->stash(voting => $schedule->voting($now)); $c->stash(announced => $schedule->announced($now)); - my $rules = FBCE->model('Rules'); + my $rules = $c->model('Rules'); $c->stash(max_votes => $rules->{'max_votes'}); # Authentication From owner-svn-src-user@FreeBSD.ORG Thu Jun 7 22:47:55 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 2D5911065675; Thu, 7 Jun 2012 22:47:55 +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 EEFF08FC19; Thu, 7 Jun 2012 22:47:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q57MlsUj016161; Thu, 7 Jun 2012 22:47:54 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q57Mls3e016132; Thu, 7 Jun 2012 22:47:54 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201206072247.q57Mls3e016132@svn.freebsd.org> From: Attilio Rao Date: Thu, 7 Jun 2012 22:47:54 +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: r236726 - in user/attilio/vmcontention: . cddl/contrib/opensolaris/lib/libzfs/common cddl/lib/libdtrace contrib/bind9 contrib/bind9/lib/dns contrib/bsnmp/snmp_mibII gnu/lib/libsupc++ in... 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: Thu, 07 Jun 2012 22:47:55 -0000 Author: attilio Date: Thu Jun 7 22:47:53 2012 New Revision: 236726 URL: http://svn.freebsd.org/changeset/base/236726 Log: MFC Added: user/attilio/vmcontention/cddl/lib/libdtrace/io.d - copied unchanged from r236725, head/cddl/lib/libdtrace/io.d user/attilio/vmcontention/share/man/man4/filemon.4 - copied unchanged from r236725, head/share/man/man4/filemon.4 user/attilio/vmcontention/sys/dev/filemon/ - copied from r236725, head/sys/dev/filemon/ user/attilio/vmcontention/sys/modules/filemon/ - copied from r236725, head/sys/modules/filemon/ user/attilio/vmcontention/tools/regression/filemon/ - copied from r236725, head/tools/regression/filemon/ user/attilio/vmcontention/tools/tools/ifpifa/ - copied from r236725, head/tools/tools/ifpifa/ user/attilio/vmcontention/usr.sbin/pciconf/err.c - copied unchanged from r236725, head/usr.sbin/pciconf/err.c Modified: user/attilio/vmcontention/Makefile.inc1 user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c user/attilio/vmcontention/contrib/bind9/CHANGES user/attilio/vmcontention/contrib/bind9/lib/dns/rdata.c user/attilio/vmcontention/contrib/bind9/lib/dns/rdataslab.c user/attilio/vmcontention/contrib/bind9/version user/attilio/vmcontention/contrib/bsnmp/snmp_mibII/mibII_tcp.c user/attilio/vmcontention/gnu/lib/libsupc++/Version.map user/attilio/vmcontention/include/fmtmsg.h user/attilio/vmcontention/kerberos5/Makefile.inc user/attilio/vmcontention/kerberos5/lib/libasn1/Makefile user/attilio/vmcontention/kerberos5/lib/libgssapi_spnego/Makefile user/attilio/vmcontention/kerberos5/lib/libhdb/Makefile user/attilio/vmcontention/kerberos5/lib/libhx509/Makefile user/attilio/vmcontention/kerberos5/lib/libroken/Makefile user/attilio/vmcontention/kerberos5/lib/libvers/Makefile user/attilio/vmcontention/kerberos5/libexec/kdigest/Makefile user/attilio/vmcontention/kerberos5/tools/slc/Makefile user/attilio/vmcontention/kerberos5/usr.bin/hxtool/Makefile user/attilio/vmcontention/kerberos5/usr.bin/kadmin/Makefile user/attilio/vmcontention/kerberos5/usr.bin/kcc/Makefile user/attilio/vmcontention/kerberos5/usr.sbin/iprop-log/Makefile user/attilio/vmcontention/kerberos5/usr.sbin/ktutil/Makefile user/attilio/vmcontention/lib/libc++/Makefile user/attilio/vmcontention/lib/libc/gen/getnetgrent.c user/attilio/vmcontention/lib/libc/gen/posix_spawnattr_getflags.3 user/attilio/vmcontention/lib/libc/include/port_before.h user/attilio/vmcontention/lib/libc/net/getaddrinfo.c user/attilio/vmcontention/lib/libc/stdlib/realpath.c user/attilio/vmcontention/lib/libc/sys/stat.2 user/attilio/vmcontention/lib/libcrypt/crypt.3 user/attilio/vmcontention/lib/libcxxrt/Makefile user/attilio/vmcontention/lib/libelf/elf.3 user/attilio/vmcontention/lib/libelf/elf_begin.3 user/attilio/vmcontention/lib/libelf/gelf.3 user/attilio/vmcontention/lib/libgpib/gpib.3 user/attilio/vmcontention/lib/libgssapi/gss_unwrap.3 user/attilio/vmcontention/lib/libgssapi/gss_wrap.3 user/attilio/vmcontention/lib/libpmc/pmc.3 user/attilio/vmcontention/lib/libprocstat/libprocstat.c user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_get_error.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_get_mech_info.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_get_principal_name.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_get_versions.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_getcred.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_is_installed.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_max_data_length.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_mech_to_oid.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_oid_to_mech.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_qop_to_num.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_seccreate.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_set_callback.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_set_defaults.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_set_svc_name.3 user/attilio/vmcontention/lib/librpcsec_gss/rpc_gss_svc_max_data_length.3 user/attilio/vmcontention/lib/libusb/libusb20.3 user/attilio/vmcontention/sbin/camcontrol/camcontrol.8 user/attilio/vmcontention/sbin/camcontrol/camcontrol.c user/attilio/vmcontention/sbin/hastd/primary.c user/attilio/vmcontention/sbin/ifconfig/ifconfig.8 user/attilio/vmcontention/sbin/setkey/setkey.8 user/attilio/vmcontention/share/man/man4/Makefile user/attilio/vmcontention/share/man/man4/acpi_panasonic.4 user/attilio/vmcontention/share/man/man4/ahci.4 user/attilio/vmcontention/share/man/man4/ata.4 user/attilio/vmcontention/share/man/man4/bce.4 user/attilio/vmcontention/share/man/man4/firewire.4 user/attilio/vmcontention/share/man/man4/io.4 user/attilio/vmcontention/share/man/man4/ip.4 user/attilio/vmcontention/share/man/man4/man4.i386/sbni.4 user/attilio/vmcontention/share/man/man4/mps.4 user/attilio/vmcontention/share/man/man4/mpt.4 user/attilio/vmcontention/share/man/man4/mvs.4 user/attilio/vmcontention/share/man/man4/ng_ksocket.4 user/attilio/vmcontention/share/man/man4/run.4 user/attilio/vmcontention/share/man/man4/scsi.4 user/attilio/vmcontention/share/man/man4/siis.4 user/attilio/vmcontention/share/man/man4/snd_hda.4 user/attilio/vmcontention/share/man/man4/usb.4 user/attilio/vmcontention/share/man/man4/vlan.4 user/attilio/vmcontention/share/man/man5/make.conf.5 user/attilio/vmcontention/share/man/man5/rc.conf.5 user/attilio/vmcontention/share/man/man7/development.7 user/attilio/vmcontention/share/man/man9/rwlock.9 user/attilio/vmcontention/share/misc/committers-src.dot user/attilio/vmcontention/share/mk/bsd.sys.mk user/attilio/vmcontention/sys/amd64/acpica/acpi_wakeup.c user/attilio/vmcontention/sys/amd64/amd64/minidump_machdep.c user/attilio/vmcontention/sys/amd64/amd64/pmap.c user/attilio/vmcontention/sys/amd64/include/atomic.h user/attilio/vmcontention/sys/arm/arm/locore.S user/attilio/vmcontention/sys/arm/at91/at91.c user/attilio/vmcontention/sys/arm/at91/at91_machdep.c user/attilio/vmcontention/sys/arm/at91/at91_mci.c user/attilio/vmcontention/sys/arm/at91/at91_pmc.c user/attilio/vmcontention/sys/arm/at91/at91_reset.S user/attilio/vmcontention/sys/arm/at91/at91_spi.c user/attilio/vmcontention/sys/arm/at91/at91_spireg.h user/attilio/vmcontention/sys/arm/at91/at91reg.h user/attilio/vmcontention/sys/arm/at91/at91rm9200.c user/attilio/vmcontention/sys/arm/at91/at91rm92reg.h user/attilio/vmcontention/sys/arm/at91/at91sam9260.c user/attilio/vmcontention/sys/arm/at91/at91sam9g20.c user/attilio/vmcontention/sys/arm/at91/at91var.h user/attilio/vmcontention/sys/arm/conf/ETHERNUT5 user/attilio/vmcontention/sys/arm/econa/econa_machdep.c user/attilio/vmcontention/sys/arm/include/cpu.h user/attilio/vmcontention/sys/arm/mv/mv_machdep.c user/attilio/vmcontention/sys/arm/s3c2xx0/s3c24x0_machdep.c user/attilio/vmcontention/sys/arm/sa11x0/assabet_machdep.c user/attilio/vmcontention/sys/arm/xscale/i80321/ep80219_machdep.c user/attilio/vmcontention/sys/arm/xscale/i80321/iq31244_machdep.c user/attilio/vmcontention/sys/arm/xscale/i8134x/crb_machdep.c user/attilio/vmcontention/sys/arm/xscale/ixp425/avila_machdep.c user/attilio/vmcontention/sys/arm/xscale/pxa/pxa_machdep.c user/attilio/vmcontention/sys/boot/i386/boot2/boot2.c user/attilio/vmcontention/sys/boot/ofw/libofw/ofw_disk.c user/attilio/vmcontention/sys/boot/sparc64/loader/main.c user/attilio/vmcontention/sys/cam/ata/ata_da.c user/attilio/vmcontention/sys/cam/ata/ata_pmp.c user/attilio/vmcontention/sys/cam/ata/ata_xpt.c user/attilio/vmcontention/sys/cam/cam_ccb.h user/attilio/vmcontention/sys/cam/cam_debug.h user/attilio/vmcontention/sys/cam/cam_periph.c user/attilio/vmcontention/sys/cam/cam_xpt.c user/attilio/vmcontention/sys/cam/cam_xpt.h user/attilio/vmcontention/sys/cam/ctl/scsi_ctl.c user/attilio/vmcontention/sys/cam/scsi/scsi_all.c user/attilio/vmcontention/sys/cam/scsi/scsi_all.h user/attilio/vmcontention/sys/cam/scsi/scsi_cd.c user/attilio/vmcontention/sys/cam/scsi/scsi_da.c user/attilio/vmcontention/sys/cam/scsi/scsi_pt.c user/attilio/vmcontention/sys/cam/scsi/scsi_sa.c user/attilio/vmcontention/sys/cam/scsi/scsi_target.c user/attilio/vmcontention/sys/cam/scsi/scsi_xpt.c user/attilio/vmcontention/sys/cddl/dev/dtrace/amd64/dtrace_subr.c user/attilio/vmcontention/sys/cddl/dev/dtrace/i386/dtrace_subr.c user/attilio/vmcontention/sys/conf/NOTES user/attilio/vmcontention/sys/conf/options user/attilio/vmcontention/sys/conf/options.arm user/attilio/vmcontention/sys/contrib/pf/net/pf.c user/attilio/vmcontention/sys/dev/acpica/Osd/OsdSynch.c user/attilio/vmcontention/sys/dev/acpica/acpi.c user/attilio/vmcontention/sys/dev/acpica/acpi_ec.c user/attilio/vmcontention/sys/dev/acpica/acpivar.h user/attilio/vmcontention/sys/dev/ae/if_ae.c user/attilio/vmcontention/sys/dev/ahci/ahci.c user/attilio/vmcontention/sys/dev/aic7xxx/aicasm/Makefile user/attilio/vmcontention/sys/dev/aic7xxx/aicasm/aicasm.c user/attilio/vmcontention/sys/dev/ata/ata-all.c user/attilio/vmcontention/sys/dev/ath/if_ath.c user/attilio/vmcontention/sys/dev/ath/if_ath_misc.h user/attilio/vmcontention/sys/dev/ath/if_ath_rx.c user/attilio/vmcontention/sys/dev/bge/if_bge.c user/attilio/vmcontention/sys/dev/bge/if_bgereg.h user/attilio/vmcontention/sys/dev/e1000/if_igb.c user/attilio/vmcontention/sys/dev/flash/at45d.c user/attilio/vmcontention/sys/dev/isp/isp.c user/attilio/vmcontention/sys/dev/isp/isp_freebsd.c user/attilio/vmcontention/sys/dev/isp/isp_freebsd.h user/attilio/vmcontention/sys/dev/isp/ispvar.h user/attilio/vmcontention/sys/dev/iwn/if_iwn.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe.c user/attilio/vmcontention/sys/dev/jme/if_jme.c user/attilio/vmcontention/sys/dev/mmc/mmc.c user/attilio/vmcontention/sys/dev/mmc/mmcsd.c user/attilio/vmcontention/sys/dev/mvs/mvs.c user/attilio/vmcontention/sys/dev/siis/siis.c user/attilio/vmcontention/sys/dev/sym/sym_hipd.c user/attilio/vmcontention/sys/dev/usb/usb_device.c user/attilio/vmcontention/sys/dev/usb/usb_generic.c user/attilio/vmcontention/sys/dev/usb/wlan/if_rum.c user/attilio/vmcontention/sys/dev/usb/wlan/if_run.c user/attilio/vmcontention/sys/dev/usb/wlan/if_ural.c user/attilio/vmcontention/sys/fs/nfsclient/nfs_clbio.c user/attilio/vmcontention/sys/geom/multipath/g_multipath.c user/attilio/vmcontention/sys/i386/acpica/acpi_wakeup.c user/attilio/vmcontention/sys/i386/i386/minidump_machdep.c user/attilio/vmcontention/sys/i386/i386/pmap.c user/attilio/vmcontention/sys/i386/include/atomic.h user/attilio/vmcontention/sys/i386/xen/pmap.c user/attilio/vmcontention/sys/ia64/acpica/acpi_wakeup.c user/attilio/vmcontention/sys/kern/init_main.c user/attilio/vmcontention/sys/kern/kern_shutdown.c user/attilio/vmcontention/sys/kern/uipc_syscalls.c user/attilio/vmcontention/sys/kern/vfs_bio.c user/attilio/vmcontention/sys/kern/vfs_subr.c user/attilio/vmcontention/sys/kern/vfs_vnops.c user/attilio/vmcontention/sys/modules/Makefile user/attilio/vmcontention/sys/modules/wpi/Makefile user/attilio/vmcontention/sys/net/bpf.c user/attilio/vmcontention/sys/net/if_tap.c user/attilio/vmcontention/sys/netinet/libalias/libalias.3 user/attilio/vmcontention/sys/netinet/sctp_asconf.c user/attilio/vmcontention/sys/netinet/sctp_input.c user/attilio/vmcontention/sys/netinet/sctp_output.c user/attilio/vmcontention/sys/netinet/sctp_pcb.c user/attilio/vmcontention/sys/netinet/sctputil.c user/attilio/vmcontention/sys/netinet/sctputil.h user/attilio/vmcontention/sys/netinet/tcp_input.c user/attilio/vmcontention/sys/netinet6/in6.c user/attilio/vmcontention/sys/netinet6/ip6_input.c user/attilio/vmcontention/sys/sys/buf.h user/attilio/vmcontention/sys/sys/param.h user/attilio/vmcontention/sys/vm/swap_pager.c user/attilio/vmcontention/sys/x86/x86/dump_machdep.c user/attilio/vmcontention/tools/tools/syscall_timing/syscall_timing.c user/attilio/vmcontention/tools/tools/tinybsd/README user/attilio/vmcontention/usr.bin/find/find.1 user/attilio/vmcontention/usr.bin/gzip/zmore.1 user/attilio/vmcontention/usr.bin/kdump/kdump.1 user/attilio/vmcontention/usr.bin/kdump/kdump.c user/attilio/vmcontention/usr.bin/man/man.conf.5 user/attilio/vmcontention/usr.bin/usbhidctl/usbhidctl.1 user/attilio/vmcontention/usr.sbin/adduser/rmuser.8 user/attilio/vmcontention/usr.sbin/arp/arp.4 user/attilio/vmcontention/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.8 user/attilio/vmcontention/usr.sbin/bluetooth/btpand/btpand.8 user/attilio/vmcontention/usr.sbin/bluetooth/hccontrol/hccontrol.8 user/attilio/vmcontention/usr.sbin/bluetooth/l2control/l2control.8 user/attilio/vmcontention/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8 user/attilio/vmcontention/usr.sbin/cpucontrol/amd.c user/attilio/vmcontention/usr.sbin/ctladm/ctladm.8 user/attilio/vmcontention/usr.sbin/daemon/daemon.8 user/attilio/vmcontention/usr.sbin/daemon/daemon.c user/attilio/vmcontention/usr.sbin/digictl/digictl.8 user/attilio/vmcontention/usr.sbin/fwcontrol/fwcontrol.8 user/attilio/vmcontention/usr.sbin/gssd/gssd.8 user/attilio/vmcontention/usr.sbin/inetd/inetd.c user/attilio/vmcontention/usr.sbin/inetd/inetd.h user/attilio/vmcontention/usr.sbin/jail/jail.8 user/attilio/vmcontention/usr.sbin/jail/jail.conf.5 user/attilio/vmcontention/usr.sbin/ndiscvt/ndiscvt.8 user/attilio/vmcontention/usr.sbin/newsyslog/newsyslog.8 user/attilio/vmcontention/usr.sbin/pciconf/Makefile user/attilio/vmcontention/usr.sbin/pciconf/cap.c user/attilio/vmcontention/usr.sbin/pciconf/pciconf.8 user/attilio/vmcontention/usr.sbin/pciconf/pciconf.c user/attilio/vmcontention/usr.sbin/pciconf/pciconf.h user/attilio/vmcontention/usr.sbin/pmcstat/pmcstat.8 user/attilio/vmcontention/usr.sbin/pmcstat/pmcstat_log.c user/attilio/vmcontention/usr.sbin/setfib/setfib.1 user/attilio/vmcontention/usr.sbin/syslogd/syslogd.8 Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/contrib/bind9/ (props changed) user/attilio/vmcontention/gnu/lib/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/sbin/ (props changed) user/attilio/vmcontention/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) user/attilio/vmcontention/sys/contrib/pf/ (props changed) user/attilio/vmcontention/usr.sbin/jail/ (props changed) user/attilio/vmcontention/usr.sbin/ndiscvt/ (props changed) Modified: user/attilio/vmcontention/Makefile.inc1 ============================================================================== --- user/attilio/vmcontention/Makefile.inc1 Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/Makefile.inc1 Thu Jun 7 22:47:53 2012 (r236726) @@ -242,7 +242,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ SSP_CFLAGS= \ -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ -DNO_PIC -DNO_PROFILE -DNO_SHARED \ - -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD # build-tools stage TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ @@ -252,7 +252,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ BOOTSTRAPPING=${OSRELDATE} \ SSP_CFLAGS= \ -DNO_LINT \ - -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ @@ -487,7 +487,8 @@ build32: .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic cd ${.CURDIR}/${_dir}; \ MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \ - DIRPRFX=${_dir}/ build-tools + DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \ + -DEARLY_BUILD build-tools .endfor cd ${.CURDIR}; \ ${LIB32WMAKE} -f Makefile.inc1 libraries @@ -829,7 +830,7 @@ buildkernel: cd ${KRNLOBJDIR}/${_kernel}; \ PATH=${BPATH}:${PATH} \ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \ + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD \ -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) @@ -837,7 +838,7 @@ buildkernel: cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ PATH=${BPATH}:${PATH} \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF ${target} + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD ${target} .endfor .endif .if !defined(NO_KERNELDEPEND) Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Jun 7 22:47:53 2012 (r236726) @@ -23,6 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved. * Copyright (c) 2011-2012 Pawel Jakub Dawidek . * All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. @@ -2321,6 +2322,17 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop } break; + case ZFS_PROP_GUID: + /* + * GUIDs are stored as numbers, but they are identifiers. + * We don't want them to be pretty printed, because pretty + * printing mangles the ID into a truncated and useless value. + */ + if (get_numeric_property(zhp, prop, src, &source, &val) != 0) + return (-1); + (void) snprintf(propbuf, proplen, "%llu", (u_longlong_t)val); + break; + default: switch (zfs_prop_get_type(prop)) { case PROP_TYPE_NUMBER: Copied: user/attilio/vmcontention/cddl/lib/libdtrace/io.d (from r236725, head/cddl/lib/libdtrace/io.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmcontention/cddl/lib/libdtrace/io.d Thu Jun 7 22:47:53 2012 (r236726, copy of r236725, head/cddl/lib/libdtrace/io.d) @@ -0,0 +1,220 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + * + * $FreeBSD$ + */ +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#pragma D depends_on module unix +#pragma D depends_on provider io + +inline int B_BUSY = B_BUSY; +#pragma D binding "1.0" B_BUSY +inline int B_DONE = 0x00000200; +#pragma D binding "1.0" B_DONE +inline int B_ERROR = B_ERROR; +#pragma D binding "1.0" B_ERROR +inline int B_PAGEIO = B_PAGEIO; +#pragma D binding "1.0" B_PAGEIO +inline int B_PHYS = B_PHYS; +#pragma D binding "1.0" B_PHYS +inline int B_READ = B_READ; +#pragma D binding "1.0" B_READ +inline int B_WRITE = B_WRITE; +#pragma D binding "1.0" B_WRITE +inline int B_ASYNC = 0x00000004; +#pragma D binding "1.0" B_ASYNC + +typedef struct bufinfo { + int b_flags; /* buffer status */ + size_t b_bcount; /* number of bytes */ + caddr_t b_addr; /* buffer address */ + uint64_t b_lblkno; /* block # on device */ + uint64_t b_blkno; /* expanded block # on device */ + size_t b_resid; /* # of bytes not transferred */ + size_t b_bufsize; /* size of allocated buffer */ + caddr_t b_iodone; /* I/O completion routine */ + int b_error; /* expanded error field */ + dev_t b_edev; /* extended device */ +} bufinfo_t; + +#pragma D binding "1.0" translator +translator bufinfo_t < struct buf *B > { + b_flags = B->b_flags; + b_addr = B->b_un.b_addr; + b_bcount = B->b_bcount; + b_lblkno = B->_b_blkno._f; + b_blkno = sizeof (long) == 8 ? B->_b_blkno._f : B->_b_blkno._p._l; + b_resid = B->b_resid; + b_bufsize = B->b_bufsize; + b_iodone = (caddr_t)B->b_iodone; + b_error = B->b_error; + b_edev = B->b_edev; +}; + +typedef struct devinfo { + int dev_major; /* major number */ + int dev_minor; /* minor number */ + int dev_instance; /* instance number */ + string dev_name; /* name of device */ + string dev_statname; /* name of device + instance/minor */ + string dev_pathname; /* pathname of device */ +} devinfo_t; + +#pragma D binding "1.0" translator +translator devinfo_t < struct buf *B > { + dev_major = B->b_dip != NULL ? getmajor(B->b_edev) : + getmajor(B->b_file->v_vfsp->vfs_dev); + dev_minor = B->b_dip != NULL ? getminor(B->b_edev) : + getminor(B->b_file->v_vfsp->vfs_dev); + dev_instance = B->b_dip == NULL ? + getminor(B->b_file->v_vfsp->vfs_dev) : + ((struct dev_info *)B->b_dip)->devi_instance; + dev_name = B->b_dip == NULL ? "nfs" : + stringof(`devnamesp[getmajor(B->b_edev)].dn_name); + dev_statname = strjoin(B->b_dip == NULL ? "nfs" : + stringof(`devnamesp[getmajor(B->b_edev)].dn_name), + lltostr(B->b_dip == NULL ? getminor(B->b_file->v_vfsp->vfs_dev) : + ((struct dev_info *)B->b_dip)->devi_instance == 0 && + ((struct dev_info *)B->b_dip)->devi_parent != NULL && + ((struct dev_info *)B->b_dip)->devi_parent->devi_node_name == + "pseudo" ? getminor(B->b_edev) : + ((struct dev_info *)B->b_dip)->devi_instance)); + dev_pathname = B->b_dip == NULL ? "" : + ddi_pathname(B->b_dip, getminor(B->b_edev)); +}; + +typedef struct fileinfo { + string fi_name; /* name (basename of fi_pathname) */ + string fi_dirname; /* directory (dirname of fi_pathname) */ + string fi_pathname; /* full pathname */ + offset_t fi_offset; /* offset within file */ + string fi_fs; /* filesystem */ + string fi_mount; /* mount point of file system */ + int fi_oflags; /* open(2) flags for file descriptor */ +} fileinfo_t; + +#pragma D binding "1.0" translator +translator fileinfo_t < struct buf *B > { + fi_name = B->b_file == NULL ? "" : + B->b_file->v_path == NULL ? "" : + basename(cleanpath(B->b_file->v_path)); + fi_dirname = B->b_file == NULL ? "" : + B->b_file->v_path == NULL ? "" : + dirname(cleanpath(B->b_file->v_path)); + fi_pathname = B->b_file == NULL ? "" : + B->b_file->v_path == NULL ? "" : + cleanpath(B->b_file->v_path); + fi_offset = B->b_offset; + fi_fs = B->b_file == NULL ? "" : + stringof(B->b_file->v_op->vnop_name); + fi_mount = B->b_file == NULL ? "" : + B->b_file->v_vfsp->vfs_vnodecovered == NULL ? "/" : + B->b_file->v_vfsp->vfs_vnodecovered->v_path == NULL ? "" : + cleanpath(B->b_file->v_vfsp->vfs_vnodecovered->v_path); + fi_oflags = 0; +}; + +/* + * The following inline constants can be used to examine fi_oflags when using + * the fds[] array or a translated fileinfo_t. Note that the various open + * flags behave as a bit-field *except* for O_RDONLY, O_WRONLY, and O_RDWR. + * To test the open mode, you write code similar to that used with the fcntl(2) + * F_GET[X]FL command, such as: if ((fi_oflags & O_ACCMODE) == O_WRONLY). + */ +inline int O_ACCMODE = 0x0003; +#pragma D binding "1.1" O_ACCMODE + +inline int O_RDONLY = 0x0000; +#pragma D binding "1.1" O_RDONLY +inline int O_WRONLY = 0x0001; +#pragma D binding "1.1" O_WRONLY +inline int O_RDWR = 0x0002; +#pragma D binding "1.1" O_RDWR + +inline int O_APPEND = 0x0008; +#pragma D binding "1.1" O_APPEND +inline int O_CREAT = 0x0200; +#pragma D binding "1.1" O_CREAT +inline int O_DSYNC = O_DSYNC; +#pragma D binding "1.1" O_DSYNC +inline int O_EXCL = 0x0800; +#pragma D binding "1.1" O_EXCL +inline int O_LARGEFILE = O_LARGEFILE; +#pragma D binding "1.1" O_LARGEFILE +inline int O_NOCTTY = 0x8000; +#pragma D binding "1.1" O_NOCTTY +inline int O_NONBLOCK = 0x0004; +#pragma D binding "1.1" O_NONBLOCK +inline int O_NDELAY = 0x0004; +#pragma D binding "1.1" O_NDELAY +inline int O_RSYNC = O_RSYNC; +#pragma D binding "1.1" O_RSYNC +inline int O_SYNC = 0x0080; +#pragma D binding "1.1" O_SYNC +inline int O_TRUNC = 0x0400; +#pragma D binding "1.1" O_TRUNC +inline int O_XATTR = O_XATTR; +#pragma D binding "1.1" O_XATTR + +#pragma D binding "1.1" translator +translator fileinfo_t < struct file *F > { + fi_name = F == NULL ? "" : + F->f_vnode->v_path == NULL ? "" : + basename(cleanpath(F->f_vnode->v_path)); + fi_dirname = F == NULL ? "" : + F->f_vnode->v_path == NULL ? "" : + dirname(cleanpath(F->f_vnode->v_path)); + fi_pathname = F == NULL ? "" : + F->f_vnode->v_path == NULL ? "" : + cleanpath(F->f_vnode->v_path); + fi_offset = F == NULL ? 0 : F->f_offset; + fi_fs = F == NULL ? "" : stringof(F->f_vnode->v_op->vnop_name); + fi_mount = F == NULL ? "" : + F->f_vnode->v_vfsp->vfs_vnodecovered == NULL ? "/" : + F->f_vnode->v_vfsp->vfs_vnodecovered->v_path == NULL ? "" : + cleanpath(F->f_vnode->v_vfsp->vfs_vnodecovered->v_path); + fi_oflags = F == NULL ? 0 : F->f_flag + (int)FOPEN; +}; + +inline fileinfo_t fds[int fd] = xlate ( + fd >= 0 && fd < curthread->t_procp->p_user.u_finfo.fi_nfiles ? + curthread->t_procp->p_user.u_finfo.fi_list[fd].uf_file : NULL); + +#pragma D attributes Stable/Stable/Common fds +#pragma D binding "1.1" fds + +#pragma D binding "1.2" translator +translator fileinfo_t < struct vnode *V > { + fi_name = V->v_path == NULL ? "" : + basename(cleanpath(V->v_path)); + fi_dirname = V->v_path == NULL ? "" : + dirname(cleanpath(V->v_path)); + fi_pathname = V->v_path == NULL ? "" : cleanpath(V->v_path); + fi_fs = stringof(V->v_op->vnop_name); + fi_mount = V->v_vfsp->vfs_vnodecovered == NULL ? "/" : + V->v_vfsp->vfs_vnodecovered->v_path == NULL ? "" : + cleanpath(V->v_vfsp->vfs_vnodecovered->v_path); +}; Modified: user/attilio/vmcontention/contrib/bind9/CHANGES ============================================================================== --- user/attilio/vmcontention/contrib/bind9/CHANGES Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/contrib/bind9/CHANGES Thu Jun 7 22:47:53 2012 (r236726) @@ -1,3 +1,8 @@ + --- 9.8.3-P1 released --- + +3331. [security] dns_rdataslab_fromrdataset could produce bad + rdataslabs. [RT #29644] + --- 9.8.3 released --- 3318. [tuning] Reduce the amount of work performed while holding a Modified: user/attilio/vmcontention/contrib/bind9/lib/dns/rdata.c ============================================================================== --- user/attilio/vmcontention/contrib/bind9/lib/dns/rdata.c Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/contrib/bind9/lib/dns/rdata.c Thu Jun 7 22:47:53 2012 (r236726) @@ -329,8 +329,8 @@ dns_rdata_compare(const dns_rdata_t *rda REQUIRE(rdata1 != NULL); REQUIRE(rdata2 != NULL); - REQUIRE(rdata1->data != NULL); - REQUIRE(rdata2->data != NULL); + REQUIRE(rdata1->length == 0 || rdata1->data != NULL); + REQUIRE(rdata2->length == 0 || rdata2->data != NULL); REQUIRE(DNS_RDATA_VALIDFLAGS(rdata1)); REQUIRE(DNS_RDATA_VALIDFLAGS(rdata2)); @@ -360,8 +360,8 @@ dns_rdata_casecompare(const dns_rdata_t REQUIRE(rdata1 != NULL); REQUIRE(rdata2 != NULL); - REQUIRE(rdata1->data != NULL); - REQUIRE(rdata2->data != NULL); + REQUIRE(rdata1->length == 0 || rdata1->data != NULL); + REQUIRE(rdata2->length == 0 || rdata2->data != NULL); REQUIRE(DNS_RDATA_VALIDFLAGS(rdata1)); REQUIRE(DNS_RDATA_VALIDFLAGS(rdata2)); Modified: user/attilio/vmcontention/contrib/bind9/lib/dns/rdataslab.c ============================================================================== --- user/attilio/vmcontention/contrib/bind9/lib/dns/rdataslab.c Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/contrib/bind9/lib/dns/rdataslab.c Thu Jun 7 22:47:53 2012 (r236726) @@ -126,6 +126,11 @@ isc_result_t dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx, isc_region_t *region, unsigned int reservelen) { + /* + * Use &removed as a sentinal pointer for duplicate + * rdata as rdata.data == NULL is valid. + */ + static unsigned char removed; struct xrdata *x; unsigned char *rawbuf; #if DNS_RDATASET_FIXED @@ -169,6 +174,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_ INSIST(result == ISC_R_SUCCESS); dns_rdata_init(&x[i].rdata); dns_rdataset_current(rdataset, &x[i].rdata); + INSIST(x[i].rdata.data != &removed); #if DNS_RDATASET_FIXED x[i].order = i; #endif @@ -201,8 +207,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_ */ for (i = 1; i < nalloc; i++) { if (compare_rdata(&x[i-1].rdata, &x[i].rdata) == 0) { - x[i-1].rdata.data = NULL; - x[i-1].rdata.length = 0; + x[i-1].rdata.data = &removed; #if DNS_RDATASET_FIXED /* * Preserve the least order so A, B, A -> A, B @@ -292,7 +297,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_ #endif for (i = 0; i < nalloc; i++) { - if (x[i].rdata.data == NULL) + if (x[i].rdata.data == &removed) continue; #if DNS_RDATASET_FIXED offsettable[x[i].order] = rawbuf - offsetbase; Modified: user/attilio/vmcontention/contrib/bind9/version ============================================================================== --- user/attilio/vmcontention/contrib/bind9/version Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/contrib/bind9/version Thu Jun 7 22:47:53 2012 (r236726) @@ -6,5 +6,5 @@ MAJORVER=9 MINORVER=8 PATCHVER=3 -RELEASETYPE= -RELEASEVER= +RELEASETYPE=-P +RELEASEVER=1 Modified: user/attilio/vmcontention/contrib/bsnmp/snmp_mibII/mibII_tcp.c ============================================================================== --- user/attilio/vmcontention/contrib/bsnmp/snmp_mibII/mibII_tcp.c Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/contrib/bsnmp/snmp_mibII/mibII_tcp.c Thu Jun 7 22:47:53 2012 (r236726) @@ -109,10 +109,12 @@ fetch_tcp(void) ptr = (struct xinpgen *)(void *)((char *)ptr + ptr->xig_len)) { tp = (struct xtcpcb *)ptr; if (tp->xt_inp.inp_gencnt > xinpgen->xig_gen || - (tp->xt_inp.inp_vflag & INP_IPV4) == 0) + (tp->xt_inp.inp_vflag & (INP_IPV4|INP_IPV6)) == 0) continue; - tcp_total++; + if (tp->xt_inp.inp_vflag & INP_IPV4) + tcp_total++; + if (tp->xt_tp.t_state == TCPS_ESTABLISHED || tp->xt_tp.t_state == TCPS_CLOSE_WAIT) tcp_count++; Modified: user/attilio/vmcontention/gnu/lib/libsupc++/Version.map ============================================================================== --- user/attilio/vmcontention/gnu/lib/libsupc++/Version.map Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/gnu/lib/libsupc++/Version.map Thu Jun 7 22:47:53 2012 (r236726) @@ -126,11 +126,19 @@ CXXABI_1.3 { # __gnu_cxx::_verbose_terminate_handler() _ZN9__gnu_cxx27__verbose_terminate_handlerEv; - # new / delete operators + # operator new and new[], 32-bit size_t _Znaj; _ZnajRKSt9nothrow_t; _Znwj; _ZnwjRKSt9nothrow_t; + + # operator new and new[], 64-bit size_t + _Znam; + _ZnamRKSt9nothrow_t; + _Znwm; + _ZnwmRKSt9nothrow_t; + + # operator delete and delete[] _ZdaPv; _ZdaPvRKSt9nothrow_t; _ZdlPv; Modified: user/attilio/vmcontention/include/fmtmsg.h ============================================================================== --- user/attilio/vmcontention/include/fmtmsg.h Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/include/fmtmsg.h Thu Jun 7 22:47:53 2012 (r236726) @@ -32,7 +32,7 @@ /* Source of condition is... */ #define MM_HARD 0x0001 /* ...hardware. */ #define MM_SOFT 0x0002 /* ...software. */ -#define MM_FIRM 0x0004 /* ...fireware. */ +#define MM_FIRM 0x0004 /* ...firmware. */ /* Condition detected by... */ #define MM_APPL 0x0010 /* ...application. */ Modified: user/attilio/vmcontention/kerberos5/Makefile.inc ============================================================================== --- user/attilio/vmcontention/kerberos5/Makefile.inc Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/Makefile.inc Thu Jun 7 22:47:53 2012 (r236726) @@ -46,3 +46,7 @@ CLEANFILES+= ${_ET}.h ${_ET}.c .endfor .endif # defined(SRCS) + +ASN1_COMPILE= asn1_compile +MAKE_ROKEN= make-roken +SLC= slc Modified: user/attilio/vmcontention/kerberos5/lib/libasn1/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/lib/libasn1/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/lib/libasn1/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -56,8 +56,6 @@ INCS+= krb5_asn1.h \ digest_asn1.h \ kx509_asn1.h -ASN1_COMPILE= asn1_compile - ${GEN_CMS}: cms.asn1 cms.opt ${ASN1_COMPILE} --one-code-file \ --option-file=${.ALLSRC:M*.opt} ${.ALLSRC:M*.asn1} cms_asn1 Modified: user/attilio/vmcontention/kerberos5/lib/libgssapi_spnego/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/lib/libgssapi_spnego/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/lib/libgssapi_spnego/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -38,8 +38,6 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I. CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} \ spnego_asn1_files spnego_asn1-template.c -ASN1_COMPILE= asn1_compile - ${GEN}: spnego.asn1 spnego.opt ${ASN1_COMPILE} --option-file=${.ALLSRC:M*.opt} \ ${.ALLSRC:M*.asn1} spnego_asn1 Modified: user/attilio/vmcontention/kerberos5/lib/libhdb/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/lib/libhdb/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/lib/libhdb/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -84,8 +84,6 @@ GEN= asn1_Salt.x \ CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} hdb_asn1_files \ hdb_asn1-template.[ch]* -ASN1_COMPILE= asn1_compile - ${GEN}: hdb.asn1 ${ASN1_COMPILE} ${.ALLSRC:M*.asn1} hdb_asn1 Modified: user/attilio/vmcontention/kerberos5/lib/libhx509/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/lib/libhx509/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/lib/libhx509/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -269,8 +269,6 @@ CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx INCS+= ocsp_asn1.h pkcs10_asn1.h crmf_asn1.h -ASN1_COMPILE= asn1_compile - ${GEN_OCSP}: ocsp.asn1 ocsp.opt ${ASN1_COMPILE} --option-file=${.ALLSRC:M*.opt} \ ${.ALLSRC:M*.asn1} ocsp_asn1 Modified: user/attilio/vmcontention/kerberos5/lib/libroken/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/lib/libroken/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/lib/libroken/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -82,8 +82,6 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I. CLEANFILES= roken.h -MAKE_ROKEN= make-roken - roken.h: ${MAKE_ROKEN} > ${.TARGET} Modified: user/attilio/vmcontention/kerberos5/lib/libvers/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/lib/libvers/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/lib/libvers/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -7,8 +7,6 @@ CFLAGS+=-I. -I${KRB5DIR}/lib/roken CLEANFILES= roken.h -MAKE_ROKEN= make-roken - roken.h: ${MAKE_ROKEN} > ${.TARGET} Modified: user/attilio/vmcontention/kerberos5/libexec/kdigest/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/libexec/kdigest/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/libexec/kdigest/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -14,7 +14,7 @@ SRCS= kdigest.c \ kdigest-commands.h kdigest-commands.h: kdigest-commands.in - slc ${.ALLSRC:M*.in} + ${SLC} ${.ALLSRC:M*.in} .for ext in c o kdigest-commands.${ext}: kdigest-commands.h Modified: user/attilio/vmcontention/kerberos5/tools/slc/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/tools/slc/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/tools/slc/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -15,7 +15,7 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5D CLEANFILES= roken.h roken.h: - make-roken > ${.TARGET} + ${MAKE_ROKEN} > ${.TARGET} # ${.OBJDIR}/../make-roken/make-roken > ${.TARGET} Modified: user/attilio/vmcontention/kerberos5/usr.bin/hxtool/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/usr.bin/hxtool/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/usr.bin/hxtool/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -11,7 +11,7 @@ LDADD= -lhx509 -lroken -lasn1 -lcrypto - SRCS= hxtool.c hxtool-commands.c hxtool-commands.h hxtool-commands.h: hxtool-commands.in - slc ${.ALLSRC:M*.in} + ${SLC} ${.ALLSRC:M*.in} .for ext in c o hxtool-commands.${ext}: hxtool-commands.h Modified: user/attilio/vmcontention/kerberos5/usr.bin/kadmin/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/usr.bin/kadmin/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/usr.bin/kadmin/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -39,7 +39,7 @@ LDFLAGS=${LDAPLDFLAGS} .include kadmin-commands.h: ${KRB5DIR}/kadmin/kadmin-commands.in - slc ${.ALLSRC:M*.in} + ${SLC} ${.ALLSRC:M*.in} .for ext in o c kadmin-commands.${ext}: kadmin-commands.h Modified: user/attilio/vmcontention/kerberos5/usr.bin/kcc/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/usr.bin/kcc/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/usr.bin/kcc/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -20,7 +20,7 @@ SRCS= kcc.c \ copy_cred_cache.c kcc-commands.h: kcc-commands.in - slc ${.ALLSRC:M*.in} + ${SLC} ${.ALLSRC:M*.in} .for ext in c o kcc-commands.${ext}: kcc-commands.h Modified: user/attilio/vmcontention/kerberos5/usr.sbin/iprop-log/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/usr.sbin/iprop-log/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/usr.sbin/iprop-log/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -14,7 +14,7 @@ LDADD= -lkadm5srv -lhdb -lkrb5 -lasn1 -l ${LIBVERS} -ledit iprop-commands.h: iprop-commands.in - slc ${.ALLSRC:M*.in} + ${SLC} ${.ALLSRC:M*.in} .for ext in c o iprop-commands.${ext}: iprop-commands.h Modified: user/attilio/vmcontention/kerberos5/usr.sbin/ktutil/Makefile ============================================================================== --- user/attilio/vmcontention/kerberos5/usr.sbin/ktutil/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/kerberos5/usr.sbin/ktutil/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -25,7 +25,7 @@ LDADD= -lkadm5clnt -lkrb5 ${LIBSL} -lrok .include ktutil-commands.h: ${KRB5DIR}/admin/ktutil-commands.in - slc ${.ALLSRC:M*.in} + ${SLC} ${.ALLSRC:M*.in} .for ext in c o ktutil-commands.${ext}: ktutil-commands.h Modified: user/attilio/vmcontention/lib/libc++/Makefile ============================================================================== --- user/attilio/vmcontention/lib/libc++/Makefile Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/lib/libc++/Makefile Thu Jun 7 22:47:53 2012 (r236726) @@ -1,156 +1,163 @@ # $FreeBSD$ -LIBCXXRTDIR= ${.CURDIR}/../../contrib/libcxxrt -HDRDIR= ${.CURDIR}/../../contrib/libc++/include -SRCDIR= ${.CURDIR}/../../contrib/libc++/src -CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} +LIBCXXRTDIR= ${.CURDIR}/../../contrib/libcxxrt +HDRDIR= ${.CURDIR}/../../contrib/libc++/include +SRCDIR= ${.CURDIR}/../../contrib/libc++/src +CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} .PATH: ${SRCDIR} -LIB= c++ -SHLIB_MAJOR= 1 +LIB= c++ +SHLIB_MAJOR= 1 -SRCS+= algorithm.cpp\ - bind.cpp\ - chrono.cpp\ - condition_variable.cpp\ - debug.cpp\ - exception.cpp\ - future.cpp\ - hash.cpp\ - ios.cpp\ - iostream.cpp\ - locale.cpp\ - memory.cpp\ - mutex.cpp\ - new.cpp\ - random.cpp\ - regex.cpp\ - stdexcept.cpp\ - string.cpp\ - strstream.cpp\ - system_error.cpp\ - thread.cpp\ - typeinfo.cpp\ - utility.cpp\ - valarray.cpp - -WARNS= 0 -CXXFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -std=c++0x -nostdlib -DLIBCXXRT - -DPADD= ${LIBCXXRT} -LDADD= -lcxxrt -LDFLAGS+= --verbose -INCSGROUPS= STD EXT - -STD_HEADERS= __bit_reference\ - __config\ - __debug\ - __functional_03\ - __functional_base\ - __functional_base_03\ - __hash_table\ - __locale\ - __mutex_base\ - __split_buffer\ - __sso_allocator\ - __std_stream\ - __tree\ - __tuple\ - __tuple_03\ - __undef_min_max\ - algorithm\ - array\ - atomic\ - bitset\ - cassert\ - ccomplex\ - cctype\ - cerrno\ - cfenv\ - cfloat\ - chrono\ - cinttypes\ - ciso646\ - climits\ - clocale\ - cmath\ - codecvt\ - complex\ - complex.h\ - condition_variable\ - csetjmp\ - csignal\ - cstdarg\ - cstdbool\ - cstddef\ - cstdint\ - cstdio\ - cstdlib\ - cstring\ - ctgmath\ - ctime\ - cwchar\ - cwctype\ - deque\ - exception\ - forward_list\ - fstream\ - functional\ - future\ - initializer_list\ - iomanip\ - ios\ - iosfwd\ - iostream\ - istream\ - iterator\ - limits\ - list\ - locale\ - map\ - memory\ - mutex\ - new\ - numeric\ - ostream\ - queue\ - random\ - ratio\ - regex\ - scoped_allocator\ - set\ - sstream\ - stack\ - stdexcept\ - streambuf\ - string\ - strstream\ - system_error\ - tgmath.h\ - thread\ - tuple\ - type_traits\ - typeindex\ - typeinfo\ - unordered_map\ - unordered_set\ - utility\ - valarray\ - vector +SRCS+= algorithm.cpp\ + bind.cpp\ + chrono.cpp\ + condition_variable.cpp\ + debug.cpp\ + exception.cpp\ + future.cpp\ + hash.cpp\ + ios.cpp\ + iostream.cpp\ + locale.cpp\ + memory.cpp\ + mutex.cpp\ + new.cpp\ + random.cpp\ + regex.cpp\ + stdexcept.cpp\ + string.cpp\ + strstream.cpp\ + system_error.cpp\ + thread.cpp\ + typeinfo.cpp\ + utility.cpp\ + valarray.cpp + +WARNS= 0 +CXXFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -std=c++0x -nostdlib -DLIBCXXRT + +DPADD= ${LIBCXXRT} +LDADD= -lcxxrt +LDFLAGS+= --verbose +INCSGROUPS= STD EXT + +STD_HEADERS= __bit_reference\ + __config\ + __debug\ + __functional_03\ + __functional_base\ + __functional_base_03\ + __hash_table\ + __locale\ + __mutex_base\ + __split_buffer\ + __sso_allocator\ + __std_stream\ + __tree\ + __tuple\ + __tuple_03\ + __undef_min_max\ + algorithm\ + array\ + atomic\ + bitset\ + cassert\ + ccomplex\ + cctype\ + cerrno\ + cfenv\ + cfloat\ + chrono\ + cinttypes\ + ciso646\ + climits\ + clocale\ + cmath\ + codecvt\ + complex\ + complex.h\ + condition_variable\ + csetjmp\ + csignal\ + cstdarg\ + cstdbool\ + cstddef\ + cstdint\ + cstdio\ + cstdlib\ + cstring\ + ctgmath\ + ctime\ + cwchar\ + cwctype\ + deque\ + exception\ + forward_list\ + fstream\ + functional\ + future\ + initializer_list\ + iomanip\ + ios\ + iosfwd\ + iostream\ + istream\ + iterator\ + limits\ + list\ + locale\ + map\ + memory\ + mutex\ + new\ + numeric\ + ostream\ + queue\ + random\ + ratio\ + regex\ + scoped_allocator\ + set\ + sstream\ + stack\ + stdexcept\ + streambuf\ + string\ + strstream\ + system_error\ + tgmath.h\ + thread\ + tuple\ + type_traits\ + typeindex\ + typeinfo\ + unordered_map\ + unordered_set\ + utility\ + valarray\ + vector +RT_HEADERS= cxxabi.h\ + unwind.h\ + unwind-arm.h\ + unwind-itanium.h .for hdr in ${STD_HEADERS} -STD+= ${HDRDIR}/${hdr} +STD+= ${HDRDIR}/${hdr} .endfor -STDDIR= ${CXXINCLUDEDIR} +.for hdr in ${RT_HEADERS} +STD+= ${LIBCXXRTDIR}/${hdr} +.endfor +STDDIR= ${CXXINCLUDEDIR} -EXT_HEADERS= __hash\ - hash_map\ - hash_set +EXT_HEADERS= __hash\ + hash_map\ + hash_set .for hdr in ${EXT_HEADERS} -EXT+= ${HDRDIR}/ext/${hdr} +EXT+= ${HDRDIR}/ext/${hdr} .endfor -EXTDIR= ${CXXINCLUDEDIR}/ext +EXTDIR= ${CXXINCLUDEDIR}/ext .include Modified: user/attilio/vmcontention/lib/libc/gen/getnetgrent.c ============================================================================== --- user/attilio/vmcontention/lib/libc/gen/getnetgrent.c Thu Jun 7 19:48:45 2012 (r236725) +++ user/attilio/vmcontention/lib/libc/gen/getnetgrent.c Thu Jun 7 22:47:53 2012 (r236726) @@ -309,28 +309,30 @@ _revnetgr_lookup(char* lookupdom, char* for (rot = 0; ; rot++) { switch (rot) { - case(0): + case 0: snprintf(key, MAXHOSTNAMELEN, "%s.%s", str, dom ? dom : lookupdom); break; - case(1): + case 1: snprintf(key, MAXHOSTNAMELEN, "%s.*", str); break; - case(2): + case 2: snprintf(key, MAXHOSTNAMELEN, "*.%s", dom ? dom : lookupdom); break; - case(3): + case 3: snprintf(key, MAXHOSTNAMELEN, "*.*"); break; - default: return (0); + default: + return (0); } y = yp_match(lookupdom, map, key, strlen(key), &result, - &resultlen); + &resultlen); if (y == 0) { rv = _listmatch(result, group, resultlen); free(result); - if (rv) return (1); + if (rv) + return (1); } else if (y != YPERR_KEY) { /* * If we get an error other than 'no @@ -417,14 +419,14 @@ innetgr(const char *group, const char *h static int parse_netgrp(const char *group) { - char *spos, *epos; - int len, strpos; + struct netgrp *grp; + struct linelist *lp = linehead; + char **ng; + char *epos, *gpos, *pos, *spos; + int freepos, len, strpos; #ifdef DEBUG int fields; #endif - char *pos, *gpos; - struct netgrp *grp; - struct linelist *lp = linehead; /* * First, see if the line has already been read in. @@ -454,49 +456,48 @@ parse_netgrp(const char *group) /* Watch for null pointer dereferences, dammit! */ while (pos != NULL && *pos != '\0') { if (*pos == '(') { - grp = (struct netgrp *)malloc(sizeof (struct netgrp)); + grp = malloc(sizeof(*grp)); if (grp == NULL) return (1); - bzero((char *)grp, sizeof (struct netgrp)); + ng = grp->ng_str; + bzero(grp, sizeof(*grp)); pos++; gpos = strsep(&pos, ")"); #ifdef DEBUG fields = 0; #endif for (strpos = 0; strpos < 3; strpos++) { - if ((spos = strsep(&gpos, ","))) { -#ifdef DEBUG - fields++; -#endif - while (*spos == ' ' || *spos == '\t') - spos++; - if ((epos = strpbrk(spos, " \t"))) { - *epos = '\0'; - len = epos - spos; - } else - len = strlen(spos); - if (len > 0) { - grp->ng_str[strpos] = (char *) - malloc(len + 1); - if (grp->ng_str[strpos] == NULL) { - int freepos; - for (freepos = 0; freepos < strpos; freepos++) - free(grp->ng_str[freepos]); - free(grp); - return (1); - } - bcopy(spos, grp->ng_str[strpos], - len + 1); - } - } else { + if ((spos = strsep(&gpos, ",")) == NULL) { /* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Thu Jun 7 22:49:50 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7C64106566B; Thu, 7 Jun 2012 22:49:50 +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 89AAA8FC12; Thu, 7 Jun 2012 22:49:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q57Mno4J016311; Thu, 7 Jun 2012 22:49:50 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q57Mno7h016310; Thu, 7 Jun 2012 22:49:50 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201206072249.q57Mno7h016310@svn.freebsd.org> From: Attilio Rao Date: Thu, 7 Jun 2012 22:49:50 +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: r236728 - user/attilio/vmc-playground 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: Thu, 07 Jun 2012 22:49:50 -0000 Author: attilio Date: Thu Jun 7 22:49:50 2012 New Revision: 236728 URL: http://svn.freebsd.org/changeset/base/236728 Log: Create a sub-branch for saving a temporary working version of vmcontention and keep doing experiments. Added: - copied from r236727, user/attilio/vmcontention/ Directory Properties: user/attilio/vmc-playground/ (props changed) From owner-svn-src-user@FreeBSD.ORG Fri Jun 8 00:00:37 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EFFBE106566B; Fri, 8 Jun 2012 00:00:37 +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 C27028FC0C; Fri, 8 Jun 2012 00:00:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5800bR6019614; Fri, 8 Jun 2012 00:00:37 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5800bA5019613; Fri, 8 Jun 2012 00:00:37 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201206080000.q5800bA5019613@svn.freebsd.org> From: Attilio Rao Date: Fri, 8 Jun 2012 00:00:37 +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: r236732 - user/attilio/vmc-playground 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, 08 Jun 2012 00:00:38 -0000 Author: attilio Date: Fri Jun 8 00:00:37 2012 New Revision: 236732 URL: http://svn.freebsd.org/changeset/base/236732 Log: Merge from VMC Modified: Directory Properties: user/attilio/vmc-playground/ (props changed) From owner-svn-src-user@FreeBSD.ORG Fri Jun 8 08:23:56 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 1E938106564A; Fri, 8 Jun 2012 08:23:56 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A7D28FC0A; Fri, 8 Jun 2012 08:23:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q588NtPF042684; Fri, 8 Jun 2012 08:23:55 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q588Ntw6042682; Fri, 8 Jun 2012 08:23:55 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201206080823.q588Ntw6042682@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Fri, 8 Jun 2012 08:23:55 +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: r236739 - user/des/fbce/lib/FBCE/Controller 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, 08 Jun 2012 08:23:56 -0000 Author: des Date: Fri Jun 8 08:23:55 2012 New Revision: 236739 URL: http://svn.freebsd.org/changeset/base/236739 Log: Don't try to interpolate a method call. Modified: user/des/fbce/lib/FBCE/Controller/Vote.pm Modified: user/des/fbce/lib/FBCE/Controller/Vote.pm ============================================================================== --- user/des/fbce/lib/FBCE/Controller/Vote.pm Fri Jun 8 08:04:51 2012 (r236738) +++ user/des/fbce/lib/FBCE/Controller/Vote.pm Fri Jun 8 08:23:55 2012 (r236739) @@ -47,7 +47,8 @@ sub index :Path :Args(0) { } $candidates->reset; if (scalar keys %vote_for > $c->stash->{'max_votes'}) { - $error = "You can only vote for $c->stash->{'max_votes'} candidates."; + $c->stash(error => "You can only vote for " . + $c->stash->{'max_votes'} . " candidates."); } else { my $schema = $user->result_source->schema; $schema->txn_do(sub { @@ -57,7 +58,7 @@ sub index :Path :Args(0) { } }); if ($@) { - $error = "Database error!"; + $c->stash(error => "Database error!"); } else { $c->stash(vote_ok => 1); } @@ -68,9 +69,7 @@ sub index :Path :Args(0) { $voted_for{$vote->candidate->login} = 1; } } - $c->stash(error => $error); $c->stash(candidates => $candidates); - $c->stash(max_votes => $c->stash->{'max_votes'}); $c->stash(voted_for => \%voted_for); } From owner-svn-src-user@FreeBSD.ORG Fri Jun 8 08:26:53 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 28522106566B; Fri, 8 Jun 2012 08:26:53 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 083CD8FC0A; Fri, 8 Jun 2012 08:26:53 +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 q588QqTv042855; Fri, 8 Jun 2012 08:26:52 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q588QqYf042852; Fri, 8 Jun 2012 08:26:52 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201206080826.q588QqYf042852@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Fri, 8 Jun 2012 08:26:52 +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: r236740 - in user/des/fbce/root: static vote 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, 08 Jun 2012 08:26:53 -0000 Author: des Date: Fri Jun 8 08:26:52 2012 New Revision: 236740 URL: http://svn.freebsd.org/changeset/base/236740 Log: Move info and error messages out of the form (and table) and into their own div, with appropriate styling. Clean up the JavaScript code a little; most importantly, use global variables to avoid unnecessary getElementById() calls. Disable the submit button if too many boxes are checked. Remove the cancel button; it is useless and confusing. Modified: user/des/fbce/root/static/fbce.css user/des/fbce/root/vote/index.tt Modified: user/des/fbce/root/static/fbce.css ============================================================================== --- user/des/fbce/root/static/fbce.css Fri Jun 8 08:23:55 2012 (r236739) +++ user/des/fbce/root/static/fbce.css Fri Jun 8 08:26:52 2012 (r236740) @@ -101,6 +101,16 @@ th { overflow: auto; } +.info { + color: green; + font-weight: bold; +} + +.error { + color: red; + font-weight: bold; +} + /* * Footer */ @@ -131,6 +141,14 @@ th { } /* + * Voting + */ +.vote .votebox { + width: 2ex; + text-align: center; +} + +/* * Login page */ .loginform { Modified: user/des/fbce/root/vote/index.tt ============================================================================== --- user/des/fbce/root/vote/index.tt Fri Jun 8 08:23:55 2012 (r236739) +++ user/des/fbce/root/vote/index.tt Fri Jun 8 08:26:52 2012 (r236740) @@ -1,28 +1,36 @@ [% WRAPPER lib/html_top %] @@ -39,40 +47,35 @@

There are no candidates to vote for.

[% ELSE %]

You may vote for up to [% max_votes %] candidates from the list below. You can modify your vote at any time until voting closes (see the schedule on the front page).

+ [% IF vote_ok.defined %] +
+

Your vote was registered. You may change it at any time until voting closes.

+
+ [% END %] + [% IF error.defined %] +
+

[% error | html %]

+
+ [% END %]
- [% IF vote_ok.defined %] - - - - [% END %] - [% IF error.defined %] - - - - [% END %] [% WHILE (candidate = candidates.next) %] [% login = candidate.login %] - + [% END %] - + From owner-svn-src-user@FreeBSD.ORG Fri Jun 8 18:08:31 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F2079106566C; Fri, 8 Jun 2012 18:08:31 +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 DD31B8FC0A; Fri, 8 Jun 2012 18:08:31 +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 q58I8VCl074952; Fri, 8 Jun 2012 18:08:31 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q58I8V3O074950; Fri, 8 Jun 2012 18:08:31 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201206081808.q58I8V3O074950@svn.freebsd.org> From: Attilio Rao Date: Fri, 8 Jun 2012 18:08:31 +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: r236760 - user/attilio/vmc-playground/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: Fri, 08 Jun 2012 18:08:32 -0000 Author: attilio Date: Fri Jun 8 18:08:31 2012 New Revision: 236760 URL: http://svn.freebsd.org/changeset/base/236760 Log: Revert r236367. The target of this is getting at the point where the recovery path is completely removed as we could count on pre-allocation once the path compressed trie is implemented. Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c Modified: user/attilio/vmc-playground/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Jun 8 17:08:27 2012 (r236759) +++ user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Jun 8 18:08:31 2012 (r236760) @@ -99,12 +99,14 @@ #define KSPLT64H(x) ((u_long)(((x) >> 32) & 0xFFFFFFFF)) #endif +CTASSERT(VM_RADIX_HEIGHT >= VM_RADIX_LIMIT); +CTASSERT((sizeof(u_int) * NBBY) >= VM_RADIX_LIMIT); + struct vm_radix_node { void *rn_child[VM_RADIX_COUNT]; /* Child nodes. */ volatile uint32_t rn_count; /* Valid children. */ }; -CTASSERT(VM_RADIX_HEIGHT >= VM_RADIX_LIMIT); CTASSERT(sizeof(struct vm_radix_node) < PAGE_SIZE); static uma_zone_t vm_radix_node_zone; @@ -354,101 +356,6 @@ vm_radix_reclaim_allnodes_internal(struc } /* - * Remove the specified index from the tree. If possible the height of the - * tree is adjusted after deletion. May be used to cleanup intermediate - * nodes of the path if the key is not entirely present. - */ -static void -vm_radix_sweep(struct vm_radix *rtree, vm_pindex_t index, int color, int hard) -{ - struct vm_radix_node *stack[VM_RADIX_LIMIT]; - struct vm_radix_node *rnode, *root; - int level; - int slot; - - level = vm_radix_height(rtree, &root); - KASSERT(index <= VM_RADIX_MAX(level), - ("vm_radix_sweep: %p index out of range %jd.", rtree, - VM_RADIX_MAX(level))); - rnode = root; - level--; - /* - * Find the node and record the path in stack. - */ - while (level && rnode) { - stack[level] = rnode; - slot = vm_radix_slot(index, level); - CTR6(KTR_VM, - "remove: tree %p, " KFRMT64(index) ", level %d, slot %d, rnode %p", - rtree, KSPLT64L(index), KSPLT64H(index), level, slot, - rnode); - CTR4(KTR_VM, "remove: tree %p, rnode %p, child %p, count %u", - rtree, rnode, rnode->rn_child[slot], rnode->rn_count); - rnode = rnode->rn_child[slot]; - level--; - } - if (rnode == NULL) { - if (hard) - panic("vm_radix_sweep: index not present.\n"); - - /* - * Almost certainly it got an half-constructed tree it was - * expected. - */ - KASSERT(level < (VM_RADIX_LIMIT - 1), - ("vm_radix_sweep: level %d not consistent.\n", level)); - ++level; - rnode = stack[level]; - slot = vm_radix_slot(index, level); - } else { - slot = vm_radix_slot(index, 0); - if (hard && - vm_radix_match(rnode->rn_child[slot], color) == NULL) - panic("vm_radix_sweep: index not present as leaf.\n"); - } - - for (;;) { - CTR6(KTR_VM, -"remove: resetting tree %p, " KFRMT64(index) ", level %d, slot %d, rnode %p", - rtree, KSPLT64L(index), KSPLT64H(index), level, slot, - rnode); - CTR4(KTR_VM, - "remove: resetting tree %p, rnode %p, child %p, count %u", - rtree, rnode, - (rnode != NULL) ? rnode->rn_child[slot] : NULL, - (rnode != NULL) ? rnode->rn_count : 0); - rnode->rn_child[slot] = NULL; - /* - * Use atomics for the last level since red and black - * will both adjust it. - * Use a write memory barrier here in order to avoid - * rn_count reaching 0 before to fetch the actual pointer. - * Concurrent black removal, infact, may want to reclaim - * the radix node itself before to read it. - */ - MPASS(rnode->rn_count != 0); - if (level == 0) - atomic_add_rel_32(&rnode->rn_count, -1); - else - rnode->rn_count--; - - /* - * Only allow black removes to prune the tree. - */ - if ((color & VM_RADIX_BLACK) == 0 || rnode->rn_count > 0) - break; - vm_radix_node_put(rnode); - if (rnode == root) { - vm_radix_setroot(rtree, NULL, 0); - break; - } - rnode = stack[++level]; - slot = vm_radix_slot(index, level); - - } -} - -/* * Inserts the key-value pair in to the radix tree. Returns errno. * Panics if the key already exists. */ @@ -456,7 +363,8 @@ int vm_radix_insert(struct vm_radix *rtree, vm_pindex_t index, void *val) { struct vm_radix_node *iroot, *rnode, *root; - int ilevel, level, slot; + u_int allocmsk; + int clev, ilevel, level, slot; CTR4(KTR_VM, "insert: tree %p, " KFRMT64(index) ", val %p", rtree, @@ -509,17 +417,13 @@ 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); /* Add the required intermidiate nodes. */ if (rnode->rn_child[slot] == NULL) { - - /* - * In case of failed allocation, the vm_radix_sweep() - * will unwind back rn_count appropriately. - */ - rnode->rn_count++; rnode->rn_child[slot] = vm_radix_node_get(); if (rnode->rn_child[slot] == NULL) { CTR6(KTR_VM, @@ -530,17 +434,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); - vm_radix_sweep(rtree, index, VM_RADIX_BLACK, 0); - - /* - * vm_radix_sweep() may have changed the shape - * of the tree, refetch the root. - */ - vm_radix_height(rtree, &root); + MPASS(level != clev || allocmsk == 0); + while (allocmsk != 0) { + 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); + 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); } CTR6(KTR_VM, "insert: tree %p, " KFRMT64(index) ", level %d, slot %d, rnode %p", @@ -890,13 +812,86 @@ restart: } /* - * Remove an entry from the tree. Expects the entry to be already present. + * Remove the specified index from the tree. If possible the height of the + * tree is adjusted after deletion. The value stored at index is returned + * panics if the key is not present. */ -void +void * vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index, int color) { + struct vm_radix_node *stack[VM_RADIX_LIMIT]; + struct vm_radix_node *rnode, *root; + void *val; + int level; + int slot; - vm_radix_sweep(rtree, index, color, 1); + level = vm_radix_height(rtree, &root); + KASSERT(index <= VM_RADIX_MAX(level), + ("vm_radix_remove: %p index out of range %jd.", rtree, + VM_RADIX_MAX(level))); + rnode = root; + val = NULL; + level--; + /* + * Find the node and record the path in stack. + */ + while (level && rnode) { + stack[level] = rnode; + slot = vm_radix_slot(index, level); + CTR6(KTR_VM, + "remove: tree %p, " KFRMT64(index) ", level %d, slot %d, rnode %p", + rtree, KSPLT64L(index), KSPLT64H(index), level, slot, + rnode); + CTR4(KTR_VM, "remove: tree %p, rnode %p, child %p, count %u", + rtree, rnode, rnode->rn_child[slot], rnode->rn_count); + rnode = rnode->rn_child[slot]; + level--; + } + KASSERT(rnode != NULL, + ("vm_radix_remove: index not present in the tree.\n")); + slot = vm_radix_slot(index, 0); + val = vm_radix_match(rnode->rn_child[slot], color); + KASSERT(val != NULL, + ("vm_radix_remove: index not present in the tree.\n")); + + for (;;) { + CTR6(KTR_VM, +"remove: resetting tree %p, " KFRMT64(index) ", level %d, slot %d, rnode %p", + rtree, KSPLT64L(index), KSPLT64H(index), level, slot, + rnode); + CTR4(KTR_VM, + "remove: resetting tree %p, rnode %p, child %p, count %u", + rtree, rnode, + (rnode != NULL) ? rnode->rn_child[slot] : NULL, + (rnode != NULL) ? rnode->rn_count : 0); + rnode->rn_child[slot] = NULL; + /* + * Use atomics for the last level since red and black + * will both adjust it. + * Use a write memory barrier here in order to avoid + * rn_count reaching 0 before to fetch the actual pointer. + * Concurrent black removal, infact, may want to reclaim + * the radix node itself before to read it. + */ + if (level == 0) + atomic_add_rel_32(&rnode->rn_count, -1); + else + rnode->rn_count--; + /* + * Only allow black removes to prune the tree. + */ + if ((color & VM_RADIX_BLACK) == 0 || rnode->rn_count > 0) + break; + vm_radix_node_put(rnode); + if (rnode == root) { + vm_radix_setroot(rtree, NULL, 0); + break; + } + rnode = stack[++level]; + slot = vm_radix_slot(index, level); + + } + return (val); } /* From owner-svn-src-user@FreeBSD.ORG Fri Jun 8 18:11:22 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 934A2106567F; Fri, 8 Jun 2012 18:11:22 +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 7F6328FC20; Fri, 8 Jun 2012 18:11:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q58IBMY0075141; Fri, 8 Jun 2012 18:11:22 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q58IBMeb075139; Fri, 8 Jun 2012 18:11:22 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201206081811.q58IBMeb075139@svn.freebsd.org> From: Attilio Rao Date: Fri, 8 Jun 2012 18:11:22 +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: r236761 - user/attilio/vmc-playground/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: Fri, 08 Jun 2012 18:11:22 -0000 Author: attilio Date: Fri Jun 8 18:11:21 2012 New Revision: 236761 URL: http://svn.freebsd.org/changeset/base/236761 Log: Revert r234033, 234007. The target of this is getting at the point where the recovery path is completely removed as we could count on pre-allocation once the path compressed trie is implemented. Modified: user/attilio/vmc-playground/sys/vm/device_pager.c Modified: user/attilio/vmc-playground/sys/vm/device_pager.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/device_pager.c Fri Jun 8 18:08:31 2012 (r236760) +++ user/attilio/vmc-playground/sys/vm/device_pager.c Fri Jun 8 18:11:21 2012 (r236761) @@ -52,8 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - static void dev_pager_init(void); static vm_object_t dev_pager_alloc(void *, vm_ooffset_t, vm_prot_t, vm_ooffset_t, struct ucred *); @@ -298,7 +296,7 @@ old_dev_pager_fault(vm_object_t object, struct file *fpop; struct thread *td; vm_memattr_t memattr; - int i, ref, ret; + int ref, ret; pidx = OFF_TO_IDX(offset); memattr = object->memattr; @@ -346,14 +344,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; - while (vm_page_insert(page, object, pidx) != 0) { - for (i = 0; i < 10000000; i++) - cpu_spinwait(); - } } page->valid = VM_PAGE_BITS_ALL; return (VM_PAGER_OK); From owner-svn-src-user@FreeBSD.ORG Fri Jun 8 18:44:55 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 A2436106566C; Fri, 8 Jun 2012 18:44:55 +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 8B7F28FC0A; Fri, 8 Jun 2012 18:44:55 +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 q58Iit7B076720; Fri, 8 Jun 2012 18:44:55 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q58IitNv076711; Fri, 8 Jun 2012 18:44:55 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201206081844.q58IitNv076711@svn.freebsd.org> From: Attilio Rao Date: Fri, 8 Jun 2012 18:44:55 +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: r236763 - in user/attilio/vmc-playground/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: Fri, 08 Jun 2012 18:44:55 -0000 Author: attilio Date: Fri Jun 8 18:44:54 2012 New Revision: 236763 URL: http://svn.freebsd.org/changeset/base/236763 Log: Revert r231027 and fix the prototype for vm_radix_remove(). The target of this is getting at the point where the recovery path is completely removed as we could count on pre-allocation once the path compressed trie is implemented. Modified: user/attilio/vmc-playground/sys/kern/subr_uio.c user/attilio/vmc-playground/sys/vm/device_pager.c user/attilio/vmc-playground/sys/vm/sg_pager.c user/attilio/vmc-playground/sys/vm/vm_fault.c user/attilio/vmc-playground/sys/vm/vm_object.c user/attilio/vmc-playground/sys/vm/vm_page.c user/attilio/vmc-playground/sys/vm/vm_page.h user/attilio/vmc-playground/sys/vm/vm_radix.c Modified: user/attilio/vmc-playground/sys/kern/subr_uio.c ============================================================================== --- user/attilio/vmc-playground/sys/kern/subr_uio.c Fri Jun 8 18:32:09 2012 (r236762) +++ user/attilio/vmc-playground/sys/kern/subr_uio.c Fri Jun 8 18:44:54 2012 (r236763) @@ -85,7 +85,6 @@ 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, @@ -96,7 +95,6 @@ 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")); @@ -107,13 +105,6 @@ 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")) @@ -131,6 +122,8 @@ 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/vmc-playground/sys/vm/device_pager.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/device_pager.c Fri Jun 8 18:32:09 2012 (r236762) +++ user/attilio/vmc-playground/sys/vm/device_pager.c Fri Jun 8 18:44:54 2012 (r236763) @@ -344,14 +344,11 @@ 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/vmc-playground/sys/vm/sg_pager.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/sg_pager.c Fri Jun 8 18:32:09 2012 (r236762) +++ user/attilio/vmc-playground/sys/vm/sg_pager.c Fri Jun 8 18:44:54 2012 (r236763) @@ -179,10 +179,6 @@ 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. */ @@ -191,6 +187,7 @@ 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/vmc-playground/sys/vm/vm_fault.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_fault.c Fri Jun 8 18:32:09 2012 (r236762) +++ user/attilio/vmc-playground/sys/vm/vm_fault.c Fri Jun 8 18:44:54 2012 (r236763) @@ -762,7 +762,9 @@ 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/vmc-playground/sys/vm/vm_object.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_object.c Fri Jun 8 18:32:09 2012 (r236762) +++ user/attilio/vmc-playground/sys/vm/vm_object.c Fri Jun 8 18:44:54 2012 (r236763) @@ -1418,7 +1418,9 @@ 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 @@ -1673,7 +1675,9 @@ 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/vmc-playground/sys/vm/vm_page.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_page.c Fri Jun 8 18:32:09 2012 (r236762) +++ user/attilio/vmc-playground/sys/vm/vm_page.c Fri Jun 8 18:44:54 2012 (r236763) @@ -109,7 +109,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include /* @@ -819,15 +818,13 @@ vm_page_dirty(vm_page_t m) * The object and page must be locked. * This routine may not block. */ -int +void 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 @@ -848,13 +845,8 @@ 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) { - TAILQ_REMOVE(&object->memq, m, listq); - m->object = NULL; - m->pindex = cpindex; - return (ENOMEM); - } + if (vm_radix_insert(&object->rtree, pindex, m) != 0) + panic("vm_page_insert: unable to insert the new page"); /* * show that the object has one more resident page. @@ -872,7 +864,6 @@ vm_page_insert(vm_page_t m, vm_object_t */ if (m->aflags & PGA_WRITEABLE) vm_object_set_writeable_dirty(object); - return (0); } /* @@ -1017,20 +1008,9 @@ 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_unlock(m); - while (vm_page_insert(m, new_object, new_pindex) != 0) { - pagedaemon_wakeup(); - for (i = 0; i < 10000000; i++) - cpu_spinwait(); - } + vm_page_insert(m, new_object, new_pindex); vm_page_dirty(m); } @@ -1311,19 +1291,7 @@ 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); - 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); - } + vm_page_insert(m, object, pindex); } else m->pindex = pindex; @@ -1390,7 +1358,6 @@ 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; @@ -1477,7 +1444,6 @@ 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; @@ -1487,30 +1453,12 @@ 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; @@ -2732,8 +2680,11 @@ 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; @@ -2759,9 +2710,8 @@ 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/vmc-playground/sys/vm/vm_page.h ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_page.h Fri Jun 8 18:32:09 2012 (r236762) +++ user/attilio/vmc-playground/sys/vm/vm_page.h Fri Jun 8 18:44:54 2012 (r236763) @@ -378,7 +378,7 @@ 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_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr); -int vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); +void 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/vmc-playground/sys/vm/vm_radix.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Jun 8 18:32:09 2012 (r236762) +++ user/attilio/vmc-playground/sys/vm/vm_radix.c Fri Jun 8 18:44:54 2012 (r236763) @@ -100,7 +100,6 @@ #endif CTASSERT(VM_RADIX_HEIGHT >= VM_RADIX_LIMIT); -CTASSERT((sizeof(u_int) * NBBY) >= VM_RADIX_LIMIT); struct vm_radix_node { void *rn_child[VM_RADIX_COUNT]; /* Child nodes. */ @@ -293,24 +292,6 @@ 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) { @@ -362,9 +343,10 @@ vm_radix_reclaim_allnodes_internal(struc int vm_radix_insert(struct vm_radix *rtree, vm_pindex_t index, void *val) { - struct vm_radix_node *iroot, *rnode, *root; - u_int allocmsk; - int clev, ilevel, level, slot; + struct vm_radix_node *rnode; + struct vm_radix_node *root; + int level; + int slot; CTR4(KTR_VM, "insert: tree %p, " KFRMT64(index) ", val %p", rtree, @@ -376,8 +358,6 @@ 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)) { CTR5(KTR_VM, "insert: expanding " KFRMT64(index) ">" KFRMT64(mxl) ", height %d", @@ -398,8 +378,6 @@ vm_radix_insert(struct vm_radix *rtree, "insert: tree %p, root %p, " KFRMT64(index) ", level %d ENOMEM", rtree, root, KSPLT64L(index), KSPLT64H(index), level); - vm_radix_unwind_heightup(rtree, root, iroot, - ilevel); return (ENOMEM); } /* @@ -417,8 +395,6 @@ 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); @@ -434,35 +410,9 @@ 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--; - slot = vm_radix_slot(index, level); - CTR4(KTR_VM, - "insert: unwind root %p, level %d, slot %d, allocmsk: 0x%x", - root, level, slot, allocmsk); - 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); + return (ENOMEM); } rnode->rn_count++; - allocmsk |= (1 << level); } CTR6(KTR_VM, "insert: tree %p, " KFRMT64(index) ", level %d, slot %d, rnode %p", @@ -816,12 +766,11 @@ restart: * tree is adjusted after deletion. The value stored at index is returned * panics if the key is not present. */ -void * +void vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index, int color) { struct vm_radix_node *stack[VM_RADIX_LIMIT]; struct vm_radix_node *rnode, *root; - void *val; int level; int slot; @@ -830,7 +779,6 @@ vm_radix_remove(struct vm_radix *rtree, ("vm_radix_remove: %p index out of range %jd.", rtree, VM_RADIX_MAX(level))); rnode = root; - val = NULL; level--; /* * Find the node and record the path in stack. @@ -850,8 +798,7 @@ vm_radix_remove(struct vm_radix *rtree, KASSERT(rnode != NULL, ("vm_radix_remove: index not present in the tree.\n")); slot = vm_radix_slot(index, 0); - val = vm_radix_match(rnode->rn_child[slot], color); - KASSERT(val != NULL, + KASSERT(vm_radix_match(rnode->rn_child[slot], color) != NULL, ("vm_radix_remove: index not present in the tree.\n")); for (;;) { @@ -891,7 +838,6 @@ vm_radix_remove(struct vm_radix *rtree, slot = vm_radix_slot(index, level); } - return (val); } /* From owner-svn-src-user@FreeBSD.ORG Sat Jun 9 12:25:31 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 6D471106564A; Sat, 9 Jun 2012 12:25:31 +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 3F05B8FC0A; Sat, 9 Jun 2012 12:25:31 +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 q59CPVOC032426; Sat, 9 Jun 2012 12:25:31 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q59CPVO3032423; Sat, 9 Jun 2012 12:25:31 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201206091225.q59CPVO3032423@svn.freebsd.org> From: Attilio Rao Date: Sat, 9 Jun 2012 12:25:31 +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: r236811 - user/attilio/vmc-playground/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: Sat, 09 Jun 2012 12:25:31 -0000 Author: attilio Date: Sat Jun 9 12:25:30 2012 New Revision: 236811 URL: http://svn.freebsd.org/changeset/base/236811 Log: Introduce a new tree for dealing with cached pages separately and remove the RED/BLACK concept. This is based on the assumption that path-compressed tries will be small and fast enough that a separate trie for cached pages will make sense and will leave the trie code simple enough (along with removing a lot of differences in the userend code). Modified: user/attilio/vmc-playground/sys/vm/vm_object.c user/attilio/vmc-playground/sys/vm/vm_object.h Modified: user/attilio/vmc-playground/sys/vm/vm_object.c ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_object.c Sat Jun 9 11:41:29 2012 (r236810) +++ user/attilio/vmc-playground/sys/vm/vm_object.c Sat Jun 9 12:25:30 2012 (r236811) @@ -211,6 +211,7 @@ _vm_object_allocate(objtype_t type, vm_p LIST_INIT(&object->shadow_head); object->rtree.rt_root = 0; + object->cache.rt_root = 0; object->type = type; object->size = size; object->generation = 1; @@ -773,6 +774,7 @@ vm_object_terminate(vm_object_t object) break; } vm_radix_reclaim_allnodes(&object->rtree); + vm_radix_reclaim_allnodes(&object->cache); /* * If the object contained any pages, then reset it to an empty state. * None of the object's fields, including "resident_page_count", were Modified: user/attilio/vmc-playground/sys/vm/vm_object.h ============================================================================== --- user/attilio/vmc-playground/sys/vm/vm_object.h Sat Jun 9 11:41:29 2012 (r236810) +++ user/attilio/vmc-playground/sys/vm/vm_object.h Sat Jun 9 12:25:30 2012 (r236811) @@ -90,6 +90,7 @@ struct vm_object { LIST_ENTRY(vm_object) shadow_list; /* chain of shadow objects */ TAILQ_HEAD(, vm_page) memq; /* list of resident pages */ struct vm_radix rtree; /* root of the resident page radix index tree */ + struct vm_radix cache; /* root of the cache page radix index tree */ vm_pindex_t size; /* Object size */ int generation; /* generation ID */ int ref_count; /* How many refs?? */ From owner-svn-src-user@FreeBSD.ORG Sat Jun 9 16:44: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 F2FB61065672; Sat, 9 Jun 2012 16:44:35 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C62AF8FC14; Sat, 9 Jun 2012 16:44: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 q59GiZsU043374; Sat, 9 Jun 2012 16:44:35 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q59GiZIB043372; Sat, 9 Jun 2012 16:44:35 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201206091644.q59GiZIB043372@svn.freebsd.org> From: Doug Barton Date: Sat, 9 Jun 2012 16:44: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: r236818 - user/dougb/portmaster 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: Sat, 09 Jun 2012 16:44:36 -0000 Author: dougb Date: Sat Jun 9 16:44:35 2012 New Revision: 236818 URL: http://svn.freebsd.org/changeset/base/236818 Log: Print the same progress update that goes to the term title in-line Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Sat Jun 9 16:22:52 2012 (r236817) +++ user/dougb/portmaster/portmaster Sat Jun 9 16:44:35 2012 (r236818) @@ -2208,6 +2208,11 @@ check_fetch_only () { } term_printf () { + case "$1" in + '') [ -n "$PM_MULTI_PORTS" ] && echo -e "\n===>>> ${PM_PARENT_PORT}" ;; + *\>\>*) echo -e "\n===>>> ${PM_PARENT_PORT}${1}" ;; + esac + [ -n "$PM_NO_TERM_TITLE" ] && return case "$TERM" in cons*) return ;; esac @@ -2280,14 +2285,9 @@ update_port () { [ -n "$PM_FIRST_PASS" ] && num_of_deps=$(( $num_of_deps + 1 )) - deps=" (${dep_of_deps}/${num_of_deps})" + deps="(${dep_of_deps}/${num_of_deps})" - if [ -n "$PM_DEPTH" ]; then - echo " ${PM_DEPTH}>> ${1#$pd/}" - term_printf " ${PM_DEPTH#* }>> ${1#$pd/}${deps}" - else - [ -n "$UPDATE_ALL" ] && term_printf " >> ${1#$pd/}${deps}" - fi + term_printf " ${PM_DEPTH#* }>> ${1#$pd/} ${deps}" [ -n "$doing_dep_check" -o \( -n "$UPDATE_ALL" -a -n "$PM_FIRST_PASS" \) ] && unset NO_DEP_UPDATES @@ -2302,15 +2302,14 @@ update_port () { if [ -n "$UPDATE_ALL" ]; then term_printf " (${num_of_deps})" - echo "===>>> Returning to update check of installed ports" - echo '' + echo -e "\n===>>> Returning to update check of installed ports\n" elif [ -n "$PM_URB" ]; then return 0 elif [ -n "$PM_FIRST_PASS" -a -z "$PM_PACKAGES" ]; then echo "===>>> Continuing initial dependency check for $portdir" else term_printf " ${PM_DEPTH#* }${deps}" - echo "===>>> Returning to dependency check for $portdir" + echo -e "\n===>>> Returning to dependency check for $portdir" fi return 0 } # update_port() @@ -2527,17 +2526,15 @@ dependency_check () { safe_exit elif [ -n "$PM_FIRST_PASS" -a -z "$PM_PACKAGES" ]; then echo "===>>> Initial dependency check complete for $portdir" - case "$PM_DEPTH" in *\>\>*) echo " $PM_DEPTH" ;; esac else echo "===>>> Dependency check complete for $portdir" + local deps ; deps="(${dep_of_deps}/${num_of_deps})" case "$PM_DEPTH" in - *\>\>*) echo " $PM_DEPTH" ;; + *\>\>*) term_printf " ${PM_DEPTH#* }${deps}" ; echo '' ;; *) if [ "$PM_PARENT_PORT" = All ]; then - local deps - deps=" (${dep_of_deps}/${num_of_deps})" term_printf " >> ${upg_port:-$portdir}${deps}" else - term_printf + term_printf ; echo '' # multiport fi ;; esac fi @@ -2971,7 +2968,7 @@ all_first_pass () { check_exclude $iport || continue - PM_DEPTH= + PM_DEPTH="$iport " check_for_updates $iport $origin || fail 'Update failed' done }
-

Your vote was registered. You may change it at any time until voting closes.

-
-

[% error | html %]

-
[% candidate.statement.short | html %]
XX votes cast

- - +