From d0f59cad4f86143d51d9e751a186e5d9c367cb25 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sat, 6 Oct 2012 18:59:50 +0800 Subject: [PATCH 01/16] igb: Change polling(4) support to ifpoll support For 82576, this means that all of the 16 RX rings could be enabled and fully utilized; even in MSI-X mode, only 8 RX rings could be used. --- sys/dev/netif/igb/Makefile | 9 +- sys/dev/netif/igb/if_igb.c | 239 ++++++++++++++++++++++++++++++------- sys/dev/netif/igb/if_igb.h | 2 + 3 files changed, 200 insertions(+), 50 deletions(-) diff --git a/sys/dev/netif/igb/Makefile b/sys/dev/netif/igb/Makefile index 6b644f385f..845ce8f116 100644 --- a/sys/dev/netif/igb/Makefile +++ b/sys/dev/netif/igb/Makefile @@ -1,14 +1,13 @@ KMOD= if_igb SRCS= if_igb.c SRCS+= device_if.h bus_if.h pci_if.h -SRCS+= opt_polling.h opt_igb.h +SRCS+= opt_ifpoll.h opt_igb.h .ifndef BUILDING_WITH_KERNEL -opt_polling.h: - echo '#define DEVICE_POLLING 1' > ${.OBJDIR}/${.TARGET} +opt_ifpoll.h: + touch ${.OBJDIR}/${.TARGET} opt_igb.h: - echo '#define IGB_RSS_DEBUG 1' > ${.OBJDIR}/${.TARGET} - echo '#define IGB_MSIX_DEBUG 1' > ${.OBJDIR}/${.TARGET} + touch ${.OBJDIR}/${.TARGET} .endif .include diff --git a/sys/dev/netif/igb/if_igb.c b/sys/dev/netif/igb/if_igb.c index 8260179da2..1284baef88 100644 --- a/sys/dev/netif/igb/if_igb.c +++ b/sys/dev/netif/igb/if_igb.c @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "opt_polling.h" +#include "opt_ifpoll.h" #include "opt_igb.h" #include @@ -143,6 +143,10 @@ static int igb_sysctl_intr_rate(SYSCTL_HANDLER_ARGS); static int igb_sysctl_msix_rate(SYSCTL_HANDLER_ARGS); static int igb_sysctl_tx_intr_nsegs(SYSCTL_HANDLER_ARGS); static void igb_set_ring_inuse(struct igb_softc *, boolean_t); +#ifdef IFPOLL_ENABLE +static int igb_sysctl_npoll_rxoff(SYSCTL_HANDLER_ARGS); +static int igb_sysctl_npoll_txoff(SYSCTL_HANDLER_ARGS); +#endif static void igb_vf_init_stats(struct igb_softc *); static void igb_reset(struct igb_softc *); @@ -178,8 +182,11 @@ static int igb_media_change(struct ifnet *); static void igb_timer(void *); static void igb_watchdog(struct ifnet *); static void igb_start(struct ifnet *); -#ifdef DEVICE_POLLING -static void igb_poll(struct ifnet *, enum poll_cmd, int); +#ifdef IFPOLL_ENABLE +static void igb_npoll(struct ifnet *, struct ifpoll_info *); +static void igb_npoll_rx(struct ifnet *, void *, int); +static void igb_npoll_tx(struct ifnet *, void *, int); +static void igb_npoll_status(struct ifnet *, int); #endif static void igb_serialize(struct ifnet *, enum ifnet_serialize); static void igb_deserialize(struct ifnet *, enum ifnet_serialize); @@ -345,6 +352,9 @@ igb_attach(device_t dev) struct igb_softc *sc = device_get_softc(dev); uint16_t eeprom_data; int error = 0, i, j, ring_max; +#ifdef IFPOLL_ENABLE + int offset, offset_def; +#endif #ifdef notyet /* SYSCTL stuff */ @@ -472,6 +482,37 @@ igb_attach(device_t dev) if (error) goto failed; +#ifdef IFPOLL_ENABLE + /* + * NPOLLING RX CPU offset + */ + if (sc->rx_ring_cnt == ncpus2) { + offset = 0; + } else { + offset_def = (sc->rx_ring_cnt * device_get_unit(dev)) % ncpus2; + offset = device_getenv_int(dev, "npoll.rxoff", offset_def); + if (offset >= ncpus2 || + offset % sc->rx_ring_cnt != 0) { + device_printf(dev, "invalid npoll.rxoff %d, use %d\n", + offset, offset_def); + offset = offset_def; + } + } + sc->rx_npoll_off = offset; + + /* + * NPOLLING TX CPU offset + */ + offset_def = sc->rx_npoll_off; + offset = device_getenv_int(dev, "npoll.txoff", offset_def); + if (offset >= ncpus2) { + device_printf(dev, "invalid npoll.txoff %d, use %d\n", + offset, offset_def); + offset = offset_def; + } + sc->tx_npoll_off = offset; +#endif + /* Allocate interrupt */ error = igb_alloc_intr(sc); if (error) @@ -785,8 +826,8 @@ igb_ioctl(struct ifnet *ifp, u_long command, caddr_t data, struct ucred *cr) if (ifp->if_flags & IFF_RUNNING) { igb_disable_intr(sc); igb_set_multi(sc); -#ifdef DEVICE_POLLING - if (!(ifp->if_flags & IFF_POLLING)) +#ifdef IFPOLL_ENABLE + if (!(ifp->if_flags & IFF_NPOLLING)) #endif igb_enable_intr(sc); } @@ -876,8 +917,8 @@ igb_init(void *xsc) igb_get_mgmt(sc); polling = FALSE; -#ifdef DEVICE_POLLING - if (ifp->if_flags & IFF_POLLING) +#ifdef IFPOLL_ENABLE + if (ifp->if_flags & IFF_NPOLLING) polling = TRUE; #endif @@ -1397,8 +1438,8 @@ igb_setup_ifp(struct igb_softc *sc) #ifdef INVARIANTS ifp->if_serialize_assert = igb_serialize_assert; #endif -#ifdef DEVICE_POLLING - ifp->if_poll = igb_poll; +#ifdef IFPOLL_ENABLE + ifp->if_npoll = igb_npoll; #endif ifp->if_watchdog = igb_watchdog; @@ -1497,6 +1538,15 @@ igb_add_sysctl(struct igb_softc *sc) sc, 0, igb_sysctl_tx_intr_nsegs, "I", "# of segments per TX interrupt"); +#ifdef IFPOLL_ENABLE + SYSCTL_ADD_PROC(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), + OID_AUTO, "npoll_rxoff", CTLTYPE_INT|CTLFLAG_RW, + sc, 0, igb_sysctl_npoll_rxoff, "I", "NPOLLING RX cpu offset"); + SYSCTL_ADD_PROC(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), + OID_AUTO, "npoll_txoff", CTLTYPE_INT|CTLFLAG_RW, + sc, 0, igb_sysctl_npoll_txoff, "I", "NPOLLING TX cpu offset"); +#endif + #ifdef IGB_RSS_DEBUG SYSCTL_ADD_INT(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "rss_debug", CTLFLAG_RW, &sc->rss_debug, 0, @@ -2883,55 +2933,96 @@ igb_update_vf_stats_counters(struct igb_softc *sc) UPDATE_VF_REG(E1000_VFMPRC, stats->last_mprc, stats->mprc); } -#ifdef DEVICE_POLLING +#ifdef IFPOLL_ENABLE static void -igb_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +igb_npoll_status(struct ifnet *ifp, int pollhz __unused) { struct igb_softc *sc = ifp->if_softc; uint32_t reg_icr; - switch (cmd) { - case POLL_REGISTER: - case POLL_DEREGISTER: - ASSERT_IFNET_SERIALIZED_ALL(ifp); - igb_init(sc); - break; + ASSERT_SERIALIZED(&sc->main_serialize); - case POLL_AND_CHECK_STATUS: - ASSERT_SERIALIZED(&sc->main_serialize); - reg_icr = E1000_READ_REG(&sc->hw, E1000_ICR); - if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) { - sc->hw.mac.get_link_status = 1; - igb_update_link_status(sc); - } - /* FALL THROUGH */ - case POLL_ONLY: - ASSERT_SERIALIZED(&sc->main_serialize); - if (ifp->if_flags & IFF_RUNNING) { - struct igb_tx_ring *txr; - int i; + reg_icr = E1000_READ_REG(&sc->hw, E1000_ICR); + if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) { + sc->hw.mac.get_link_status = 1; + igb_update_link_status(sc); + } +} - for (i = 0; i < sc->rx_ring_inuse; ++i) { - struct igb_rx_ring *rxr = &sc->rx_rings[i]; +static void +igb_npoll_tx(struct ifnet *ifp, void *arg, int cycle __unused) +{ + struct igb_tx_ring *txr = arg; - lwkt_serialize_enter(&rxr->rx_serialize); - igb_rxeof(rxr, count); - lwkt_serialize_exit(&rxr->rx_serialize); - } + ASSERT_SERIALIZED(&txr->tx_serialize); - txr = &sc->tx_rings[0]; - lwkt_serialize_enter(&txr->tx_serialize); - igb_txeof(txr); - if (!ifq_is_empty(&ifp->if_snd)) - if_devstart(ifp); - lwkt_serialize_exit(&txr->tx_serialize); + igb_txeof(txr); + if (!ifq_is_empty(&ifp->if_snd)) + if_devstart(ifp); +} + +static void +igb_npoll_rx(struct ifnet *ifp __unused, void *arg, int cycle) +{ + struct igb_rx_ring *rxr = arg; + + ASSERT_SERIALIZED(&rxr->rx_serialize); + + igb_rxeof(rxr, cycle); +} + +static void +igb_npoll(struct ifnet *ifp, struct ifpoll_info *info) +{ + struct igb_softc *sc = ifp->if_softc; + + ASSERT_IFNET_SERIALIZED_ALL(ifp); + + if (info) { + struct igb_tx_ring *txr; + int i, off; + + info->ifpi_status.status_func = igb_npoll_status; + info->ifpi_status.serializer = &sc->main_serialize; + + off = sc->tx_npoll_off; + KKASSERT(off < ncpus2); + txr = &sc->tx_rings[0]; + info->ifpi_tx[off].poll_func = igb_npoll_tx; + info->ifpi_tx[off].arg = txr; + info->ifpi_tx[off].serializer = &txr->tx_serialize; + + off = sc->rx_npoll_off; + for (i = 0; i < sc->rx_ring_cnt; ++i) { + struct igb_rx_ring *rxr = &sc->rx_rings[i]; + int idx = i + off; + + KKASSERT(idx < ncpus2); + info->ifpi_rx[idx].poll_func = igb_npoll_rx; + info->ifpi_rx[idx].arg = rxr; + info->ifpi_rx[idx].serializer = &rxr->rx_serialize; } - break; + + if (ifp->if_flags & IFF_RUNNING) { + if (sc->rx_ring_inuse == sc->rx_ring_cnt) + igb_disable_intr(sc); + else + igb_init(sc); + } + ifp->if_npoll_cpuid = sc->tx_npoll_off; + } else { + if (ifp->if_flags & IFF_RUNNING) { + if (sc->rx_ring_inuse == sc->rx_ring_cnt) + igb_enable_intr(sc); + else + igb_init(sc); + } + ifp->if_npoll_cpuid = -1; } } -#endif /* DEVICE_POLLING */ +#endif /* IFPOLL_ENABLE */ static void igb_intr(void *xsc) @@ -3378,6 +3469,62 @@ igb_sysctl_tx_intr_nsegs(SYSCTL_HANDLER_ARGS) return error; } +#ifdef IFPOLL_ENABLE + +static int +igb_sysctl_npoll_rxoff(SYSCTL_HANDLER_ARGS) +{ + struct igb_softc *sc = (void *)arg1; + struct ifnet *ifp = &sc->arpcom.ac_if; + int error, off; + + off = sc->rx_npoll_off; + error = sysctl_handle_int(oidp, &off, 0, req); + if (error || req->newptr == NULL) + return error; + if (off < 0) + return EINVAL; + + ifnet_serialize_all(ifp); + if (off >= ncpus2 || off % sc->rx_ring_cnt != 0) { + error = EINVAL; + } else { + error = 0; + sc->rx_npoll_off = off; + } + ifnet_deserialize_all(ifp); + + return error; +} + +static int +igb_sysctl_npoll_txoff(SYSCTL_HANDLER_ARGS) +{ + struct igb_softc *sc = (void *)arg1; + struct ifnet *ifp = &sc->arpcom.ac_if; + int error, off; + + off = sc->tx_npoll_off; + error = sysctl_handle_int(oidp, &off, 0, req); + if (error || req->newptr == NULL) + return error; + if (off < 0) + return EINVAL; + + ifnet_serialize_all(ifp); + if (off >= ncpus2) { + error = EINVAL; + } else { + error = 0; + sc->tx_npoll_off = off; + } + ifnet_deserialize_all(ifp); + + return error; +} + +#endif /* IFPOLL_ENABLE */ + static void igb_init_intr(struct igb_softc *sc) { @@ -4172,7 +4319,9 @@ igb_set_ring_inuse(struct igb_softc *sc, boolean_t polling) if (!IGB_ENABLE_HWRSS(sc)) return; - if (sc->intr_type != PCI_INTR_TYPE_MSIX || polling) + if (polling) + sc->rx_ring_inuse = sc->rx_ring_cnt; + else if (sc->intr_type != PCI_INTR_TYPE_MSIX) sc->rx_ring_inuse = IGB_MIN_RING_RSS; else sc->rx_ring_inuse = sc->rx_ring_msix; diff --git a/sys/dev/netif/igb/if_igb.h b/sys/dev/netif/igb/if_igb.h index 84e1c582a7..539f62352a 100644 --- a/sys/dev/netif/igb/if_igb.h +++ b/sys/dev/netif/igb/if_igb.h @@ -331,6 +331,8 @@ struct igb_softc { /* Multicast array pointer */ uint8_t *mta; + int rx_npoll_off; + int tx_npoll_off; int serialize_cnt; int tx_serialize; int rx_serialize; -- 2.41.0 From f23fc0d8326c9530526be3bbcaa08a9ed501a288 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sat, 6 Oct 2012 23:02:52 +0800 Subject: [PATCH 02/16] igb: Remove unused code --- sys/dev/netif/igb/if_igb.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/sys/dev/netif/igb/if_igb.c b/sys/dev/netif/igb/if_igb.c index 1284baef88..dcfdf1ef9f 100644 --- a/sys/dev/netif/igb/if_igb.c +++ b/sys/dev/netif/igb/if_igb.c @@ -362,12 +362,6 @@ igb_attach(device_t dev) SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "nvm", CTLTYPE_INT|CTLFLAG_RW, adapter, 0, igb_sysctl_nvm_info, "I", "NVM Information"); - - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "enable_aim", CTLTYPE_INT|CTLFLAG_RW, - &igb_enable_aim, 1, "Interrupt Moderation"); - SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "flow_control", CTLTYPE_INT|CTLFLAG_RW, @@ -600,18 +594,6 @@ igb_attach(device_t dev) goto failed; } -#ifdef notyet - /* - ** Configure Interrupts - */ - if ((adapter->msix > 1) && (igb_enable_msix)) - error = igb_allocate_msix(adapter); - else /* MSI or Legacy */ - error = igb_allocate_legacy(adapter); - if (error) - goto err_late; -#endif - /* Setup OS specific network interface */ igb_setup_ifp(sc); -- 2.41.0 From ff230ec8e08911c0ec9fcd292c2feaab0f7f1241 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sat, 6 Oct 2012 23:03:22 +0800 Subject: [PATCH 03/16] igb: Cache align msix, rx and tx data --- sys/dev/netif/igb/if_igb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/netif/igb/if_igb.h b/sys/dev/netif/igb/if_igb.h index 539f62352a..1e5c96da4e 100644 --- a/sys/dev/netif/igb/if_igb.h +++ b/sys/dev/netif/igb/if_igb.h @@ -237,7 +237,7 @@ struct igb_tx_ring { u_long no_desc_avail; u_long tx_packets; -}; +} __cachealign; /* * Receive ring: one per queue @@ -266,7 +266,7 @@ struct igb_rx_ring { /* Soft stats */ u_long rx_packets; -}; +} __cachealign; struct igb_msix_data { struct lwkt_serialize *msix_serialize; @@ -287,7 +287,7 @@ struct igb_msix_data { u_int msix_vector; int msix_rate; char msix_rate_desc[32]; -}; +} __cachealign; struct igb_softc { struct arpcom arpcom; -- 2.41.0 From 55126ffeefe32fac458f727ce228b9ea3320ac6a Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sun, 7 Oct 2012 12:14:52 +0800 Subject: [PATCH 04/16] kmalloc: Add kmalloc_powerof2() and kmalloc_cachealign() kmalloc_powerof2() Ensures that the returned address will be power of 2 aligned. kmalloc_cachealign() Ensures that the returned address will be cacheline size aligned. It is useful to allocate structs declared with __cachealign attribute. These two function probably should _not_ be used on the hot code path due to the computational cost to find the nearest power of 2 size. --- sys/kern/kern_slaballoc.c | 18 ++++++++++++++++++ sys/sys/malloc.h | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/sys/kern/kern_slaballoc.c b/sys/kern/kern_slaballoc.c index 9fc8a59114..2f3a853431 100644 --- a/sys/kern/kern_slaballoc.c +++ b/sys/kern/kern_slaballoc.c @@ -1566,3 +1566,21 @@ kmem_slab_free(void *ptr, vm_size_t size) crit_exit(); } +void * +kmalloc_powerof2(unsigned long size_alloc, struct malloc_type *type, int flags) +{ + unsigned long size; + + for (size = 1; size < size_alloc; size <<= 1) + ; /* EMPTY */ + return kmalloc(size, type, flags); +} + +void * +kmalloc_cachealign(unsigned long size_alloc, struct malloc_type *type, + int flags) +{ + if (size_alloc < __VM_CACHELINE_SIZE) + size_alloc = __VM_CACHELINE_SIZE; + return kmalloc_powerof2(size_alloc, type, flags); +} diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h index 83b27e8189..520bb648ce 100644 --- a/sys/sys/malloc.h +++ b/sys/sys/malloc.h @@ -204,6 +204,10 @@ char *kstrdup (const char *, struct malloc_type *); #define kstrdup_debug(str, type, file, line) \ kstrdup(str, type) #endif +void *kmalloc_powerof2 (unsigned long size, struct malloc_type *type, + int flags); +void *kmalloc_cachealign (unsigned long size, struct malloc_type *type, + int flags); void kfree (void *addr, struct malloc_type *type); long kmalloc_limit (struct malloc_type *type); -- 2.41.0 From 7b269c72ab753dc30bf21edc123cb300b961756b Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sun, 7 Oct 2012 12:22:35 +0800 Subject: [PATCH 05/16] igb: Use kmalloc_cachealign to allocate rx ring, tx ring and msix data --- sys/dev/netif/igb/if_igb.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/netif/igb/if_igb.c b/sys/dev/netif/igb/if_igb.c index dcfdf1ef9f..fe9af3db2d 100644 --- a/sys/dev/netif/igb/if_igb.c +++ b/sys/dev/netif/igb/if_igb.c @@ -1562,7 +1562,8 @@ igb_alloc_rings(struct igb_softc *sc) /* * Allocate TX descriptor rings and buffers */ - sc->tx_rings = kmalloc(sizeof(struct igb_tx_ring) * sc->tx_ring_cnt, + sc->tx_rings = kmalloc_cachealign( + sizeof(struct igb_tx_ring) * sc->tx_ring_cnt, M_DEVBUF, M_WAITOK | M_ZERO); for (i = 0; i < sc->tx_ring_cnt; ++i) { struct igb_tx_ring *txr = &sc->tx_rings[i]; @@ -1580,7 +1581,8 @@ igb_alloc_rings(struct igb_softc *sc) /* * Allocate RX descriptor rings and buffers */ - sc->rx_rings = kmalloc(sizeof(struct igb_rx_ring) * sc->rx_ring_cnt, + sc->rx_rings = kmalloc_cachealign( + sizeof(struct igb_rx_ring) * sc->rx_ring_cnt, M_DEVBUF, M_WAITOK | M_ZERO); for (i = 0; i < sc->rx_ring_cnt; ++i) { struct igb_rx_ring *rxr = &sc->rx_rings[i]; @@ -4042,7 +4044,8 @@ igb_msix_try_alloc(struct igb_softc *sc) } sc->msix_cnt = alloc_cnt; - sc->msix_data = kmalloc(sizeof(struct igb_msix_data) * sc->msix_cnt, + sc->msix_data = kmalloc_cachealign( + sizeof(struct igb_msix_data) * sc->msix_cnt, M_DEVBUF, M_WAITOK | M_ZERO); for (x = 0; x < sc->msix_cnt; ++x) { msix = &sc->msix_data[x]; -- 2.41.0 From 8e469b97783c14679448b8ed428d169b234b5108 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sun, 7 Oct 2012 12:40:57 +0800 Subject: [PATCH 06/16] busdma: Utilize kmalloc_powerof2() --- sys/platform/pc32/i386/busdma_machdep.c | 7 +------ sys/platform/pc64/x86_64/busdma_machdep.c | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/sys/platform/pc32/i386/busdma_machdep.c b/sys/platform/pc32/i386/busdma_machdep.c index a8cff4ed93..35be77b5fb 100644 --- a/sys/platform/pc32/i386/busdma_machdep.c +++ b/sys/platform/pc32/i386/busdma_machdep.c @@ -573,13 +573,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, */ maxsize = check_kmalloc(dmat, *vaddr, 0); if (maxsize) { - size_t size; - kfree(*vaddr, M_DEVBUF); - /* XXX check for overflow? */ - for (size = 1; size <= maxsize; size <<= 1) - ; - *vaddr = kmalloc(size, M_DEVBUF, mflags); + *vaddr = kmalloc_powerof2(maxsize, M_DEVBUF, mflags); check_kmalloc(dmat, *vaddr, 1); } } else { diff --git a/sys/platform/pc64/x86_64/busdma_machdep.c b/sys/platform/pc64/x86_64/busdma_machdep.c index b94f358825..151f9bf8ce 100644 --- a/sys/platform/pc64/x86_64/busdma_machdep.c +++ b/sys/platform/pc64/x86_64/busdma_machdep.c @@ -573,13 +573,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, */ maxsize = check_kmalloc(dmat, *vaddr, 0); if (maxsize) { - size_t size; - kfree(*vaddr, M_DEVBUF); - /* XXX check for overflow? */ - for (size = 1; size <= maxsize; size <<= 1) - ; - *vaddr = kmalloc(size, M_DEVBUF, mflags); + *vaddr = kmalloc_powerof2(maxsize, M_DEVBUF, mflags); check_kmalloc(dmat, *vaddr, 1); } } else { -- 2.41.0 From cd12dbe89814861db12480fa250d9ee570701751 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sun, 7 Oct 2012 12:53:42 +0800 Subject: [PATCH 07/16] busdma: Panic if the kmalloc_powerof2() fails to meet the dma requirement --- sys/platform/pc32/i386/busdma_machdep.c | 12 ++++++------ sys/platform/pc64/x86_64/busdma_machdep.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/platform/pc32/i386/busdma_machdep.c b/sys/platform/pc32/i386/busdma_machdep.c index 35be77b5fb..ae451fb6d1 100644 --- a/sys/platform/pc32/i386/busdma_machdep.c +++ b/sys/platform/pc32/i386/busdma_machdep.c @@ -511,17 +511,17 @@ check_kmalloc(bus_dma_tag_t dmat, const void *vaddr0, int verify) uintptr_t vaddr = (uintptr_t)vaddr0; if ((vaddr ^ (vaddr + dmat->maxsize - 1)) & ~PAGE_MASK) { - if (verify || bootverbose) - kprintf("boundary check failed\n"); if (verify) - print_backtrace(-1); /* XXX panic */ + panic("boundary check failed\n"); + if (bootverbose) + kprintf("boundary check failed\n"); maxsize = dmat->maxsize; } if (vaddr & (dmat->alignment - 1)) { - if (verify || bootverbose) - kprintf("alignment check failed\n"); if (verify) - print_backtrace(-1); /* XXX panic */ + panic("alignment check failed\n"); + if (bootverbose) + kprintf("alignment check failed\n"); if (dmat->maxsize < dmat->alignment) maxsize = dmat->alignment; else diff --git a/sys/platform/pc64/x86_64/busdma_machdep.c b/sys/platform/pc64/x86_64/busdma_machdep.c index 151f9bf8ce..3a68b4229a 100644 --- a/sys/platform/pc64/x86_64/busdma_machdep.c +++ b/sys/platform/pc64/x86_64/busdma_machdep.c @@ -511,17 +511,17 @@ check_kmalloc(bus_dma_tag_t dmat, const void *vaddr0, int verify) uintptr_t vaddr = (uintptr_t)vaddr0; if ((vaddr ^ (vaddr + dmat->maxsize - 1)) & ~PAGE_MASK) { - if (verify || bootverbose) - kprintf("boundary check failed\n"); if (verify) - print_backtrace(-1); /* XXX panic */ + panic("boundary check failed\n"); + if (bootverbose) + kprintf("boundary check failed\n"); maxsize = dmat->maxsize; } if (vaddr & (dmat->alignment - 1)) { - if (verify || bootverbose) - kprintf("alignment check failed\n"); if (verify) - print_backtrace(-1); /* XXX panic */ + panic("alignment check failed\n"); + if (bootverbose) + kprintf("alignment check failed\n"); if (dmat->maxsize < dmat->alignment) maxsize = dmat->alignment; else -- 2.41.0 From 7b33812f797e7b78003e7b88047255bef86323a2 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sun, 7 Oct 2012 14:14:22 +0800 Subject: [PATCH 08/16] ifpoll: Utilize kmalloc_cachealign() --- sys/net/if_poll.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/net/if_poll.c b/sys/net/if_poll.c index 6f53c55676..21d13b48b8 100644 --- a/sys/net/if_poll.c +++ b/sys/net/if_poll.c @@ -193,7 +193,7 @@ struct stpoll_ctx { struct sysctl_ctx_list poll_sysctl_ctx; struct sysctl_oid *poll_sysctl_tree; -}; +} __cachealign; struct iopoll_sysctl_netmsg { struct netmsg_base base; @@ -677,7 +677,8 @@ iopoll_ctx_create(int cpuid, int poll_type) /* * Create the per-cpu polling context */ - io_ctx = kmalloc(sizeof(*io_ctx), M_DEVBUF, M_WAITOK | M_ZERO); + io_ctx = kmalloc_cachealign(sizeof(*io_ctx), M_DEVBUF, + M_WAITOK | M_ZERO); io_ctx->poll_each_burst = iopoll_each_burst; io_ctx->poll_burst_max = iopoll_burst_max; @@ -1224,7 +1225,7 @@ poll_comm_init(int cpuid) struct poll_comm *comm; char cpuid_str[16]; - comm = kmalloc(sizeof(*comm), M_DEVBUF, M_WAITOK | M_ZERO); + comm = kmalloc_cachealign(sizeof(*comm), M_DEVBUF, M_WAITOK | M_ZERO); if (ifpoll_stfrac < 0) ifpoll_stfrac = IFPOLL_STFRAC_DEFAULT; -- 2.41.0 From 262e0d745238888fc693cd80f79c7ac0c513769f Mon Sep 17 00:00:00 2001 From: John Marino Date: Sun, 7 Oct 2012 23:27:36 +0200 Subject: [PATCH 09/16] Use GCC's builtin offset_of as the first option Other than C++ code, the GCC offsetof builtin was never getting used. The version that did get expanded could not be used for array declarations on GCC 4.5 and later because it wasn't considered a constant expression by those later GCC compilers. The first symptom was seen when building world with GCC 4.6, but the the offsetof expansion was finally identified as the cause of the problem while discussion PostgreSQL 9.1 build failures on DragonFly. Since DragonFly was the only platform exibiting the behavior, the problem was narrowed down to the offsetof macro or the compiler itself. Fixing the macro allowed the unpatched pgsql to compile. Thanks-to: Tom Lane --- sys/cpu/i386/include/stdint.h | 11 ++++++----- sys/cpu/x86_64/include/stdint.h | 6 ++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/sys/cpu/i386/include/stdint.h b/sys/cpu/i386/include/stdint.h index 43270bb8af..60e5e307f4 100644 --- a/sys/cpu/i386/include/stdint.h +++ b/sys/cpu/i386/include/stdint.h @@ -36,7 +36,6 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/_stdint.h,v 1.1 2002/07/29 17:41:07 mike Exp $ - * $DragonFly: src/sys/cpu/i386/include/stdint.h,v 1.8 2007/07/29 22:20:10 pavalos Exp $ */ #ifndef _CPU_STDINT_H_ @@ -117,16 +116,18 @@ typedef volatile int __atomic_intr_t; /* * Its convenient to put these here rather then create another header file. */ +#if __GNUC_PREREQ__(4, 1) +#define __offsetof(type, field) __builtin_offsetof(type, field) +#else #ifndef __cplusplus #define __offsetof(type, field) ((__size_t)(&((type *)0)->field)) -#elif (__GNUC__ >= 4) -#define __offsetof(type, field) __builtin_offsetof(type, field) -#else +#else #define __offsetof(type, field) \ (__offsetof__ (reinterpret_cast <__size_t> \ (&reinterpret_cast \ (static_cast (0)->field)))) -#endif +#endif +#endif #define __arysize(ary) (sizeof(ary)/sizeof((ary)[0])) diff --git a/sys/cpu/x86_64/include/stdint.h b/sys/cpu/x86_64/include/stdint.h index edee45dbac..dabdc740eb 100644 --- a/sys/cpu/x86_64/include/stdint.h +++ b/sys/cpu/x86_64/include/stdint.h @@ -132,16 +132,18 @@ typedef volatile int __atomic_intr_t; /* * Its convenient to put these here rather then create another header file. */ +#if __GNUC_PREREQ__(4, 1) +#define __offsetof(type, field) __builtin_offsetof(type, field) +#else #ifndef __cplusplus #define __offsetof(type, field) ((__size_t)(&((type *)0)->field)) -#elif (__GNUC__ >= 4) -#define __offsetof(type, field) __builtin_offsetof(type, field) #else #define __offsetof(type, field) \ (__offsetof__ (reinterpret_cast <__size_t> \ (&reinterpret_cast \ (static_cast (0)->field)))) #endif +#endif #define __arysize(ary) (sizeof(ary)/sizeof((ary)[0])) -- 2.41.0 From 7f32c88b6c6c84a79453c827d74ffe84f7199b7a Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sun, 7 Oct 2012 16:39:37 -0700 Subject: [PATCH 10/16] build - Unbreak world * Fix issue w/ last commit Submitted-by: marino --- sys/cpu/i386/include/stdint.h | 2 +- sys/cpu/x86_64/include/stdint.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cpu/i386/include/stdint.h b/sys/cpu/i386/include/stdint.h index 60e5e307f4..8b5cada100 100644 --- a/sys/cpu/i386/include/stdint.h +++ b/sys/cpu/i386/include/stdint.h @@ -116,7 +116,7 @@ typedef volatile int __atomic_intr_t; /* * Its convenient to put these here rather then create another header file. */ -#if __GNUC_PREREQ__(4, 1) +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) #define __offsetof(type, field) __builtin_offsetof(type, field) #else #ifndef __cplusplus diff --git a/sys/cpu/x86_64/include/stdint.h b/sys/cpu/x86_64/include/stdint.h index dabdc740eb..6e83d252c4 100644 --- a/sys/cpu/x86_64/include/stdint.h +++ b/sys/cpu/x86_64/include/stdint.h @@ -132,7 +132,7 @@ typedef volatile int __atomic_intr_t; /* * Its convenient to put these here rather then create another header file. */ -#if __GNUC_PREREQ__(4, 1) +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) #define __offsetof(type, field) __builtin_offsetof(type, field) #else #ifndef __cplusplus -- 2.41.0 From 16348f3142ec62b5d9ebc02695e606859d8b41f7 Mon Sep 17 00:00:00 2001 From: John Marino Date: Sun, 7 Oct 2012 19:34:31 +0200 Subject: [PATCH 11/16] libgcc.a47: build with -fpic The vendor makefile builds libgcc.a with the PIC flag. The x86_64 platform needs it for packages that need need to link to libgcc.a --- gnu/lib/gcc47/libgcc/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/lib/gcc47/libgcc/Makefile b/gnu/lib/gcc47/libgcc/Makefile index e26a6fa52f..88e799b1e5 100644 --- a/gnu/lib/gcc47/libgcc/Makefile +++ b/gnu/lib/gcc47/libgcc/Makefile @@ -14,6 +14,8 @@ CFLAGS+= -I../csu CFLAGS+= -fbuilding-libgcc CFLAGS+= -fno-stack-protector CFLAGS+= -fvisibility=hidden +CFLAGS+= -fpic +CFLAGS+= -DPIC CFLAGS+= -DIN_GCC CFLAGS+= -DIN_LIBGCC2 CFLAGS+= -DHAVE_CC_TLS -- 2.41.0 From 1e57f8673c953ace8a25ada0a39ab83008646ce3 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Mon, 8 Oct 2012 20:14:56 +0800 Subject: [PATCH 12/16] kmalloc: Use 'fls' to round up the size to the nearest power of 2 On average tests conducted on Intel i3, i7 and xeon-e3 in x86_64 mode, fls version is 3 times faster than the simple loop version. Submitted-by: vsrinivas@ Also M_POWEROF2 flag is used to do the nearest power of 2 size rounding up, instead of a seperate function (was kmalloc_powerof2) Suggested-by: sjg@, vsrinivas@ --- sys/kern/kern_slaballoc.c | 32 +++++++++++++++-------- sys/platform/pc32/i386/busdma_machdep.c | 3 ++- sys/platform/pc64/x86_64/busdma_machdep.c | 3 ++- sys/sys/malloc.h | 3 +-- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/sys/kern/kern_slaballoc.c b/sys/kern/kern_slaballoc.c index 2f3a853431..0edfdc4b10 100644 --- a/sys/kern/kern_slaballoc.c +++ b/sys/kern/kern_slaballoc.c @@ -492,6 +492,22 @@ slab_record_source(SLZone *z, const char *file, int line) #endif +static __inline unsigned long +powerof2_size(unsigned long size) +{ + int i, wt; + + if (size == 0) + return 0; + + i = flsl(size); + wt = (size & ~(1 << (i - 1))); + if (!wt) + --i; + + return (1UL << i); +} + /* * kmalloc() (SLAB ALLOCATOR) * @@ -505,6 +521,7 @@ slab_record_source(SLZone *z, const char *file, int line) * M_ZERO - zero the returned memory. * M_USE_RESERVE - allow greater drawdown of the free list * M_USE_INTERRUPT_RESERVE - allow the freelist to be exhausted + * M_POWEROF2 - roundup size to the nearest power of 2 * * MPSAFE */ @@ -545,6 +562,9 @@ kmalloc(unsigned long size, struct malloc_type *type, int flags) } ++type->ks_calls; + if (flags & M_POWEROF2) + size = powerof2_size(size); + /* * Handle the case where the limit is reached. Panic if we can't return * NULL. The original malloc code looped, but this tended to @@ -1566,21 +1586,11 @@ kmem_slab_free(void *ptr, vm_size_t size) crit_exit(); } -void * -kmalloc_powerof2(unsigned long size_alloc, struct malloc_type *type, int flags) -{ - unsigned long size; - - for (size = 1; size < size_alloc; size <<= 1) - ; /* EMPTY */ - return kmalloc(size, type, flags); -} - void * kmalloc_cachealign(unsigned long size_alloc, struct malloc_type *type, int flags) { if (size_alloc < __VM_CACHELINE_SIZE) size_alloc = __VM_CACHELINE_SIZE; - return kmalloc_powerof2(size_alloc, type, flags); + return kmalloc(size_alloc, type, flags | M_POWEROF2); } diff --git a/sys/platform/pc32/i386/busdma_machdep.c b/sys/platform/pc32/i386/busdma_machdep.c index ae451fb6d1..f9dd80e10b 100644 --- a/sys/platform/pc32/i386/busdma_machdep.c +++ b/sys/platform/pc32/i386/busdma_machdep.c @@ -574,7 +574,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, maxsize = check_kmalloc(dmat, *vaddr, 0); if (maxsize) { kfree(*vaddr, M_DEVBUF); - *vaddr = kmalloc_powerof2(maxsize, M_DEVBUF, mflags); + *vaddr = kmalloc(maxsize, M_DEVBUF, + mflags | M_POWEROF2); check_kmalloc(dmat, *vaddr, 1); } } else { diff --git a/sys/platform/pc64/x86_64/busdma_machdep.c b/sys/platform/pc64/x86_64/busdma_machdep.c index 3a68b4229a..00304e23c6 100644 --- a/sys/platform/pc64/x86_64/busdma_machdep.c +++ b/sys/platform/pc64/x86_64/busdma_machdep.c @@ -574,7 +574,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, maxsize = check_kmalloc(dmat, *vaddr, 0); if (maxsize) { kfree(*vaddr, M_DEVBUF); - *vaddr = kmalloc_powerof2(maxsize, M_DEVBUF, mflags); + *vaddr = kmalloc(maxsize, M_DEVBUF, + mflags | M_POWEROF2); check_kmalloc(dmat, *vaddr, 1); } } else { diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h index 520bb648ce..080e35a3bc 100644 --- a/sys/sys/malloc.h +++ b/sys/sys/malloc.h @@ -63,6 +63,7 @@ #define M_PASSIVE_ZERO 0x0800 /* (internal to the slab code only) */ #define M_USE_INTERRUPT_RESERVE \ 0x1000 /* can exhaust free list entirely */ +#define M_POWEROF2 0x2000 /* roundup size to the nearest power of 2 */ /* * M_NOWAIT has to be a set of flags for equivalence to prior use. @@ -204,8 +205,6 @@ char *kstrdup (const char *, struct malloc_type *); #define kstrdup_debug(str, type, file, line) \ kstrdup(str, type) #endif -void *kmalloc_powerof2 (unsigned long size, struct malloc_type *type, - int flags); void *kmalloc_cachealign (unsigned long size, struct malloc_type *type, int flags); void kfree (void *addr, struct malloc_type *type); -- 2.41.0 From 3b78a8dc0048374429004469f88ccb873cfd71b8 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Mon, 8 Oct 2012 14:53:28 +0200 Subject: [PATCH 13/16] kmalloc.9: Document M_POWEROF2. --- share/man/man9/kmalloc.9 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man9/kmalloc.9 b/share/man/man9/kmalloc.9 index e7e0e89481..1a65a80eff 100644 --- a/share/man/man9/kmalloc.9 +++ b/share/man/man9/kmalloc.9 @@ -36,7 +36,7 @@ .\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $ .\" $FreeBSD: src/share/man/man9/malloc.9,v 1.42 2005/02/22 17:20:20 brueffer Exp $ .\" -.Dd January 15, 2010 +.Dd October 8, 2012 .Dt KMALLOC 9 .Os .Sh NAME @@ -159,6 +159,8 @@ This option used to be called but has been renamed to something more obvious. This option has been deprecated and is slowly being removed from the kernel, and so should not be used with any new code. +.It Dv M_POWEROF2 +Rounds up the size to the nearest power of 2. .El .Pp Exactly one of either -- 2.41.0 From 0f85165cc636da905f7031428e4e8fc59f13c7ea Mon Sep 17 00:00:00 2001 From: Antonio Huete Jimenez Date: Mon, 8 Oct 2012 16:28:20 +0200 Subject: [PATCH 14/16] vkernel - Properly initialize pool tokens. * There was no call to init_locks() in vkernel's initialization code, so provide one. * As pool tokens weren't initialized, the attempt to copy its t_desc in lwkt_getalltokens() resulted in a panic. This should be fixed now. * Add a KASSERT() so that uninitialized tokens will panic the system. Suggested by: swildner --- sys/kern/lwkt_token.c | 1 + sys/platform/vkernel/platform/init.c | 30 +++++++++++++++++------- sys/platform/vkernel64/platform/init.c | 32 +++++++++++++++++++------- 3 files changed, 47 insertions(+), 16 deletions(-) diff --git a/sys/kern/lwkt_token.c b/sys/kern/lwkt_token.c index e56e6c92b0..83eada4a0e 100644 --- a/sys/kern/lwkt_token.c +++ b/sys/kern/lwkt_token.c @@ -468,6 +468,7 @@ lwkt_getalltokens(thread_t td, int spinning) * Otherwise we failed to acquire all the tokens. * Release whatever we did get. */ + KASSERT(tok->t_desc, ("token %p is not initialized", tok)); strncpy(td->td_gd->gd_cnt.v_token_name, tok->t_desc, sizeof(td->td_gd->gd_cnt.v_token_name) - 1); diff --git a/sys/platform/vkernel/platform/init.c b/sys/platform/vkernel/platform/init.c index 6acae97ed8..2091c4a4d0 100644 --- a/sys/platform/vkernel/platform/init.c +++ b/sys/platform/vkernel/platform/init.c @@ -134,6 +134,7 @@ static void cleanpid(void); static int unix_connect(const char *path); static void usage_err(const char *ctl, ...); static void usage_help(_Bool); +static void init_locks(void); static int save_ac; static char **save_av; @@ -501,6 +502,26 @@ init_sys_memory(char *imageFile) physmem = Maxmem; } +/* + * Initialize pool tokens and other necessary locks + */ +static void +init_locks(void) +{ + +#ifdef SMP + /* + * Get the initial mplock with a count of 1 for the BSP. + * This uses a LOGICAL cpu ID, ie BSP == 0. + */ + cpu_get_initial_mplock(); +#endif + + /* our token pool needs to work early */ + lwkt_token_pool_init(); + +} + /* * Initialize kernel memory. This reserves kernel virtual memory by using * MAP_VPAGETABLE @@ -739,14 +760,7 @@ init_vkernel(void) mi_proc0init(&gd->mi, proc0paddr); lwp0.lwp_md.md_regs = &proc0_tf; - /*init_locks();*/ -#ifdef SMP - /* - * Get the initial mplock with a count of 1 for the BSP. - * This uses a LOGICAL cpu ID, ie BSP == 0. - */ - cpu_get_initial_mplock(); -#endif + init_locks(); cninit(); rand_initialize(); #if 0 /* #ifdef DDB */ diff --git a/sys/platform/vkernel64/platform/init.c b/sys/platform/vkernel64/platform/init.c index a8c984db2c..92a1bcd5cd 100644 --- a/sys/platform/vkernel64/platform/init.c +++ b/sys/platform/vkernel64/platform/init.c @@ -131,6 +131,7 @@ static void cleanpid(void); static int unix_connect(const char *path); static void usage_err(const char *ctl, ...); static void usage_help(_Bool); +static void init_locks(void); static int save_ac; static char **save_av; @@ -675,6 +676,28 @@ init_globaldata(void) tls_set_gs(&CPU_prvspace[0], sizeof(struct privatespace)); } + +/* + * Initialize pool tokens and other necessary locks + */ +static void +init_locks(void) +{ + +#ifdef SMP + /* + * Get the initial mplock with a count of 1 for the BSP. + * This uses a LOGICAL cpu ID, ie BSP == 0. + */ + cpu_get_initial_mplock(); +#endif + + /* our token pool needs to work early */ + lwkt_token_pool_init(); + +} + + /* * Initialize very low level systems including thread0, proc0, etc. */ @@ -700,14 +723,7 @@ init_vkernel(void) mi_proc0init(&gd->mi, proc0paddr); lwp0.lwp_md.md_regs = &proc0_tf; - /*init_locks();*/ -#ifdef SMP - /* - * Get the initial mplock with a count of 1 for the BSP. - * This uses a LOGICAL cpu ID, ie BSP == 0. - */ - cpu_get_initial_mplock(); -#endif + init_locks(); cninit(); rand_initialize(); #if 0 /* #ifdef DDB */ -- 2.41.0 From 4f7079a87b304c8f927b8b85fd52e17bd0a54cdc Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 8 Oct 2012 17:56:09 -0700 Subject: [PATCH 15/16] kernel - Fix UP build for usched_dfly.c * Fix UP build errors Reported-by: multiple --- sys/kern/usched_dfly.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/usched_dfly.c b/sys/kern/usched_dfly.c index a13f8a924c..96b5ccf884 100644 --- a/sys/kern/usched_dfly.c +++ b/sys/kern/usched_dfly.c @@ -259,10 +259,10 @@ static int usched_dfly_weight1 = 200; /* keep thread on current cpu */ static int usched_dfly_weight2 = 180; /* synchronous peer's current cpu */ static int usched_dfly_weight3 = 40; /* number of threads on queue */ static int usched_dfly_weight4 = 160; /* availability of idle cores */ -static int usched_dfly_fast_resched = 0;/* delta priority / resched */ static int usched_dfly_features = 0x8F; /* allow pulls */ -static int usched_dfly_swmask = ~PPQMASK; /* allow pulls */ #endif +static int usched_dfly_fast_resched = 0;/* delta priority / resched */ +static int usched_dfly_swmask = ~PPQMASK; /* allow pulls */ static int usched_dfly_rrinterval = (ESTCPUFREQ + 9) / 10; static int usched_dfly_decay = 8; @@ -775,7 +775,9 @@ void dfly_schedulerclock(struct lwp *lp, sysclock_t period, sysclock_t cpstamp) { globaldata_t gd = mycpu; +#ifdef SMP dfly_pcpu_t dd = &dfly_pcpu[gd->gd_cpuid]; +#endif /* * Spinlocks also hold a critical section so there should not be -- 2.41.0 From 8a844d35f693d47165612ac0cd2d17fa5484529a Mon Sep 17 00:00:00 2001 From: "Justin C. Sherrill" Date: Mon, 8 Oct 2012 23:25:57 -0400 Subject: [PATCH 16/16] Branching 3.2/3.3 --- sys/conf/newvers.sh | 2 +- sys/sys/param.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 100f0bbe48..744a7fbc3b 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -44,7 +44,7 @@ fi # Set the branch # -BRANCH="DEVELOPMENT_3_1" +BRANCH="DEVELOPMENT_3_3" TYPE="DragonFly" diff --git a/sys/sys/param.h b/sys/sys/param.h index f15d0a0946..563748c471 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -91,9 +91,11 @@ * 300101 - i4b (ISDN) removal * 300102 - is now just a link of * 300103 - if SIG_IGN is set on SIGCHLD, do not keep zombie children - */ + * 300200 - 3.2 release + * 300300 - 3.3 master +*/ #undef __DragonFly_version -#define __DragonFly_version 300103 /* propagated to newvers */ +#define __DragonFly_version 300300 /* propagated to newvers */ #include -- 2.41.0