svn commit: r331664 - head/share/misc
Author: rgrimes Date: Wed Mar 28 07:49:36 2018 New Revision: 331664 URL: https://svnweb.freebsd.org/changeset/base/331664 Log: Add Bruce Evans Update my mentors to bde and phk Approved by: core, bde (mentor), phk (mentor) MFC after:3 days Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Wed Mar 28 07:45:57 2018 (r331663) +++ head/share/misc/committers-src.dot Wed Mar 28 07:49:36 2018 (r331664) @@ -122,6 +122,7 @@ avg [label="Andriy Gapon\n...@freebsd.org\n2009/02/18" avos [label="Andriy Voskoboinyk\na...@freebsd.org\n2015/09/24"] badger [label="Eric Badger\nbad...@freebsd.org\n2016/07/01"] bapt [label="Baptiste Daroussin\nb...@freebsd.org\n2011/12/23"] +bde [label="Bruce Evans\n...@freebsd.org\n1994/08/20"] bdrewery [label="Bryan Drewery\nbdrew...@freebsd.org\n2013/12/14"] benl [label="Ben Laurie\nb...@freebsd.org\n2011/05/18"] benno [label="Benno Rice\nbe...@freebsd.org\n2000/11/02"] @@ -402,6 +403,8 @@ bapt -> araujo bapt -> bdrewery bapt -> wulf +bde -> rgrimes + benno -> grehan billf -> dougb @@ -720,6 +723,7 @@ philip -> kp phk -> jkoshy phk -> mux +phk -> rgrimes pjd -> def pjd -> kib ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331665 - in head: share/man/man4 sys/conf sys/contrib/dev/iwm sys/dev/iwm sys/modules/iwmfw sys/modules/iwmfw/iwm3168fw
Author: eadler Date: Wed Mar 28 07:59:16 2018 New Revision: 331665 URL: https://svnweb.freebsd.org/changeset/base/331665 Log: [iwm] Add support for iwm 3168 cards ``` iwm0@pci0:5:0:0:class=0x028000 card=0x21108086 chip=0x24fb8086 rev=0x10 hdr=0x00 vendor = 'Intel Corporation' device = 'Dual Band Wireless-AC 3168NGW [Stone Peak]' class = network [94829] iwm0: mem 0xef70-0xef701fff at device 0.0 on pci5 [94829] iwm0: hw rev 0x220, fw ver 22.361476.0, address 28:c6:3f:15:43:c5 ``` MFC After:2 weeks Reviewed by: ivadasz (over IRC) PR: 224886 Differential Revision:https://reviews.freebsd.org/D14865 Added: head/sys/contrib/dev/iwm/iwm-3168-22.fw.uu head/sys/modules/iwmfw/iwm3168fw/ head/sys/modules/iwmfw/iwm3168fw/Makefile (contents, props changed) Modified: head/share/man/man4/iwm.4 head/share/man/man4/iwmfw.4 head/sys/conf/files head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_7000.c head/sys/dev/iwm/if_iwm_config.h head/sys/modules/iwmfw/Makefile Modified: head/share/man/man4/iwm.4 == --- head/share/man/man4/iwm.4 Wed Mar 28 07:49:36 2018(r331664) +++ head/share/man/man4/iwm.4 Wed Mar 28 07:59:16 2018(r331665) @@ -46,6 +46,7 @@ You also need to select a firmware for your device. Choose one from: .Bd -ragged -offset indent .Cd "device iwm3160fw" +.Cd "device iwm3168fw" .Cd "device iwm7260fw" .Cd "device iwm7265fw" .Cd "device iwm8000Cfw" @@ -65,6 +66,7 @@ module at boot time, place the following lines in .Bd -literal -offset indent if_iwm_load="YES" iwm3160fw_load="YES" +iwm3168fw_load="YES" iwm7260fw_load="YES" iwm7265fw_load="YES" iwm8000Cfw_load="YES" @@ -78,6 +80,7 @@ driver provides support for: .Bl -tag -width Ds -offset indent -compact .It Intel Dual Band Wireless AC 3160 .It Intel Dual Band Wireless AC 3165 +.It Intel Dual Band Wireless AC 3168 .It Intel Dual Band Wireless AC 7260 .It Intel Dual Band Wireless AC 7265 .It Intel Dual Band Wireless AC 8260 Modified: head/share/man/man4/iwmfw.4 == --- head/share/man/man4/iwmfw.4 Wed Mar 28 07:49:36 2018(r331664) +++ head/share/man/man4/iwmfw.4 Wed Mar 28 07:59:16 2018(r331665) @@ -43,6 +43,7 @@ If you want to pick only the firmware image for your n of the following: .Bd -ragged -offset indent .Cd "device iwm3160fw" +.Cd "device iwm3168fw" .Cd "device iwm7260fw" .Cd "device iwm7265fw" .Cd "device iwm8000Cfw" @@ -54,6 +55,7 @@ module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent iwm3160fw_load="YES" +iwm3168fw_load="YES" iwm7260fw_load="YES" iwm7265fw_load="YES" iwm7265Dfw_load="YES" @@ -62,7 +64,7 @@ iwm8265fw_load="YES" .Ed .Sh DESCRIPTION This module provides access to firmware sets for the -Intel Dual Band Wireless WiFi 3160, 3165, 7260, 7265, 8000, and 8260 series of +Intel Dual Band Wireless WiFi 3160, 3165, 3168, 7260, 7265, 8000, and 8260 series of IEEE 802.11n/11ac adapters. It may be statically linked into the kernel, or loaded as a module. Modified: head/sys/conf/files == --- head/sys/conf/files Wed Mar 28 07:49:36 2018(r331664) +++ head/sys/conf/files Wed Mar 28 07:59:16 2018(r331665) @@ -1988,6 +1988,20 @@ iwm3160.fw optional iwm3160fw | iwmfw \ compile-with"${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm3160.fw" +iwm3168fw.coptional iwm3168fw | iwmfw \ + compile-with"${AWK} -f $S/tools/fw_stub.awk iwm3168.fw:iwm3168fw -miwm3168fw -c${.TARGET}" \ + no-implicit-rule before-depend local\ + clean "iwm3168fw.c" +iwm3168fw.fwo optional iwm3168fw | iwmfw \ + dependency "iwm3168.fw"\ + compile-with"${NORMAL_FWO}" \ + no-implicit-rule\ + clean "iwm3168fw.fwo" +iwm3168.fw optional iwm3168fw | iwmfw \ + dependency "$S/contrib/dev/iwm/iwm-3168-22.fw.uu" \ + compile-with"${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "iwm3168.fw" iwm7260fw.coptional iwm7260fw | iwmfw \ compile-with"${AWK} -f $S/tools/fw_stub.awk iwm7260.fw:iwm7260fw -miwm7260fw -c${.TARGET}" \ no-implicit-rule before-depend local\ Added: head/sys/contrib/
svn commit: r331666 - in head/sys: cddl/contrib/opensolaris/uts/common/fs kern sys
Author: avg Date: Wed Mar 28 08:55:31 2018 New Revision: 331666 URL: https://svnweb.freebsd.org/changeset/base/331666 Log: ZFS vn_rele_async: catch up with the use of refcount(9) for the vnode use count It's not sufficient nor required to use the vnode interlock when checking if we are going to drop the last use count as the code in vputx() uses refcount (atomic) operations for both checking and decrementing the use code. Apply the same method to vn_rele_async(). While here, remove vn_rele_inactive(), a wrapper around vrele() that didn't add any value. Also, the change required making vfs_refcount_release_if_not_last() public. I've made vfs_refcount_acquire_if_not_zero() public as well. They are in sys/refcount.h now. While making the move I've dropped the vfs_ prefix. Reviewed by: mjg MFC after:2 weeks Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D14869 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c head/sys/kern/vfs_subr.c head/sys/sys/refcount.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c Wed Mar 28 07:59:16 2018(r331665) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c Wed Mar 28 08:55:31 2018(r331666) @@ -72,12 +72,6 @@ xva_getxoptattr(xvattr_t *xvap) return (xoap); } -static void -vn_rele_inactive(vnode_t *vp) -{ - vrele(vp); -} - /* * Like vn_rele() except if we are going to call VOP_INACTIVE() then do it * asynchronously using a taskq. This can avoid deadlocks caused by re-entering @@ -92,13 +86,10 @@ void vn_rele_async(vnode_t *vp, taskq_t *taskq) { VERIFY(vp->v_count > 0); - VI_LOCK(vp); - if (vp->v_count == 1 && !(vp->v_iflag & VI_DOINGINACT)) { - VI_UNLOCK(vp); - VERIFY(taskq_dispatch((taskq_t *)taskq, - (task_func_t *)vn_rele_inactive, vp, TQ_SLEEP) != 0); + if (refcount_release_if_not_last(&vp->v_usecount)) { + vdrop(vp); return; } - refcount_release(&vp->v_usecount); - vdropl(vp); + VERIFY(taskq_dispatch((taskq_t *)taskq, + (task_func_t *)vrele, vp, TQ_SLEEP) != 0); } Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cWed Mar 28 07:59:16 2018(r331665) +++ head/sys/kern/vfs_subr.cWed Mar 28 08:55:31 2018(r331666) @@ -2455,37 +2455,6 @@ reassignbuf(struct buf *bp) BO_UNLOCK(bo); } -/* - * A temporary hack until refcount_* APIs are sorted out. - */ -static __inline int -vfs_refcount_acquire_if_not_zero(volatile u_int *count) -{ - u_int old; - - old = *count; - for (;;) { - if (old == 0) - return (0); - if (atomic_fcmpset_int(count, &old, old + 1)) - return (1); - } -} - -static __inline int -vfs_refcount_release_if_not_last(volatile u_int *count) -{ - u_int old; - - old = *count; - for (;;) { - if (old == 1) - return (0); - if (atomic_fcmpset_int(count, &old, old - 1)) - return (1); - } -} - static void v_init_counters(struct vnode *vp) { @@ -2524,7 +2493,7 @@ v_incr_usecount(struct vnode *vp) CTR2(KTR_VFS, "%s: vp %p", __func__, vp); if (vp->v_type != VCHR && - vfs_refcount_acquire_if_not_zero(&vp->v_usecount)) { + refcount_acquire_if_not_zero(&vp->v_usecount)) { VNASSERT((vp->v_iflag & VI_OWEINACT) == 0, vp, ("vnode with usecount and VI_OWEINACT set")); } else { @@ -2616,7 +2585,7 @@ vget(struct vnode *vp, int flags, struct thread *td) * Upgrade our holdcnt to a usecount. */ if (vp->v_type == VCHR || - !vfs_refcount_acquire_if_not_zero(&vp->v_usecount)) { + !refcount_acquire_if_not_zero(&vp->v_usecount)) { VI_LOCK(vp); if ((vp->v_iflag & VI_OWEINACT) == 0) { oweinact = 0; @@ -2720,7 +2689,7 @@ vputx(struct vnode *vp, int func) CTR2(KTR_VFS, "%s: vp %p", __func__, vp); if (vp->v_type != VCHR && - vfs_refcount_release_if_not_last(&vp->v_usecount)) { + refcount_release_if_not_last(&vp->v_usecount)) { if (func == VPUTX_VPUT) VOP_UNLOCK(vp, 0); vdrop(vp); @@ -2836,7 +2805,7 @@ _vhold(struct vnode *vp, bool locked) ASSERT_VI_UNLOCKED(vp, __func__); CTR2(KTR_VFS, "%s: vp %p", __func__, vp); if (!locked) { - if (vfs_refcount_acquire_if_not_zero(&vp->v_holdcnt)) { + if (refcount_acquire_if_not_zero
Re: svn commit: r331666 - in head/sys: cddl/contrib/opensolaris/uts/common/fs kern sys
On Wed, Mar 28, 2018 at 08:55:31AM +, Andriy Gapon wrote: > +static __inline int > +refcount_acquire_if_not_zero(volatile u_int *count) What about refcount_acquire_nz() > +static __inline int > +refcount_release_if_not_last(volatile u_int *count) refcount_release_nz() ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331668 - head/sbin/ipfw
Author: ae Date: Wed Mar 28 12:44:28 2018 New Revision: 331668 URL: https://svnweb.freebsd.org/changeset/base/331668 Log: Rework ipfw rules parsing and printing code. Introduce show_state structure to keep information about printed opcodes. Split show_static_rule() function into several smaller functions. Make parsing and printing opcodes into several passes. Each printed opcode is marked in show_state structure and will be skipped in next passes. Now show_static_rule() function is simple, it just prints each part of rule separately: action, modifiers, proto, src and dst addresses, options. The main goal of this change is avoiding occurrence of wrong result of `ifpw show` command, that can not be parsed by ipfw(8). Also now it is possible to make some simple static optimizations by reordering of opcodes in the rule. PR: 222705 Discussed with: melifaro MFC after:2 weeks Sponsored by: Yandex LLC Modified: head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h head/sbin/ipfw/main.c Modified: head/sbin/ipfw/ipfw2.c == --- head/sbin/ipfw/ipfw2.c Wed Mar 28 08:58:32 2018(r331667) +++ head/sbin/ipfw/ipfw2.c Wed Mar 28 12:44:28 2018(r331668) @@ -1176,7 +1176,7 @@ print_flags(struct buf_pr *bp, char const *name, ipfw_ * Print the ip address contained in a command. */ static void -print_ip(struct buf_pr *bp, struct format_opts *fo, ipfw_insn_ip *cmd, +print_ip(struct buf_pr *bp, const struct format_opts *fo, ipfw_insn_ip *cmd, char const *s) { struct hostent *he = NULL; @@ -1277,7 +1277,7 @@ print_ip(struct buf_pr *bp, struct format_opts *fo, ip * prints a MAC address/mask pair */ static void -print_mac(struct buf_pr *bp, uint8_t *addr, uint8_t *mask) +format_mac(struct buf_pr *bp, uint8_t *addr, uint8_t *mask) { int l = contigmask(mask, 48); @@ -1296,6 +1296,15 @@ print_mac(struct buf_pr *bp, uint8_t *addr, uint8_t *m } static void +print_mac(struct buf_pr *bp, ipfw_insn_mac *mac) +{ + + bprintf(bp, " MAC"); + format_mac(bp, mac->addr, mac->mask); + format_mac(bp, mac->addr + 6, mac->mask + 6); +} + +static void fill_icmptypes(ipfw_insn_u32 *cmd, char *av) { uint8_t type; @@ -1358,817 +1367,843 @@ print_dscp(struct buf_pr *bp, ipfw_insn_u32 *cmd) } } -/* - * show_ipfw() prints the body of an ipfw rule. - * Because the standard rule has at least proto src_ip dst_ip, we use - * a helper function to produce these entries if not provided explicitly. - * The first argument is the list of fields we have, the second is - * the list of fields we want to be printed. - * - * Special cases if we have provided a MAC header: - * + if the rule does not contain IP addresses/ports, do not print them; - * + if the rule does not contain an IP proto, print "all" instead of "ip"; - * - * Once we have 'have_options', IP header fields are printed as options. - */ +#defineinsntod(cmd, type) ((ipfw_insn_ ## type *)(cmd)) +struct show_state { + struct ip_fw_rule *rule; + const ipfw_insn *eaction; + uint8_t *printed; + int flags; #defineHAVE_PROTO 0x0001 #defineHAVE_SRCIP 0x0002 #defineHAVE_DSTIP 0x0004 -#defineHAVE_PROTO4 0x0008 -#defineHAVE_PROTO6 0x0010 -#defineHAVE_IP 0x0100 -#defineHAVE_OPTIONS0x8000 + int proto; + int or_block; +}; -static void -show_prerequisites(struct buf_pr *bp, int *flags, int want, int cmd) +static int +init_show_state(struct show_state *state, struct ip_fw_rule *rule) { - (void)cmd; /* UNUSED */ - if (co.comment_only) - return; - if ( (*flags & HAVE_IP) == HAVE_IP) - *flags |= HAVE_OPTIONS; - if ( !(*flags & HAVE_OPTIONS)) { - if ( !(*flags & HAVE_PROTO) && (want & HAVE_PROTO)) { - if ( (*flags & HAVE_PROTO4)) - bprintf(bp, " ip4"); - else if ( (*flags & HAVE_PROTO6)) - bprintf(bp, " ip6"); - else - bprintf(bp, " ip"); - } - if ( !(*flags & HAVE_SRCIP) && (want & HAVE_SRCIP)) - bprintf(bp, " from any"); - if ( !(*flags & HAVE_DSTIP) && (want & HAVE_DSTIP)) - bprintf(bp, " to any"); - } - *flags |= want; + state->printed = calloc(rule->cmd_len, sizeof(uint8_t)); + if (state->printed == NULL) + return (ENOMEM); + state->rule = rule; + state->eaction = NULL; + state->flags = 0; + state->proto = 0; + state->or_block = 0; + return (0); } static void -show_static_r
Re: svn commit: r331650 - in head/sys: amd64/amd64 amd64/ia32amd64/linux amd64/linux32 cddl/contrib/opensolaris/uts/intel/dtracecddl/dev/dtrace/amd64 cddl/dev/dtrace/i386 i386/i386 i386/linux x86/inc.
On Wed, Mar 28, 2018 at 07:23:27AM +0200, O. Hartmann wrote: > On Tue, 27 Mar 2018 23:20:53 -0600 > Cy Schubert wrote: > > > Have you disabled DDB in your kernel config? At the moment I am building non-GENERIC kernel with the below patch: Index: sys/amd64/amd64/machdep.c === --- sys/amd64/amd64/machdep.c (revision 331667) +++ sys/amd64/amd64/machdep.c (working copy) @@ -108,6 +108,8 @@ #endif #include #include +#else +#include #endif #include -- Herbert ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r331606 - in head/sys: amd64/include i386/include x86/x86 x86/xen
On Tuesday, March 27, 2018 11:07:22 AM Jeff Roberson wrote: > On Tue, 27 Mar 2018, Li-Wen Hsu wrote: > > > On Mon, Mar 26, 2018 at 20:35:12 -1000, Jeff Roberson wrote: > >> The patch has been on my branch for weeks and has been tested by a half > >> dozen people. I'm sorry it does not work for you. If you reverted 331605 > >> the change that followed should not have built properly. Did you build > >> cleanly? Can you share your kernel config? > >> > >> I tried with and without EARLY_AP_STARTUP and with and without NUMA. I'm > >> not having any trouble booting. Did you make cleandepend && make depend? > > > > It also hangs in our testing system: > > > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/6817/console > > https://ci.freebsd.org/job/FreeBSD-head-i386-test/1000/console > > > > It is built cleanly and uses unmodified GENERIC config. > > > > The artifacts used are available here: > > > > https://artifact.ci.freebsd.org/snapshot/head/r331606/amd64/amd64/ > > https://artifact.ci.freebsd.org/snapshot/head/r331606/i386/i386/ > > > > Hope these information help. > > Could someone who was experiencing the hang try the enclosed patch? I can > only verify that it continues to boot for me but I believe this fixes the > bug on other systems. > > I believe the issue was that cpuset_domain[0] was initialized too late on > some systems. It depended on what kind of hardware was present and which > sysinit with SI_ORDER_ANY ran first. Hmm, does this work if you don't use EARLY_AP_STARTUP? I think all_cpus isn't set yet (or only contains the BSP) when cpuset_thread0 is run if you don't have EARLY_AP_STARTUP (and EARLY_AP_STARTUP is only supported on x86 currently) -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331681 - in head/sys: amd64/amd64 i386/i386
Author: jhb Date: Wed Mar 28 16:24:56 2018 New Revision: 331681 URL: https://svnweb.freebsd.org/changeset/base/331681 Log: Fix kernel builds without options DDB after r331650. Reported by: cy Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Wed Mar 28 14:44:45 2018 (r331680) +++ head/sys/amd64/amd64/machdep.c Wed Mar 28 16:24:56 2018 (r331681) @@ -127,6 +127,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef SMP #include Modified: head/sys/i386/i386/machdep.c == --- head/sys/i386/i386/machdep.cWed Mar 28 14:44:45 2018 (r331680) +++ head/sys/i386/i386/machdep.cWed Mar 28 16:24:56 2018 (r331681) @@ -129,6 +129,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #ifdef PERFMON ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331682 - in head: share/mk sys/conf
Author: bdrewery Date: Wed Mar 28 16:28:20 2018 New Revision: 331682 URL: https://svnweb.freebsd.org/changeset/base/331682 Log: Avoid upwards directory walk in kernel build for finding known SYSDIR. Sponsored by: Dell EMC Modified: head/share/mk/bsd.dtb.mk head/share/mk/bsd.kmod.mk head/sys/conf/kmod.mk Modified: head/share/mk/bsd.dtb.mk == --- head/share/mk/bsd.dtb.mkWed Mar 28 16:24:56 2018(r331681) +++ head/share/mk/bsd.dtb.mkWed Mar 28 16:28:20 2018(r331682) @@ -1,6 +1,7 @@ # $FreeBSD$ # Search for kernel source tree in standard places. +.if empty(KERNBUILDDIR) .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ ${.CURDIR}/../../../../.. /sys /usr/src/sys .if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) @@ -10,6 +11,7 @@ SYSDIR= ${_dir} .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ !exists(${SYSDIR}/conf/kmod.mk) .error Unable to locate the kernel source tree. Set SYSDIR to override. +.endif .endif .include "${SYSDIR}/conf/dtb.mk" Modified: head/share/mk/bsd.kmod.mk == --- head/share/mk/bsd.kmod.mk Wed Mar 28 16:24:56 2018(r331681) +++ head/share/mk/bsd.kmod.mk Wed Mar 28 16:28:20 2018(r331682) @@ -1,6 +1,7 @@ # $FreeBSD$ # Search for kernel source tree in standard places. +.if empty(KERNBUILDDIR) .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ ${.CURDIR}/../../../../.. /sys /usr/src/sys .if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) @@ -10,6 +11,7 @@ SYSDIR= ${_dir:tA} .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ !exists(${SYSDIR}/conf/kmod.mk) .error Unable to locate the kernel source tree. Set SYSDIR to override. +.endif .endif .include "${SYSDIR}/conf/kmod.mk" Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Wed Mar 28 16:24:56 2018(r331681) +++ head/sys/conf/kmod.mk Wed Mar 28 16:28:20 2018(r331682) @@ -81,6 +81,7 @@ OBJCOPY?= objcopy .include "config.mk" # Search for kernel source tree in standard places. +.if empty(KERNBUILDDIR) .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys .if !defined(SYSDIR) && exists(${_dir}/kern/) SYSDIR=${_dir:tA} @@ -88,6 +89,7 @@ SYSDIR= ${_dir:tA} .endfor .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) .error "can't find kernel source tree" +.endif .endif .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S .m ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331683 - in head: share/mk sys/conf
Author: bdrewery Date: Wed Mar 28 16:28:24 2018 New Revision: 331683 URL: https://svnweb.freebsd.org/changeset/base/331683 Log: Avoid looping if SYSDIR already known. Sponsored by: Dell EMC Modified: head/share/mk/bsd.dtb.mk head/share/mk/bsd.kmod.mk head/sys/conf/kmod.mk Modified: head/share/mk/bsd.dtb.mk == --- head/share/mk/bsd.dtb.mkWed Mar 28 16:28:20 2018(r331682) +++ head/share/mk/bsd.dtb.mkWed Mar 28 16:28:24 2018(r331683) @@ -2,12 +2,14 @@ # Search for kernel source tree in standard places. .if empty(KERNBUILDDIR) +.if !defined(SYSDIR) .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ ${.CURDIR}/../../../../.. /sys /usr/src/sys -.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) +.if exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) SYSDIR=${_dir} .endif .endfor +.endif .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ !exists(${SYSDIR}/conf/kmod.mk) .error Unable to locate the kernel source tree. Set SYSDIR to override. Modified: head/share/mk/bsd.kmod.mk == --- head/share/mk/bsd.kmod.mk Wed Mar 28 16:28:20 2018(r331682) +++ head/share/mk/bsd.kmod.mk Wed Mar 28 16:28:24 2018(r331683) @@ -2,12 +2,14 @@ # Search for kernel source tree in standard places. .if empty(KERNBUILDDIR) +.if !defined(SYSDIR) .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ ${.CURDIR}/../../../../.. /sys /usr/src/sys -.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) +.if exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) SYSDIR=${_dir:tA} .endif .endfor +.endif .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ !exists(${SYSDIR}/conf/kmod.mk) .error Unable to locate the kernel source tree. Set SYSDIR to override. Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Wed Mar 28 16:28:20 2018(r331682) +++ head/sys/conf/kmod.mk Wed Mar 28 16:28:24 2018(r331683) @@ -82,11 +82,13 @@ OBJCOPY?= objcopy # Search for kernel source tree in standard places. .if empty(KERNBUILDDIR) +.if !defined(SYSDIR) .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys -.if !defined(SYSDIR) && exists(${_dir}/kern/) +.if exists(${_dir}/kern/) SYSDIR=${_dir:tA} .endif .endfor +.endif .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) .error "can't find kernel source tree" .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331686 - head
Author: jhb Date: Wed Mar 28 16:51:05 2018 New Revision: 331686 URL: https://svnweb.freebsd.org/changeset/base/331686 Log: Expand remaining instances of 'make kernel' to buildkernel + installkernel. The 'kernel' target is a bit more obscure compared to buildkernel and installkernel. One instance was already expanded previously in r325097. Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Wed Mar 28 16:48:26 2018(r331685) +++ head/UPDATING Wed Mar 28 16:51:05 2018(r331686) @@ -624,7 +624,8 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: rebooting, e.g.: make buildworld - make kernel KERNCONF=YOUR_KERNEL_HERE + make buildkernel KERNCONF=YOUR_KERNEL_HERE + make installkernel KERNCONF=YOUR_KERNEL_HERE make -C sys/boot install @@ -1995,7 +1996,8 @@ COMMON ITEMS: -- make buildworld [9] - make kernel KERNCONF=YOUR_KERNEL_HERE [8] + make buildkernel KERNCONF=YOUR_KERNEL_HERE [8] + make installkernel KERNCONF=YOUR_KERNEL_HERE [1] [3] mergemaster -Fp [5] ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331692 - head/sys/dev/usb/input
Author: hselasky Date: Wed Mar 28 17:39:23 2018 New Revision: 331692 URL: https://svnweb.freebsd.org/changeset/base/331692 Log: Fix for regression issue in USB keyboard driver after r304735. A series of zero delay callouts can happen causing high CPU usage of the timer subsystem when trying to repeat keys, because the time of the absolute timeout is not moving forward. The condition clears when all keys are released. Reported by: Johannes Lundberg Discussed with: bde@ PR: 226968 MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c == --- head/sys/dev/usb/input/ukbd.c Wed Mar 28 17:19:04 2018 (r331691) +++ head/sys/dev/usb/input/ukbd.c Wed Mar 28 17:39:23 2018 (r331692) @@ -386,10 +386,22 @@ ukbd_any_key_pressed(struct ukbd_softc *sc) static void ukbd_start_timer(struct ukbd_softc *sc) { - sbintime_t delay, prec; + sbintime_t delay, now, prec; + now = sbinuptime(); + + /* check if initial delay passed and fallback to key repeat delay */ + if (sc->sc_delay == 0) + sc->sc_delay = sc->sc_kbd.kb_delay2; + + /* compute timeout */ delay = SBT_1MS * sc->sc_delay; sc->sc_co_basetime += delay; + + /* check if we are running behind */ + if (sc->sc_co_basetime < now) + sc->sc_co_basetime = now; + /* This is rarely called, so prefer precision to efficiency. */ prec = qmin(delay >> 7, SBT_1MS * 10); usb_callout_reset_sbt(&sc->sc_callout, sc->sc_co_basetime, prec, @@ -510,7 +522,6 @@ ukbd_get_key(struct ukbd_softc *sc, uint8_t wait) static void ukbd_interrupt(struct ukbd_softc *sc) { - struct timeval ctv; uint32_t n_mod; uint32_t o_mod; uint32_t now = sc->sc_time_ms; @@ -580,14 +591,11 @@ rfound: ; break; } } - if (j < UKBD_NKEYCODE) { - /* Old key repeating. */ - sc->sc_delay = sc->sc_kbd.kb_delay2; - } else { - /* New key. */ - microuptime(&ctv); - sc->sc_co_basetime = tvtosbt(ctv); + if (j == UKBD_NKEYCODE) { + /* New key - set initial delay and [re]start timer */ + sc->sc_co_basetime = sbinuptime(); sc->sc_delay = sc->sc_kbd.kb_delay1; + ukbd_start_timer(sc); } ukbd_put_key(sc, key | KEY_PRESS); @@ -837,10 +845,6 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t } ukbd_interrupt(sc); - - if (ukbd_any_key_pressed(sc) != 0) { - ukbd_start_timer(sc); - } case USB_ST_SETUP: tr_setup: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331694 - head/sys/compat/linuxkpi/common/include/linux
Author: hselasky Date: Wed Mar 28 17:54:34 2018 New Revision: 331694 URL: https://svnweb.freebsd.org/changeset/base/331694 Log: Swap two instances of regular macros with function macros in the LinuxKPI, to narrow down the substitution scope. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h == --- head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Mar 28 17:49:31 2018(r331693) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Mar 28 17:54:34 2018(r331694) @@ -538,7 +538,9 @@ struct msix_entry { * NB: define added to prevent this definition of pci_enable_msix from * clashing with the native FreeBSD version. */ -#definepci_enable_msix linux_pci_enable_msix +#definepci_enable_msix(...) \ + linux_pci_enable_msix(__VA_ARGS__) + static inline int pci_enable_msix(struct pci_dev *pdev, struct msix_entry *entries, int nreq) { @@ -572,7 +574,9 @@ pci_enable_msix(struct pci_dev *pdev, struct msix_entr return (0); } -#definepci_enable_msix_range linux_pci_enable_msix_range +#definepci_enable_msix_range(...) \ + linux_pci_enable_msix_range(__VA_ARGS__) + static inline int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries, int minvec, int maxvec) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331696 - head/share/man/man7
Author: gjb Date: Wed Mar 28 18:28:27 2018 New Revision: 331696 URL: https://svnweb.freebsd.org/changeset/base/331696 Log: Update the Release Engineering article URL to the modern version. MFC after:3 days Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/release.7 Modified: head/share/man/man7/release.7 == --- head/share/man/man7/release.7 Wed Mar 28 18:12:06 2018 (r331695) +++ head/share/man/man7/release.7 Wed Mar 28 18:28:27 2018 (r331696) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 28, 2017 +.Dd March 28, 2018 .Dt RELEASE 7 .Os .Sh NAME @@ -709,7 +709,7 @@ variable in .Xr sysctl 8 .Rs .%T "FreeBSD Release Engineering" -.%U https://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/releng/ +.%U https://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/freebsd-releng/ .Re .Rs .%T "FreeBSD Developers' Handbook" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331697 - head/share/man/man7
Author: gjb Date: Wed Mar 28 18:43:06 2018 New Revision: 331697 URL: https://svnweb.freebsd.org/changeset/base/331697 Log: Add an example for building SD card images for the RPI-B and RPI3. MFC after:3 days Suggested by: Arshan Khanifar Reviewed by: Arshan Khanifar Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/release.7 Modified: head/share/man/man7/release.7 == --- head/share/man/man7/release.7 Wed Mar 28 18:28:27 2018 (r331696) +++ head/share/man/man7/release.7 Wed Mar 28 18:43:06 2018 (r331697) @@ -687,6 +687,23 @@ cd /usr/src/release sh release.sh -c $HOME/release.conf .Ed .Pp +Configuration files specific to various supported embedded systems, such as +the Raspberry Pi, exist in the directory corresponding to the +.Va TARGET +.Xr make 1 +variable. +For example, to build an image for the Raspberry Pi: +.Bd -literal -offset indent +cd /usr/src/release +sh release.sh -c arm/RPI-B.conf +.Ed +.Pp +To build an image for the Raspberry Pi 3: +.Bd -literal -offset indent +cd /usr/src/release +sh release.sh -c arm64/RPI3.conf +.Ed +.Pp After running these commands, all prepared release files are available in the .Pa /scratch directory. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331698 - in head/sys: amd64/include i386/include kern x86/x86 x86/xen
Author: jeff Date: Wed Mar 28 18:47:35 2018 New Revision: 331698 URL: https://svnweb.freebsd.org/changeset/base/331698 Log: Restore r331606 with a bugfix to setup cpuset_domain[] earlier on all platforms. Original commit message as follows: Only use CPUs in the domain the device is attached to for default assignment. Device drivers are able to override the default assignment if they bind directly. There are severe performance penalties for handling interrupts on remote CPUs and this should only be done in very controlled circumstances. Reviewed by:jhb, kib Tested by: pho Sponsored by: Netflix, Dell/EMC Isilon Differential Revision: https://reviews.freebsd.org/D14838 Modified: head/sys/amd64/include/intr_machdep.h head/sys/i386/include/intr_machdep.h head/sys/kern/kern_cpuset.c head/sys/x86/x86/intr_machdep.c head/sys/x86/x86/io_apic.c head/sys/x86/x86/msi.c head/sys/x86/x86/nexus.c head/sys/x86/xen/xen_intr.c Modified: head/sys/amd64/include/intr_machdep.h == --- head/sys/amd64/include/intr_machdep.h Wed Mar 28 18:43:06 2018 (r331697) +++ head/sys/amd64/include/intr_machdep.h Wed Mar 28 18:47:35 2018 (r331698) @@ -132,6 +132,7 @@ struct intsrc { u_long *is_straycount; u_int is_index; u_int is_handlers; + u_int is_domain; u_int is_cpu; }; @@ -168,7 +169,7 @@ voidintr_add_cpu(u_int cpu); #endif intintr_add_handler(const char *name, int vector, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, -void **cookiep); +void **cookiep, int domain); #ifdef SMP intintr_bind(u_int vector, u_char cpu); #endif @@ -176,7 +177,7 @@ int intr_config_intr(int vector, enum intr_trigger tri enum intr_polarity pol); intintr_describe(u_int vector, void *ih, const char *descr); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); -u_int intr_next_cpu(void); +u_int intr_next_cpu(int domain); struct intsrc *intr_lookup_source(int vector); intintr_register_pic(struct pic *pic); intintr_register_source(struct intsrc *isrc); Modified: head/sys/i386/include/intr_machdep.h == --- head/sys/i386/include/intr_machdep.hWed Mar 28 18:43:06 2018 (r331697) +++ head/sys/i386/include/intr_machdep.hWed Mar 28 18:47:35 2018 (r331698) @@ -132,6 +132,7 @@ struct intsrc { u_long *is_straycount; u_int is_index; u_int is_handlers; + u_int is_domain; u_int is_cpu; }; @@ -158,7 +159,8 @@ voidelcr_write_trigger(u_int irq, enum intr_trigger t void intr_add_cpu(u_int cpu); #endif intintr_add_handler(const char *name, int vector, driver_filter_t filter, -driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); +driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep, +int domain); #ifdef SMP intintr_bind(u_int vector, u_char cpu); #endif @@ -166,7 +168,7 @@ int intr_config_intr(int vector, enum intr_trigger tri enum intr_polarity pol); intintr_describe(u_int vector, void *ih, const char *descr); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); -u_int intr_next_cpu(void); +u_int intr_next_cpu(int domain); struct intsrc *intr_lookup_source(int vector); intintr_register_pic(struct pic *pic); intintr_register_source(struct intsrc *isrc); Modified: head/sys/kern/kern_cpuset.c == --- head/sys/kern/kern_cpuset.c Wed Mar 28 18:43:06 2018(r331697) +++ head/sys/kern/kern_cpuset.c Wed Mar 28 18:47:35 2018(r331698) @@ -1363,6 +1363,7 @@ cpuset_thread0(void) { struct cpuset *set; int error; + int i; cpuset_zone = uma_zcreate("cpuset", sizeof(struct cpuset), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); @@ -1374,11 +1375,11 @@ cpuset_thread0(void) * cpuset_create() due to NULL parent. */ set = uma_zalloc(cpuset_zone, M_WAITOK | M_ZERO); - CPU_FILL(&set->cs_mask); + CPU_COPY(&all_cpus, &set->cs_mask); LIST_INIT(&set->cs_children); LIST_INSERT_HEAD(&cpuset_ids, set, cs_link); set->cs_ref = 1; - set->cs_flags = CPU_SET_ROOT; + set->cs_flags = CPU_SET_ROOT | CPU_SET_RDONLY; set->cs_domain = &domainset0; cpuset_zero = set; cpuset_root = &set->cs_mask; @@ -1396,6 +1397,16 @@ cpuset_thread0(void) */ cpuset_unr = new_unrhdr(2, INT_MAX, NULL); + /* +* If MD code has not initialized per-domain cpusets, place all +* CPUs in domain 0. +*/ + for (i = 0; i < M
Re: svn commit: r331686 - head
On 28 Mar 2018, at 18:51, John Baldwin wrote: > > Author: jhb > Date: Wed Mar 28 16:51:05 2018 > New Revision: 331686 > URL: https://svnweb.freebsd.org/changeset/base/331686 > > Log: > Expand remaining instances of 'make kernel' to buildkernel + installkernel. > > The 'kernel' target is a bit more obscure compared to buildkernel and > installkernel. The 'kernel' target doesn't seem that obscure to me, it is clearly documented in build(7), right? In my opinion, the main advantage of separate build and install steps is that you can run the former as a non-privileged user, while only having to run the latter as super-user. -Dimitry signature.asc Description: Message signed with OpenPGP
svn commit: r331699 - in head/cddl/contrib/opensolaris/cmd: zdb ztest
Author: mav Date: Wed Mar 28 20:41:15 2018 New Revision: 331699 URL: https://svnweb.freebsd.org/changeset/base/331699 Log: Partial MFV r329753: 8809 libzpool should leverage work done in libfakekernel illumos/illumos-gate@f06dce2c1f0f3af78581e7574f65bfba843ddb6e Reviewed by: Sebastien Roy Reviewed by: Prakash Surya Reviewed by: Gordon Ross Approved by: Richard Lowe Author: Andrew Stormont We do not have libfakekernel, but need to reduce code divergence. Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zdb/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c == --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Mar 28 18:47:35 2018 (r331698) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Mar 28 20:41:15 2018 (r331699) @@ -24,6 +24,7 @@ * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2017 Nexenta Systems, Inc. + * Copyright 2017 RackTop Systems. */ #include @@ -88,12 +89,14 @@ extern boolean_t zfs_recover; extern uint64_t zfs_arc_max, zfs_arc_meta_limit; extern int zfs_vdev_async_read_max_active; extern boolean_t spa_load_verify_dryrun; +extern int aok; #else int reference_tracking_enable; boolean_t zfs_recover; uint64_t zfs_arc_max, zfs_arc_meta_limit; int zfs_vdev_async_read_max_active; boolean_t spa_load_verify_dryrun; +int aok; #endif static const char cmdname[] = "zdb"; Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c == --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed Mar 28 18:47:35 2018(r331698) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed Mar 28 20:41:15 2018(r331699) @@ -26,6 +26,7 @@ * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2017 Joyent, Inc. + * Copyright 2017 RackTop Systems. */ /* @@ -247,8 +248,8 @@ typedef enum { typedef struct rll { void*rll_writer; int rll_readers; - mutex_t rll_lock; - cond_t rll_cv; + kmutex_trll_lock; + kcondvar_t rll_cv; } rll_t; typedef struct rl { @@ -282,11 +283,11 @@ typedef struct ztest_od { typedef struct ztest_ds { ztest_shared_ds_t *zd_shared; objset_t*zd_os; - rwlock_tzd_zilog_lock; + krwlock_t zd_zilog_lock; zilog_t *zd_zilog; ztest_od_t *zd_od; /* debugging aid */ charzd_name[ZFS_MAX_DATASET_NAME_LEN]; - mutex_t zd_dirobj_lock; + kmutex_tzd_dirobj_lock; rll_t zd_object_lock[ZTEST_OBJECT_LOCKS]; rll_t zd_range_lock[ZTEST_RANGE_LOCKS]; } ztest_ds_t; @@ -397,7 +398,7 @@ ztest_info_t ztest_info[] = { * The callbacks are ordered by txg number. */ typedef struct ztest_cb_list { - mutex_t zcl_callbacks_lock; + kmutex_t zcl_callbacks_lock; list_t zcl_callbacks; } ztest_cb_list_t; @@ -432,7 +433,7 @@ ztest_shared_t *ztest_shared; static spa_t *ztest_spa = NULL; static ztest_ds_t *ztest_ds; -static mutex_t ztest_vdev_lock; +static kmutex_t ztest_vdev_lock; /* * The ztest_name_lock protects the pool and dataset namespace used by @@ -440,7 +441,7 @@ static mutex_t ztest_vdev_lock; * this lock as writer. Grabbing the lock as reader will ensure that the * namespace does not change while the lock is held. */ -static rwlock_t ztest_name_lock; +static krwlock_t ztest_name_lock; static boolean_t ztest_dump_core = B_TRUE; static boolean_t ztest_exiting; @@ -1096,8 +1097,8 @@ ztest_rll_init(rll_t *rll) { rll->rll_writer = NULL; rll->rll_readers = 0; - VERIFY(_mutex_init(&rll->rll_lock, USYNC_THREAD, NULL) == 0); - VERIFY(cond_init(&rll->rll_cv, USYNC_THREAD, NULL) == 0); + mutex_init(&rll->rll_lock, NULL, USYNC_THREAD, NULL); + cv_init(&rll->rll_cv, NULL, USYNC_THREAD, NULL); } static void @@ -1105,32 +1106,32 @@ ztest_rll_destroy(rll_t *rll) { ASSERT(rll->rll_writer == NULL); ASSERT(rll->rll_readers == 0); - VERIFY(_mutex_destroy(&rll->rll_lock) == 0); - VERIFY(cond_destroy(&rll->rll_cv) == 0); + mutex_destroy(&rll->rll_lock); + cv_destroy(&rll->rll_cv); } static void ztest_rll_lock(rll_t *rll, rl_type_t type) { - VERIFY(mutex_lock(&rll->rll_lock) == 0); + mutex_enter(&rll->rll_lock); if (type == RL_READER) { while (rll->rll_writer != NULL) - (void) cond_wait(&rll->rll_cv, &rll->rll_lock); +
svn commit: r331701 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensol...
Author: mav Date: Wed Mar 28 22:01:27 2018 New Revision: 331701 URL: https://svnweb.freebsd.org/changeset/base/331701 Log: MFV r331695, 331700: 9166 zfs storage pool checkpoint illumos/illumos-gate@8671400134a11c848244896ca51a7db4d0f69da4 The idea of Storage Pool Checkpoint (aka zpool checkpoint) deals with exactly that. It can be thought of as a “pool-wide snapshot” (or a variation of extreme rewind that doesn’t corrupt your data). It remembers the entire state of the pool at the point that it was taken and the user can revert back to it later or discard it. Its generic use case is an administrator that is about to perform a set of destructive actions to ZFS as part of a critical procedure. She takes a checkpoint of the pool before performing the actions, then rewinds back to it if one of them fails or puts the pool into an unexpected state. Otherwise, she discards it. With the assumption that no one else is making modifications to ZFS, she basically wraps all these actions into a “high-level transaction”. Reviewed by: Matthew Ahrens Reviewed by: John Kennedy Reviewed by: Dan Kimmel Approved by: Richard Lowe Author: Serapheim Dimitropoulos Added: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_checkpoint.c - copied unchanged from r331700, vendor-sys/illumos/dist/uts/common/fs/zfs/spa_checkpoint.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_checkpoint.h - copied unchanged from r331700, vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_checkpoint.h Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c head/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c head/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h head/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_synctask.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_removal.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zthr.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp.c
svn commit: r331703 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Wed Mar 28 22:07:31 2018 New Revision: 331703 URL: https://svnweb.freebsd.org/changeset/base/331703 Log: MFV 331702: 9187 racing condition between vdev label and spa_last_synced_txg in vdev_validate illumos/illumos-gate@d1de72cfa29ab77ff80e2bb0e668a6afa5bccaf0 ztest failed with uncorrectable IO error despite having the fix for #7163. Both sides of the mirror have CANT_OPEN_BAD_LABEL, which also distinguishes it from that issue. Definitely seems like a racing condition between the vdev_validate and spa_sync: 1. Thread A (spa_sync): vdev label is updated to latest txg 2. Thread B (vdev_validate): vdev label's txg is compared to spa_last_synced_txg and is ahead. 3. Thread A (spa_sync): spa_last_synced_txg is updated to latest txg. Solution: do not check txg in vdev_validate unless config lock is held. Reviewed by: George Wilson Reviewed by: Matt Ahrens Approved by: Robert Mustacchi Author: Pavel Zakharov Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Wed Mar 28 22:06:12 2018(r331702) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Wed Mar 28 22:07:31 2018(r331703) @@ -1696,8 +1696,11 @@ vdev_validate(vdev_t *vd) /* * If we are performing an extreme rewind, we allow for a label that * was modified at a point after the current txg. +* If config lock is not held do not check for the txg. spa_sync could +* be updating the vdev's label before updating spa_last_synced_txg. */ - if (spa->spa_extreme_rewind || spa_last_synced_txg(spa) == 0) + if (spa->spa_extreme_rewind || spa_last_synced_txg(spa) == 0 || + spa_config_held(spa, SCL_CONFIG, RW_WRITER) != SCL_CONFIG) txg = UINT64_MAX; else txg = spa_last_synced_txg(spa); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331705 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Wed Mar 28 22:10:06 2018 New Revision: 331705 URL: https://svnweb.freebsd.org/changeset/base/331705 Log: MFV 331704: 9191 dump vdev tree to zfs_dbgmsg when spa load fails due to missing log devices illumos/illumos-gate@ccef24b493bcbd146fcd6d894cae081470b6 Reviewed by: George Wilson Reviewed by: Prakash Surya Reviewed by: Matt Ahrens Approved by: Robert Mustacchi Author: Pavel Zakharov Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Mar 28 22:08:57 2018(r331704) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Mar 28 22:10:06 2018(r331705) @@ -1887,6 +1887,7 @@ spa_check_for_missing_logs(spa_t *spa) if (idx > 0) { spa_load_failed(spa, "some log devices are missing"); + vdev_dbgmsg_print_tree(rvd, 2); return (SET_ERROR(ENXIO)); } } else { @@ -1898,6 +1899,7 @@ spa_check_for_missing_logs(spa_t *spa) spa_set_log_state(spa, SPA_LOG_CLEAR); spa_load_note(spa, "some log devices are " "missing, ZIL is dropped."); + vdev_dbgmsg_print_tree(rvd, 2); break; } } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331707 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contri...
Author: mav Date: Wed Mar 28 22:29:06 2018 New Revision: 331707 URL: https://svnweb.freebsd.org/changeset/base/331707 Log: MFV r331706: 9235 rename zpool_rewind_policy_t to zpool_load_policy_t illumos/illumos-gate@5dafeea3ebd2dd77affc802bcb90f63faf01589f We want to be able to pass various settings during import/open of a pool, which are not only related to rewind. Instead of adding a new policy and duplicate a bunch of code, we should just rename rewind_policy to a more generic term like load_policy. For instance, we'd like to set spa->spa_import_flags from the nvlist, rather from a flags parameter passed to spa_import as in some cases we want those flags not only for the import case, but also for the open case. One such flag could be ZFS_IMPORT_MISSING_LOG (as used in zdb) which would allow zfs to open a pool when logs are missing. Reviewed by: Matt Ahrens Reviewed by: George Wilson Approved by: Robert Mustacchi Author: Pavel Zakharov Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zdb/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c == --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Mar 28 22:16:51 2018 (r331706) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Mar 28 22:29:06 2018 (r331707) @@ -5222,8 +5222,8 @@ main(int argc, char **argv) (dump_opt['X'] ? ZPOOL_EXTREME_REWIND : 0); if (nvlist_alloc(&policy, NV_UNIQUE_NAME_TYPE, 0) != 0 || - nvlist_add_uint64(policy, ZPOOL_REWIND_REQUEST_TXG, max_txg) != 0 || - nvlist_add_uint32(policy, ZPOOL_REWIND_REQUEST, rewind) != 0) + nvlist_add_uint64(policy, ZPOOL_LOAD_REQUEST_TXG, max_txg) != 0 || + nvlist_add_uint32(policy, ZPOOL_LOAD_REWIND_POLICY, rewind) != 0) fatal("internal error: %s", strerror(ENOMEM)); error = 0; @@ -5240,7 +5240,7 @@ main(int argc, char **argv) } if (nvlist_add_nvlist(cfg, - ZPOOL_REWIND_POLICY, policy) != 0) { + ZPOOL_LOAD_POLICY, policy) != 0) { fatal("can't open '%s': %s", target, strerror(ENOMEM)); } Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c == --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.cWed Mar 28 22:16:51 2018(r331706) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.cWed Mar 28 22:29:06 2018(r331707) @@ -2357,8 +2357,9 @@ zpool_do_import(int argc, char **argv) /* In the future, we can capture further policy and include it here */ if (nvlist_alloc(&policy, NV_UNIQUE_NAME, 0) != 0 || - nvlist_add_uint64(policy, ZPOOL_REWIND_REQUEST_TXG, txg) != 0 || - nvlist_add_uint32(policy, ZPOOL_REWIND_REQUEST, rewind_policy) != 0) + nvlist_add_uint64(policy, ZPOOL_LOAD_REQUEST_TXG, txg) != 0 || + nvlist_add_uint32(policy, ZPOOL_LOAD_REWIND_POLICY, + rewind_policy) != 0) goto error; if (searchdirs == NULL) { @@ -2483,7 +2484,7 @@ zpool_do_import(int argc, char **argv) if (do_destroyed && pool_state != POOL_STATE_DESTROYED) continue; - verify(nvlist_add_nvlist(config, ZPOOL_REWIND_POLICY, + verify(nvlist_add_nvlist(config, ZPOOL_LOAD_POLICY, policy) == 0); if (argc == 0) { @@ -3971,8 +3972,10 @@ zpool_do_clear(int argc, char **argv) /* In future, further rewind policy choices can be passed along here */ if (nvlist_alloc(&policy, NV_UNIQUE_NAME, 0) != 0 || - nvlist_add_uint32(policy, ZPOOL_REWIND_REQUEST, rewind_policy) != 0) + nvlist_add_uint32(policy, ZPOOL_LOAD_REWIND_POLICY, + rewind_policy) != 0) { return (1); + } pool = argv[0]; device = argc == 2 ? argv[1] : NULL; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ===
svn commit: r331709 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Wed Mar 28 22:50:05 2018 New Revision: 331709 URL: https://svnweb.freebsd.org/changeset/base/331709 Log: MFV r331708: 9321 arc_loan_compressed_buf() can increment arc_loaned_bytes by the wrong value illumos/illumos-gate@9be12bd737714550277bd02b0c693db560976990 arc_loan_compressed_buf() increments arc_loaned_bytes by psize unconditionally In the case of zfs_compressed_arc_enabled=0, when the buf is returned via arc_return_buf(), if ARC_BUF_COMPRESSED(buf) is false, then arc_loaned_bytes is decremented by lsize, not psize. Switch to using arc_buf_size(buf), instead of psize, which will return psize or lsize, depending on the result of ARC_BUF_COMPRESSED(buf). Reviewed by: Matt Ahrens Reviewed by: George Wilson Approved by: Garrett D'Amore Author: Allan Jude Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Mar 28 22:43:55 2018(r331708) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Mar 28 22:50:05 2018(r331709) @@ -2877,7 +2877,7 @@ arc_loan_buf(spa_t *spa, boolean_t is_metadata, int si arc_buf_t *buf = arc_alloc_buf(spa, arc_onloan_tag, is_metadata ? ARC_BUFC_METADATA : ARC_BUFC_DATA, size); - arc_loaned_bytes_update(size); + arc_loaned_bytes_update(arc_buf_size(buf)); return (buf); } @@ -2889,7 +2889,7 @@ arc_loan_compressed_buf(spa_t *spa, uint64_t psize, ui arc_buf_t *buf = arc_alloc_compressed_buf(spa, arc_onloan_tag, psize, lsize, compression_type); - arc_loaned_bytes_update(psize); + arc_loaned_bytes_update(arc_buf_size(buf)); return (buf); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331711 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Wed Mar 28 23:05:48 2018 New Revision: 331711 URL: https://svnweb.freebsd.org/changeset/base/331711 Log: MFV 331710: 9188 increase size of dbuf cache to reduce indirect block decompression illumos/illumos-gate@268bbb2a2fa79c36d4695d13a595ba50a7754b76 With compressed ARC (6950) we use up to 25% of our CPU to decompress indirect blocks, under a workload of random cached reads. To reduce this decompression cost, we would like to increase the size of the dbuf cache so that more indirect blocks can be stored uncompressed. If we are caching entire large files of recordsize=8K, the indirect blocks use 1/64th as much memory as the data blocks (assuming they have the same compression ratio). We suggest making the dbuf cache be 1/32nd of all memory, so that in this scenario we should be able to keep all the indirect blocks decompressed in the dbuf cache. (We want it to be more than the 1/64th that the indirect blocks would use because we need to cache other stuff in the dbuf cache as well.) In real world workloads, this won't help as dramatically as the example above, but we think it's still worth it because the risk of decreasing performance is low. The potential negative performance impact is that we will be slightly reducing the size of the ARC (by ~3%). Reviewed by: Dan Kimmel Reviewed by: Prashanth Sreenivasa Reviewed by: Paul Dagnelie Reviewed by: Sanjay Nadkarni Reviewed by: Allan Jude Reviewed by: Igor Kozhukhov Approved by: Garrett D'Amore Author: George Wilson Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Mar 28 22:57:02 2018(r331710) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Mar 28 23:05:48 2018(r331711) @@ -85,10 +85,10 @@ static boolean_t dbuf_evict_thread_exit; */ static multilist_t *dbuf_cache; static refcount_t dbuf_cache_size; -uint64_t dbuf_cache_max_bytes = 100 * 1024 * 1024; +uint64_t dbuf_cache_max_bytes = 0; -/* Cap the size of the dbuf cache to log2 fraction of arc size. */ -int dbuf_cache_max_shift = 5; +/* Set the default size of the dbuf cache to log2 fraction of arc size. */ +int dbuf_cache_shift = 5; /* * The dbuf cache uses a three-stage eviction policy: @@ -138,8 +138,8 @@ uint_t dbuf_cache_lowater_pct = 10; SYSCTL_DECL(_vfs_zfs); SYSCTL_QUAD(_vfs_zfs, OID_AUTO, dbuf_cache_max_bytes, CTLFLAG_RWTUN, &dbuf_cache_max_bytes, 0, "dbuf cache size in bytes"); -SYSCTL_INT(_vfs_zfs, OID_AUTO, dbuf_cache_max_shift, CTLFLAG_RDTUN, -&dbuf_cache_max_shift, 0, "dbuf size as log2 fraction of ARC"); +SYSCTL_INT(_vfs_zfs, OID_AUTO, dbuf_cache_shift, CTLFLAG_RDTUN, +&dbuf_cache_shift, 0, "dbuf cache size as log2 fraction of ARC"); SYSCTL_UINT(_vfs_zfs, OID_AUTO, dbuf_cache_hiwater_pct, CTLFLAG_RWTUN, &dbuf_cache_hiwater_pct, 0, "max percents above the dbuf cache size"); SYSCTL_UINT(_vfs_zfs, OID_AUTO, dbuf_cache_lowater_pct, CTLFLAG_RWTUN, @@ -610,11 +610,15 @@ retry: mutex_init(&h->hash_mutexes[i], NULL, MUTEX_DEFAULT, NULL); /* -* Setup the parameters for the dbuf cache. We cap the size of the -* dbuf cache to 1/32nd (default) of the size of the ARC. +* Setup the parameters for the dbuf cache. We set the size of the +* dbuf cache to 1/32nd (default) of the size of the ARC. If the value +* has been set in /etc/system and it's not greater than the size of +* the ARC, then we honor that value. */ - dbuf_cache_max_bytes = MIN(dbuf_cache_max_bytes, - arc_max_bytes() >> dbuf_cache_max_shift); + if (dbuf_cache_max_bytes == 0 || + dbuf_cache_max_bytes >= arc_max_bytes()) { + dbuf_cache_max_bytes = arc_max_bytes() >> dbuf_cache_shift; + } /* * All entries are queued via taskq_dispatch_ent(), so min/maxalloc ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331713 - in head: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Wed Mar 28 23:17:29 2018 New Revision: 331713 URL: https://svnweb.freebsd.org/changeset/base/331713 Log: MFV r331712: 9280 Assertion failure while running removal_with_ganging test with 4K devices illumos/illumos-gate@243952c7eeef020886e3e2e3df99a513df40584a Reviewed by: George Wilson Reviewed by: John Kennedy Approved by: Garrett D'Amore Author: Matt Ahrens Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c == --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed Mar 28 23:12:03 2018(r331712) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Wed Mar 28 23:17:29 2018(r331713) @@ -164,7 +164,7 @@ typedef struct ztest_shared_opts { int zo_init; uint64_t zo_time; uint64_t zo_maxloops; - uint64_t zo_metaslab_gang_bang; + uint64_t zo_metaslab_force_ganging; } ztest_shared_opts_t; static const ztest_shared_opts_t ztest_opts_defaults = { @@ -186,10 +186,10 @@ static const ztest_shared_opts_t ztest_opts_defaults = .zo_init = 1, .zo_time = 300, /* 5 minutes */ .zo_maxloops = 50, /* max loops during spa_freeze() */ - .zo_metaslab_gang_bang = 32 << 10 + .zo_metaslab_force_ganging = 32 << 10 }; -extern uint64_t metaslab_gang_bang; +extern uint64_t metaslab_force_ganging; extern uint64_t metaslab_df_alloc_threshold; extern uint64_t zfs_deadman_synctime_ms; extern int metaslab_preload_limit; @@ -567,12 +567,12 @@ usage(boolean_t requested) const ztest_shared_opts_t *zo = &ztest_opts_defaults; char nice_vdev_size[NN_NUMBUF_SZ]; - char nice_gang_bang[NN_NUMBUF_SZ]; + char nice_force_ganging[NN_NUMBUF_SZ]; FILE *fp = requested ? stdout : stderr; nicenum(zo->zo_vdev_size, nice_vdev_size, sizeof (nice_vdev_size)); - nicenum(zo->zo_metaslab_gang_bang, nice_gang_bang, - sizeof (nice_gang_bang)); + nicenum(zo->zo_metaslab_force_ganging, nice_force_ganging, + sizeof (nice_force_ganging)); (void) fprintf(fp, "Usage: %s\n" "\t[-v vdevs (default: %llu)]\n" @@ -607,7 +607,7 @@ usage(boolean_t requested) zo->zo_raidz_parity,/* -R */ zo->zo_datasets,/* -d */ zo->zo_threads, /* -t */ - nice_gang_bang, /* -g */ + nice_force_ganging, /* -g */ zo->zo_init,/* -i */ (u_longlong_t)zo->zo_killrate, /* -k */ zo->zo_pool,/* -p */ @@ -676,8 +676,8 @@ process_options(int argc, char **argv) zo->zo_threads = MAX(1, value); break; case 'g': - zo->zo_metaslab_gang_bang = MAX(SPA_MINBLOCKSIZE << 1, - value); + zo->zo_metaslab_force_ganging = + MAX(SPA_MINBLOCKSIZE << 1, value); break; case 'i': zo->zo_init = value; @@ -6425,7 +6425,7 @@ main(int argc, char **argv) zs = ztest_shared; if (fd_data_str) { - metaslab_gang_bang = ztest_opts.zo_metaslab_gang_bang; + metaslab_force_ganging = ztest_opts.zo_metaslab_force_ganging; metaslab_df_alloc_threshold = zs->zs_metaslab_df_alloc_threshold; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed Mar 28 23:12:03 2018(r331712) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed Mar 28 23:17:29 2018(r331713) @@ -44,9 +44,9 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, metaslab, CTLFLAG_RW, ((flags) & (METASLAB_GANG_CHILD | METASLAB_GANG_HEADER)) uint64_t metaslab_aliquot = 512ULL << 10; -uint64_t metaslab_gang_bang = SPA_MAXBLOCKSIZE + 1;/* force gang blocks */ -SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, gang_bang, CTLFLAG_RWTUN, -&metaslab_gang_bang, 0, +uint64_t metaslab_force_ganging = SPA_MAXBLOCKSIZE + 1;/* force gang blocks */ +SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, force_ganging, CTLFLAG_RWTUN, +&metaslab_force_ganging, 0, "Force gang block allocation for blocks larger than or equal to this value"); /* @@ -3172,7 +3172,7 @@ metaslab_alloc_dva(spa_t *sp
svn commit: r331714 - in head: . sys/conf sys/net sys/netinet sys/netinet6 sys/nfs usr.sbin/arp
Author: brooks Date: Wed Mar 28 23:33:26 2018 New Revision: 331714 URL: https://svnweb.freebsd.org/changeset/base/331714 Log: Remove infrastructure for token-ring networks. Reviewed by: cem, imp, jhb, jmallett Relnotes: yes Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D14875 Deleted: head/sys/net/if_iso88025subr.c head/sys/net/iso88025.h Modified: head/UPDATING head/sys/conf/NOTES head/sys/conf/files head/sys/net/if.c head/sys/netinet/ip_carp.c head/sys/netinet6/in6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/sys/nfs/bootp_subr.c head/usr.sbin/arp/arp.c Modified: head/UPDATING == --- head/UPDATING Wed Mar 28 23:17:29 2018(r331713) +++ head/UPDATING Wed Mar 28 23:33:26 2018(r331714) @@ -51,6 +51,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ** SPECIAL WARNING: ** +20180528: + Support for token ring networks has been removed. If you + have "device token" in your kernel config you should remove + it. No device drivers supported token ring. + 20180323: makefs was modified to be able to tag ISO9660 El Torito boot catalog entries as EFI instead of overloading the i386 tag as done previously. Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Wed Mar 28 23:17:29 2018(r331713) +++ head/sys/conf/NOTES Wed Mar 28 23:33:26 2018(r331714) @@ -807,7 +807,7 @@ device loop # The `ether' device provides generic code to handle # Ethernets; it is MANDATORY when an Ethernet device driver is -# configured or token-ring is enabled. +# configured. device ether # The `vlan' device implements the VLAN tagging of Ethernet frames @@ -845,9 +845,6 @@ device wlan_xauth # The 'wlan_amrr' device provides AMRR transmit rate control algorithm device wlan_acl device wlan_amrr - -# Generic TokenRing -device token # The `fddi' device provides generic code to support FDDI. device fddi Modified: head/sys/conf/files == --- head/sys/conf/files Wed Mar 28 23:17:29 2018(r331713) +++ head/sys/conf/files Wed Mar 28 23:33:26 2018(r331714) @@ -4114,7 +4114,6 @@ net/if_gif.c optional gif inet | gif inet6 | \ netgraph_gif inet | netgraph_gif inet6 net/if_gre.c optional gre inet | gre inet6 net/if_ipsec.c optional inet ipsec | inet6 ipsec -net/if_iso88025subr.c optional token net/if_lagg.c optional lagg net/if_loop.c optional loop net/if_llatbl.cstandard Modified: head/sys/net/if.c == --- head/sys/net/if.c Wed Mar 28 23:17:29 2018(r331713) +++ head/sys/net/if.c Wed Mar 28 23:33:26 2018(r331714) @@ -3626,7 +3626,6 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, case IFT_ETHER: case IFT_FDDI: case IFT_XETHER: - case IFT_ISO88025: case IFT_L2VLAN: case IFT_BRIDGE: case IFT_ARCNET: Modified: head/sys/netinet/ip_carp.c == --- head/sys/netinet/ip_carp.c Wed Mar 28 23:17:29 2018(r331713) +++ head/sys/netinet/ip_carp.c Wed Mar 28 23:33:26 2018(r331714) @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -1539,17 +1538,6 @@ carp_output(struct ifnet *ifp, struct mbuf *m, const s fh->fddi_shost[5] = sc->sc_vhid; } break; - case IFT_ISO88025: { - struct iso88025_header *th; - th = mtod(m, struct iso88025_header *); - th->iso88025_shost[0] = 3; - th->iso88025_shost[1] = 0; - th->iso88025_shost[2] = 0x40 >> (sc->sc_vhid - 1); - th->iso88025_shost[3] = 0x4 >> (sc->sc_vhid - 1); - th->iso88025_shost[4] = 0; - th->iso88025_shost[5] = 0; - } - break; default: printf("%s: carp is not supported for the %d interface type\n", ifp->if_xname, ifp->if_type); @@ -1732,7 +1720,6 @@ carp_ioctl(struct ifreq *ifr, u_long cmd, struct threa case IFT_L2VLAN: case IFT_BRIDGE: case IFT_FDDI: - case IFT_ISO88025: break; default:
svn commit: r331715 - head/usr.bin/truss
Author: jhb Date: Thu Mar 29 00:04:07 2018 New Revision: 331715 URL: https://svnweb.freebsd.org/changeset/base/331715 Log: Rename ClouduABIFDSFlags to CloudABIFDSFlags. Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h == --- head/usr.bin/truss/syscall.hWed Mar 28 23:33:26 2018 (r331714) +++ head/usr.bin/truss/syscall.hThu Mar 29 00:04:07 2018 (r331715) @@ -84,7 +84,7 @@ enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHe Ptraceop, Quotactlcmd, Reboothowto, Rtpriofunc, Schedpolicy, Schedparam, PSig, Siginfo, Kevent11, Iovec, Sctpsndrcvinfo, Msghdr, - CloudABIAdvice, CloudABIClockID, ClouduABIFDSFlags, + CloudABIAdvice, CloudABIClockID, CloudABIFDSFlags, CloudABIFDStat, CloudABIFileStat, CloudABIFileType, CloudABIFSFlags, CloudABILookup, CloudABIMFlags, CloudABIMProt, CloudABIMSFlags, CloudABIOFlags, CloudABISDFlags, Modified: head/usr.bin/truss/syscalls.c == --- head/usr.bin/truss/syscalls.c Wed Mar 28 23:33:26 2018 (r331714) +++ head/usr.bin/truss/syscalls.c Thu Mar 29 00:04:07 2018 (r331715) @@ -580,7 +580,7 @@ static struct syscall decoded_syscalls[] = { .args = { { Int, 0 }, { CloudABIFDStat | OUT, 1 } } }, { .name = "cloudabi_sys_fd_stat_put", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { CloudABIFDStat | IN, 1 }, - { ClouduABIFDSFlags, 2 } } }, + { CloudABIFDSFlags, 2 } } }, { .name = "cloudabi_sys_fd_sync", .ret_type = 1, .nargs = 1, .args = { { Int, 0 } } }, { .name = "cloudabi_sys_file_advise", .ret_type = 1, .nargs = 4, @@ -2519,7 +2519,7 @@ print_arg(struct syscall_args *sc, unsigned long *args case CloudABIClockID: fputs(xlookup(cloudabi_clockid, args[sc->offset]), fp); break; - case ClouduABIFDSFlags: + case CloudABIFDSFlags: fputs(xlookup_bits(cloudabi_fdsflags, args[sc->offset]), fp); break; case CloudABIFDStat: { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331716 - head/usr.bin/truss
Author: jhb Date: Thu Mar 29 00:12:50 2018 New Revision: 331716 URL: https://svnweb.freebsd.org/changeset/base/331716 Log: Reformat the enum of syscall argument types. List enum values on separate lines to minimize diffs as new types are added. Split the enum values up into groups and use some simple sorting within groups (scalar enums are sorted by size, then base, all other groups are generally sorted alphabetically). No functional change. Modified: head/usr.bin/truss/syscall.h Modified: head/usr.bin/truss/syscall.h == --- head/usr.bin/truss/syscall.hThu Mar 29 00:04:07 2018 (r331715) +++ head/usr.bin/truss/syscall.hThu Mar 29 00:12:50 2018 (r331716) @@ -69,31 +69,143 @@ * IN (meaning that the data is passed *into* the system call). */ -enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, Stat11, Ioctl, - Quad, Signal, Sockaddr, StringArray, Timespec, Timeval, Itimerval, - Pollfd, Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, - Sigset, Sigprocmask, StatFs, Kevent, Sockdomain, Socktype, Open, - Fcntlflag, Rusage, RusageWho, BinString, Shutdown, Resource, Rlimit, - Timeval2, Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, - LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, - Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, - CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd, - Kldunloadflags, Sizet, Madvice, Socklent, Sockprotocol, Sockoptlevel, - Sockoptname, Msgflags, CapRights, PUInt, PQuadHex, Acltype, - Extattrnamespace, Minherit, Mlockall, Mountflags, Msync, Priowhich, - Ptraceop, Quotactlcmd, Reboothowto, Rtpriofunc, Schedpolicy, Schedparam, - PSig, Siginfo, Kevent11, Iovec, Sctpsndrcvinfo, Msghdr, +enum Argtype { + None = 1, - CloudABIAdvice, CloudABIClockID, CloudABIFDSFlags, - CloudABIFDStat, CloudABIFileStat, CloudABIFileType, - CloudABIFSFlags, CloudABILookup, CloudABIMFlags, CloudABIMProt, - CloudABIMSFlags, CloudABIOFlags, CloudABISDFlags, - CloudABISignal, CloudABISockStat, CloudABISSFlags, - CloudABITimestamp, CloudABIULFlags, CloudABIWhence }; + /* Scalar integers. */ + Socklent, + Octal, + Int, + UInt, + Hex, + Long, + LongHex, + Sizet, + Quad, + QuadHex, + /* Encoded scalar values. */ + Accessmode, + Acltype, + Atfd, + Atflags, + CapFcntlRights, + Extattrnamespace, + Fadvice, + Fcntl, + Fcntlflag, + FileFlags, + Flockop, + Getfsstatmode, + Idtype, + Ioctl, + Kldsymcmd, + Kldunloadflags, + Madvice, + Minherit, + Msgflags, + Mlockall, + Mmapflags, + Mountflags, + Mprot, + Msync, + Open, + Pathconf, + Pipe2, + Procctl, + Priowhich, + Ptraceop, + Quotactlcmd, + Reboothowto, + Resource, + Rforkflags, + Rtpriofunc, + RusageWho, + Schedpolicy, + Shutdown, + Signal, + Sigprocmask, + Sockdomain, + Sockoptlevel, + Sockoptname, + Sockprotocol, + Socktype, + Sysarch, + Umtxop, + Waitoptions, + Whence, + + /* Pointers to non-structures. */ + Ptr, + BinString, + CapRights, + ExecArgs, + ExecEnv, + ExitStatus, + Fd_set, + IntArray, + Iovec, + Name, + PipeFds, + PSig, + PQuadHex, + PUInt, + Readlinkres, + StringArray, + + /* Pointers to structures. */ + Itimerval, + Kevent, + Kevent11, + LinuxSockArgs, + Msghdr, + Pollfd, + Rlimit, + Rusage, + Schedparam, + Sctpsndrcvinfo, + Sigaction, + Siginfo, + Sigset, + Sockaddr, + Stat, + Stat11, + StatFs, + Timespec, + Timespec2, + Timeval, + Timeval2, + Utrace, + + CloudABIAdvice, + CloudABIClockID, + CloudABIFDSFlags, + CloudABIFDStat, + CloudABIFileStat, + CloudABIFileType, + CloudABIFSFlags, + CloudABILookup, + CloudABIMFlags, + CloudABIMProt, + CloudABIMSFlags, + CloudABIOFlags, + CloudABISDFlags, + CloudABISignal, + CloudABISockStat, + CloudABISSFlags, + CloudABITimestamp, + CloudABIULFlags, + CloudABIWhence, + + MAX_ARG_TYPE, +}; + #defineARG_MASK0xff #defineOUT 0x100 #defineIN /*0x20*/0 + +_Static_assert(ARG_MASK > MAX_ARG_TYPE, +"ARG_MASK overlaps with Argtype values"); struct syscall_args { enum Argtype type; __
svn commit: r331718 - head/stand/i386/libi386
Author: kevans Date: Thu Mar 29 00:55:11 2018 New Revision: 331718 URL: https://svnweb.freebsd.org/changeset/base/331718 Log: stand: Add workaround for HP BIOS issues hrs@ and kuriyama@ have found that on some HP BIOS, a system will fail to boot immediately after installation with the claim that it can't work out which disk they are booting from. They tracked it down to a buffer overrun, and found that it could be alleviated by doing a dummy read before-hand. Submitted by: kuriyama MFC after:1 week Differential Revision:https://reviews.freebsd.org/D14341 Modified: head/stand/i386/libi386/biosdisk.c Modified: head/stand/i386/libi386/biosdisk.c == --- head/stand/i386/libi386/biosdisk.c Thu Mar 29 00:42:44 2018 (r331717) +++ head/stand/i386/libi386/biosdisk.c Thu Mar 29 00:55:11 2018 (r331718) @@ -122,6 +122,8 @@ static int nbdinfo = 0; #defineBD(dev) (bdinfo[(dev)->dd.d_unit]) +static void bd_io_workaround(struct disk_devdesc *dev); + static int bd_read(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest); static int bd_write(struct disk_devdesc *dev, daddr_t dblk, int blks, @@ -724,6 +726,15 @@ bd_chs_io(struct disk_devdesc *dev, daddr_t dblk, int return (0); } +static void +bd_io_workaround(struct disk_devdesc *dev) +{ + uint8_t buf[8 * 1024]; + + bd_edd_io(dev, 0x, 1, (caddr_t)buf, 0); +} + + static int bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks, caddr_t dest, int write) { @@ -736,6 +747,17 @@ bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks resid = blks; p = dest; + +/* + * Workaround for a problem with some HP ProLiant BIOS failing to work out + * the boot disk after installation. hrs and kuriyama discovered this + * problem with an HP ProLiant DL320e Gen 8 with a 3TB HDD, and discovered + * that an int13h call seems to cause a buffer overrun in the bios. The + * problem is alleviated by doing an extra read before the buggy read. It + * is not immediately known whether other models are similarly affected. + */ +if (dblk >= 0x1) + bd_io_workaround(dev); /* Decide whether we have to bounce */ if (VTOP(dest) >> 20 != 0 || (BD(dev).bd_unit < 0x80 && ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331720 - head/usr.bin/timeout
Author: cem Date: Thu Mar 29 02:13:58 2018 New Revision: 331720 URL: https://svnweb.freebsd.org/changeset/base/331720 Log: timeout.1: Try to improve clarity Minor rewordings, markup fixes or enhancements, and some typo fixes. Add a few sentences clarifying the special zero duration. PR: 227012 Submitted by: Mateusz Piotrowski (0mp@) (earlier version) Modified: head/usr.bin/timeout/timeout.1 Modified: head/usr.bin/timeout/timeout.1 == --- head/usr.bin/timeout/timeout.1 Thu Mar 29 01:20:58 2018 (r331719) +++ head/usr.bin/timeout/timeout.1 Thu Mar 29 02:13:58 2018 (r331720) @@ -1,3 +1,5 @@ +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" .\" Copyright (c) 2014 Baptiste Daroussin .\" All rights reserved. .\" @@ -24,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 20, 2017 +.Dd March 28, 2018 .Dt TIMEOUT 1 .Os .Sh NAME @@ -36,40 +38,47 @@ .Op Fl -preserve-status .Op Fl -kill-after Ar time | Fl k Ar time .Op Fl -foreground -.Ao Ar duration Ac -.Ao Ar command Ac -.Ao Ar args ... Ac +.Ar duration +.Ar command +.Op Ar args ... .Sh DESCRIPTION .Nm starts the .Ar command with its -.Ar args. -If +.Ar args . +If the .Ar command is still running after .Ar duration , it is killed. By default, -.Ar SIGTERM. +.Dv SIGTERM is sent. -.Bl -tag -width "-k time, --kill-after time" +The special +.Ar duration , +zero, signifies no limit. +Therefore a signal is never sent if +.Ar duration +is 0. +.Pp +The options are as follows: +.Bl -tag -width indent .It Fl -preserve-status -Always exits with the same status as -.Ar command -even if it times out. +Exit with the same status as +.Ar command , +even if it times out and is killed. .It Fl -foreground -Do not propagate timeout to the -.Ar command -children. +Do not propagate timeout to the children of +.Ar command . .It Fl s Ar sig , Fl -signal Ar sig Specify the signal to send on timeout. By default, -.Ar SIGTERM . +.Dv SIGTERM is sent. .It Fl k Ar time , Fl -kill-after Ar time Send a -.Ar SIGKILL +.Dv SIGKILL signal if .Ar command is still running after @@ -80,18 +89,19 @@ after the first signal was sent. .Ar duration and .Ar time -can be integer or decimal numbers. -Values without unit symbols are interpreted as seconds. +are non-negative integer or real (decimal) numbers, with an optional +unit-specifying suffix. +Values without an explicit unit are interpreted as seconds. .Pp Supported unit symbols are: .Bl -tag -width indent -compact -.It s +.It Cm s seconds -.It m +.It Cm m minutes -.It h +.It Cm h hours -.It d +.It Cm d days .El .Sh EXIT STATUS @@ -115,17 +125,17 @@ plus 128. .Pp If .Ar command -is an invalid command, the exit status returned is 126. +refers to a non-existing program, the exit status returned is 127. .Pp If .Ar command -is a non existing command, the exit status returned is 127. +is an otherwise invalid program, the exit status returned is 126. .Pp If an invalid parameter is passed to .Fl s or .Fl k , -the exit status return is 125. +the exit status returned is 125. .Sh SEE ALSO .Xr kill 1 , .Xr signal 3 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331723 - in head: share/man/man9 sys/kern sys/sys sys/vm usr.bin/cpuset
Author: jeff Date: Thu Mar 29 02:54:50 2018 New Revision: 331723 URL: https://svnweb.freebsd.org/changeset/base/331723 Log: Implement several enhancements to NUMA policies. Add a new "interleave" allocation policy which stripes pages across domains with a stride or width keeping contiguity within a multi-page region. Move the kernel to the dedicated numbered cpuset #2 making it possible to assign kernel threads and memory policy separately from user. This also eliminates the need for the complicated interrupt binding code. Add a sysctl API for viewing and manipulating domainsets. Refactor some of the cpuset_t manipulation code using the generic bitset type so that it can be used for both. This probably belongs in a dedicated subr file. Attempt to improve the include situation. Reviewed by: kib Discussed with: jhb (cpuset parts) Tested by:pho (before review feedback) Sponsored by: Netflix, Dell/EMC Isilon Differential Revision:https://reviews.freebsd.org/D14839 Added: head/share/man/man9/domainset.9 (contents, props changed) Modified: head/share/man/man9/Makefile head/sys/kern/kern_cpuset.c head/sys/kern/kern_kthread.c head/sys/sys/_bitset.h head/sys/sys/cpuset.h head/sys/sys/domainset.h head/sys/sys/proc.h head/sys/vm/vm_domainset.c head/sys/vm/vm_domainset.h head/sys/vm/vm_page.c head/sys/vm/vnode_pager.c head/usr.bin/cpuset/cpuset.1 head/usr.bin/cpuset/cpuset.c Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileThu Mar 29 02:50:57 2018 (r331722) +++ head/share/man/man9/MakefileThu Mar 29 02:54:50 2018 (r331723) @@ -118,6 +118,7 @@ MAN=accept_filter.9 \ disk.9 \ dnv.9 \ domain.9 \ + domainset.9 \ dpcpu.9 \ drbr.9 \ driver.9 \ Added: head/share/man/man9/domainset.9 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/domainset.9 Thu Mar 29 02:54:50 2018 (r331723) @@ -0,0 +1,128 @@ +.\" Copyright (c) 2018 Jeffrey Roberson +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 24, 2018 +.Dt DOMAINSET 9 +.Os +.Sh NAME +.Nm domainset(9) +\(em +.Nm domainset_create , +.Nm sysctl_handle_domainset . +.Nd domainset functions and operation +.Sh SYNOPSIS +.In sys/_domainset.h +.In sys/domainset.h +.\" +.Bd -literal -offset indent +struct domainset { +domainset_t ds_mask; +uint16_tds_policy; +domainid_t ds_prefer; + ... +}; +.Ed +.Pp +.Ft struct domainset * +.Fn domainset_create "const struct domainset *key" +.Ft int +.Fn sysctl_handle_domainset "SYSCTL_HANDLER_ARGS" +.Sh DESCRIPTION +The +.Nm +API provides memory domain allocation policy for NUMA machines. +Each +.Vt domainset +contains a bitmask of allowed domains, an integer policy, and an optional +preferred domain. +Together, these specify a search order for memory allocations as well as +the ability to restrict threads and objects to a subset of available +memory domains for system partitioning and resource management. +.Pp +Every thread in the system and optionally every +.Vt vm_object_t , +which is used to represent files and other memory sources, has +a reference to a +.Vt struct domainset . +The domainset associated with the object is consulted first and the system +falls back to the thread policy if none exists. +.Pp +The allocation policy has the following possible values: +.Bl -
svn commit: r331724 - in head/sys: conf crypto/chacha20 modules/crypto opencrypto
Author: cem Date: Thu Mar 29 04:02:50 2018 New Revision: 331724 URL: https://svnweb.freebsd.org/changeset/base/331724 Log: opencrypto: Integrate Chacha20 algorithm into OCF Mostly this is a thin shim around existing code to integrate with enc_xform and cryptosoft (+ cryptodev). Expand the cryptodev buffer used to match that of Chacha20's native block size as a performance enhancement for chacha20_xform_crypt_multi. Added: head/sys/crypto/chacha20/chacha-sw.c (contents, props changed) Modified: head/sys/conf/files head/sys/modules/crypto/Makefile head/sys/opencrypto/cryptodev.c head/sys/opencrypto/cryptodev.h head/sys/opencrypto/cryptosoft.c head/sys/opencrypto/xform_enc.h Modified: head/sys/conf/files == --- head/sys/conf/files Thu Mar 29 02:54:50 2018(r331723) +++ head/sys/conf/files Thu Mar 29 04:02:50 2018(r331724) @@ -662,6 +662,8 @@ crypto/blowfish/bf_ecb.coptional ipsec | ipsec_suppor crypto/blowfish/bf_skey.c optional crypto | ipsec | ipsec_support crypto/camellia/camellia.c optional crypto | ipsec | ipsec_support crypto/camellia/camellia-api.c optional crypto | ipsec | ipsec_support +crypto/chacha20/chacha.c optional crypto | ipsec | ipsec_support +crypto/chacha20/chacha-sw.coptional crypto | ipsec | ipsec_support crypto/des/des_ecb.c optional crypto | ipsec | ipsec_support | netsmb crypto/des/des_setkey.coptional crypto | ipsec | ipsec_support | netsmb crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi Added: head/sys/crypto/chacha20/chacha-sw.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/crypto/chacha20/chacha-sw.cThu Mar 29 04:02:50 2018 (r331724) @@ -0,0 +1,78 @@ +/* This file is in the public domain. */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +static int +chacha20_xform_setkey(u_int8_t **sched, u_int8_t *key, int len) +{ + struct chacha_ctx *ctx; + + if (len != CHACHA_MINKEYLEN && len != 32) + return (EINVAL); + + ctx = malloc(sizeof(*ctx), M_CRYPTO_DATA, M_NOWAIT | M_ZERO); + *sched = (void *)ctx; + if (ctx == NULL) + return (ENOMEM); + + chacha_keysetup(ctx, key, len * 8); + return (0); +} + +static void +chacha20_xform_reinit(caddr_t key, u_int8_t *iv) +{ + struct chacha_ctx *ctx; + + ctx = (void *)key; + chacha_ivsetup(ctx, iv + 8, iv); +} + +static void +chacha20_xform_zerokey(u_int8_t **sched) +{ + struct chacha_ctx *ctx; + + ctx = (void *)*sched; + explicit_bzero(ctx, sizeof(*ctx)); + free(ctx, M_CRYPTO_DATA); + *sched = NULL; +} + +static void +chacha20_xform_crypt(caddr_t cctx, u_int8_t *bytes) +{ + struct chacha_ctx *ctx; + + ctx = (void *)cctx; + chacha_encrypt_bytes(ctx, bytes, bytes, 1); +} + +static void +chacha20_xform_crypt_multi(void *vctx, uint8_t *bytes, size_t len) +{ + struct chacha_ctx *ctx; + + ctx = vctx; + chacha_encrypt_bytes(ctx, bytes, bytes, len); +} + +struct enc_xform enc_xform_chacha20 = { + .type = CRYPTO_CHACHA20, + .name = "chacha20", + .blocksize = 1, + .ivsize = CHACHA_NONCELEN + CHACHA_CTRLEN, + .minkey = CHACHA_MINKEYLEN, + .maxkey = 32, + .encrypt = chacha20_xform_crypt, + .decrypt = chacha20_xform_crypt, + .setkey = chacha20_xform_setkey, + .zerokey = chacha20_xform_zerokey, + .reinit = chacha20_xform_reinit, + .encrypt_multi = chacha20_xform_crypt_multi, + .decrypt_multi = chacha20_xform_crypt_multi, +}; Modified: head/sys/modules/crypto/Makefile == --- head/sys/modules/crypto/MakefileThu Mar 29 02:54:50 2018 (r331723) +++ head/sys/modules/crypto/MakefileThu Mar 29 04:02:50 2018 (r331724) @@ -10,6 +10,7 @@ .PATH: ${SRCTOP}/sys/crypto/siphash .PATH: ${SRCTOP}/sys/crypto/skein .PATH: ${SRCTOP}/sys/crypto/blake2 +.PATH: ${SRCTOP}/sys/crypto/chacha20 .PATH: ${SRCTOP}/sys/contrib/libb2 KMOD = crypto @@ -41,6 +42,8 @@ CFLAGS.blake2s-ref.c += -I${SRCTOP}/sys/crypto/blake2 CFLAGS.blake2-sw.c += -I${SRCTOP}/sys/crypto/blake2 CWARNFLAGS.blake2b-ref.c += ${NO_WCAST_QUAL} CWARNFLAGS.blake2s-ref.c += ${NO_WCAST_QUAL} +SRCS += chacha.c +SRCS += chacha-sw.c SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h SRCS += opt_ddb.h Modified: head/sys/opencrypto/cryptodev.c == --- head/sys/opencrypto/cryptodev.c Thu Mar 29 02:54:50 2018 (r331723) +++ head/sys/opencrypto/cryptodev.c Thu Mar 29 04:02:50 2018 (r331724) @@ -443,6 +443,9 @@ cryptof_io
svn commit: r331725 - head/tools/tools/crypto
Author: cem Date: Thu Mar 29 04:07:53 2018 New Revision: 331725 URL: https://svnweb.freebsd.org/changeset/base/331725 Log: cryptotest: Add chacha20 cipher Modified: head/tools/tools/crypto/cryptotest.c Modified: head/tools/tools/crypto/cryptotest.c == --- head/tools/tools/crypto/cryptotest.cThu Mar 29 04:02:50 2018 (r331724) +++ head/tools/tools/crypto/cryptotest.cThu Mar 29 04:07:53 2018 (r331725) @@ -56,6 +56,7 @@ * aes rijndael/aes 128-bit cbc * aes192 rijndael/aes 192-bit cbc * aes256 rijndael/aes 256-bit cbc + * chacha20 Chacha20 stream cipher * blake2b Blake2b * blake2s Blake2s * md5 md5 hmac @@ -134,6 +135,7 @@ struct alg { { "aes",0, 16, 16, 16, CRYPTO_AES_CBC}, { "aes192", 0, 16, 24, 24, CRYPTO_AES_CBC}, { "aes256", 0, 16, 32, 32, CRYPTO_AES_CBC}, + { "chacha20", 0, 1, 32, 32, CRYPTO_CHACHA20}, { "blake2b",1, 128,64, 64, CRYPTO_BLAKE2B }, { "blake2s",1, 64, 32, 32, CRYPTO_BLAKE2S }, { "md5",1, 8, 16, 16, CRYPTO_MD5_HMAC }, @@ -150,7 +152,7 @@ usage(const char* cmd) cmd); printf("where algorithm is one of:\n"); printf("null des 3des (default) blowfish cast skipjack rij\n"); - printf("aes aes192 aes256 md5 sha1 sha256 sha384 sha512\n"); + printf("aes aes192 aes256 chacha20 md5 sha1 sha256 sha384 sha512\n"); printf("blake2b blake2s\n"); printf(" or an encryption algorithm concatented with authentication\n"); printf(" algorithm with '+' in the middle, e.g., aes+sha1.\n"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r331726 - head/tools/tools/crypto
Author: cem Date: Thu Mar 29 04:14:37 2018 New Revision: 331726 URL: https://svnweb.freebsd.org/changeset/base/331726 Log: cryptocheck: Add Chacha20 cipher to tool Modified: head/tools/tools/crypto/cryptocheck.c Modified: head/tools/tools/crypto/cryptocheck.c == --- head/tools/tools/crypto/cryptocheck.c Thu Mar 29 04:07:53 2018 (r331725) +++ head/tools/tools/crypto/cryptocheck.c Thu Mar 29 04:14:37 2018 (r331726) @@ -96,6 +96,7 @@ * aes-ctr256 256-bit aes ctr * aes-xts 128-bit aes xts * aes-xts256 256-bit aes xts + * chacha20 * * Authenticated Encryption: * + @@ -162,6 +163,8 @@ struct alg { .evp_cipher = EVP_aes_128_xts }, { .name = "aes-xts256", .cipher = CRYPTO_AES_XTS, .type = T_BLKCIPHER, .evp_cipher = EVP_aes_256_xts }, + { .name = "chacha20", .cipher = CRYPTO_CHACHA20, .type = T_BLKCIPHER, + .evp_cipher = EVP_chacha20 }, { .name = "aes-gcm", .cipher = CRYPTO_AES_NIST_GCM_16, .mac = CRYPTO_AES_128_NIST_GMAC, .type = T_GCM, .evp_cipher = EVP_aes_128_gcm }, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"