svn commit: r333516 - head/cddl/usr.sbin/dwatch
Author: dteske Date: Sat May 12 05:49:31 2018 New Revision: 333516 URL: https://svnweb.freebsd.org/changeset/base/333516 Log: dwatch(1): Export ARGV to profiles loaded via load_profile() A module that wishes to post-process the output needs to know which arguments were passed in order to re-execute a child in a pipe-chain. Further, the expansion of ARGV needs to be such that items are escaped properly. Sponsored by: Smule, Inc. Modified: head/cddl/usr.sbin/dwatch/dwatch Modified: head/cddl/usr.sbin/dwatch/dwatch == --- head/cddl/usr.sbin/dwatch/dwatchSat May 12 05:43:47 2018 (r333515) +++ head/cddl/usr.sbin/dwatch/dwatchSat May 12 05:49:31 2018 (r333516) @@ -537,6 +537,11 @@ list_profiles() exit $SUCCESS } +shell_escape() +{ + echo "$*" | awk 'gsub(/'\''/, "&&&")||1' +} + load_profile() { local profile="$1" @@ -546,6 +551,44 @@ load_profile() local oldIFS="$IFS" local dir found= + local ARGV= + + [ $COUNT -gt 0 ] && ARGV="$ARGV -N $COUNT" + [ "$DEBUG" ] && ARGV="$ARGV -d" + [ "$DESTRUCTIVE_ACTIONS" ] && ARGV="$ARGV -w" + [ "$EXIT_AFTER_COMPILE" ] &&ARGV="$ARGV -e" + [ "$GROUP" ] && ARGV="$ARGV -g $GROUP" + [ "$JID" ] && ARGV="$ARGV -j $JID" + [ $MAX_ARGS -ne $_MAX_ARGS ] && ARGV="$ARGV -B $MAX_ARGS" + [ $MAX_DEPTH -ne $_MAX_DEPTH ] && ARGV="$ARGV -K $MAX_DEPTH" + [ "$ONELINE" ] && ARGV="$ARGV -1" + [ "$PID" ] && ARGV="$ARGV -p $PID" + [ "$PSTREE" ] &&ARGV="$ARGV -R" + [ "$QUIET" ] && ARGV="$ARGV -q" + [ "$TIMEOUT" ] && ARGV="$ARGV -T $TIMEOUT" + [ "$TRACE" ] && ARGV="$ARGV -x" + [ "$USER" ] && ARGV="$ARGV -u $USER" + [ "$VERBOSE" ] && ARGV="$ARGV -v" + + [ "$FILTER" ] && + ARGV="$ARGV -r '$( shell_escape "$FILTER" )'" + [ "$EXECREGEX" ] && + ARGV="$ARGV -z '$( shell_escape "$EXECREGEX" )'" + [ "$CUSTOM_DETAILS" ] && + ARGV="$ARGV -E '$( shell_escape "$EVENT_DETAILS" )'" + [ "$EVENT_TEST" ] && + ARGV="$ARGV -t '$( shell_escape "$EVENT_TEST" )'" + [ "$OUTPUT" ] && + ARGV="$ARGV -o '$( shell_escape "$OUTPUT" )'" + [ "$OUTPUT_CMD" ] && + ARGV="$ARGV -O '$( shell_escape "$OUTPUT_CMD" )'" + + case "$PROBE_TYPE" in + provider) ARGV="$ARGV -P" ;; + module) ARGV="$ARGV -m" ;; + function) ARGV="$ARGV -f" ;; + name) ARGV="$ARGV -n" ;; + esac IFS=: for dir in $DWATCH_PROFILES_PATH; do ___ 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: r333515 - head/cddl/usr.sbin/dwatch
Author: dteske Date: Sat May 12 05:43:47 2018 New Revision: 333515 URL: https://svnweb.freebsd.org/changeset/base/333515 Log: dwatch(1): Simplify info message test The info() function already tests $QUIET Sponsored by: Smule, Inc. Modified: head/cddl/usr.sbin/dwatch/dwatch Modified: head/cddl/usr.sbin/dwatch/dwatch == --- head/cddl/usr.sbin/dwatch/dwatchSat May 12 05:41:28 2018 (r333514) +++ head/cddl/usr.sbin/dwatch/dwatchSat May 12 05:43:47 2018 (r333515) @@ -859,7 +859,7 @@ fi # # Show the user what's being watched # -[ "$DEBUG$QUIET$EXIT_AFTER_COMPILE" ] || info "Watching '$PROBE' ..." +[ "$DEBUG$EXIT_AFTER_COMPILE" ] || info "Watching '$PROBE' ..." # # Header for watched probe entry ___ 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: r333514 - head/cddl/usr.sbin/dwatch
Author: dteske Date: Sat May 12 05:41:28 2018 New Revision: 333514 URL: https://svnweb.freebsd.org/changeset/base/333514 Log: dwatch(1): Separate default values so `-[BK] num' don't affect usage If you were to pass an invalid option after `-B num' or `-K num' you would see that the usage statement would show the value you passed instead of the actual default. Moving the default values to separate variables that are unaffected by the options-parsing allows the usage statement to correctly show the hard-coded default values if no flags are used. Sponsored by: Smule, Inc. Modified: head/cddl/usr.sbin/dwatch/dwatch Modified: head/cddl/usr.sbin/dwatch/dwatch == --- head/cddl/usr.sbin/dwatch/dwatchSat May 12 05:36:47 2018 (r333513) +++ head/cddl/usr.sbin/dwatch/dwatchSat May 12 05:41:28 2018 (r333514) @@ -57,6 +57,12 @@ pgm="${0##*/}" # Program basename PROBE_ARG= # +# Command-line defaults +# +_MAX_ARGS=64 # -B num +_MAX_DEPTH=64 # -K num + +# # Command-line options # CONSOLE= # -y @@ -77,8 +83,8 @@ GROUP=# -g group JID= # -j jail LIST= # -l LIST_PROFILES= # -Q -MAX_ARGS=64# -B num -MAX_DEPTH=64 # -K num +MAX_ARGS=$_MAX_ARGS# -B num +MAX_DEPTH=$_MAX_DEPTH # -K num ONELINE= # -1 OUTPUT=# -o file OUTPUT_CMD=# -O cmd @@ -144,7 +150,7 @@ usage() printf "$optfmt" "-1" \ "Print one line per process/profile (Default; disables \`-R')." printf "$optfmt" "-B num" \ - "Maximum process arguments to display (Default $MAX_ARGS)." + "Maximum process arguments to display (Default $_MAX_ARGS)." printf "$optfmt" "-d" \ "Debug. Send dtrace(1) script to stdout instead of executing." printf "$optfmt" "-e" \ @@ -162,7 +168,7 @@ usage() printf "$optfmt" "-k name" \ "Only show processes matching name." printf "$optfmt" "-K num" \ - "Maximum directory depth to display (Default $MAX_DEPTH)." + "Maximum directory depth to display (Default $_MAX_DEPTH)." printf "$optfmt" "-l" \ "List available probes on standard output and exit." printf "$optfmt" "-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: r333513 - head/cddl/usr.sbin/dwatch
Author: dteske Date: Sat May 12 05:36:47 2018 New Revision: 333513 URL: https://svnweb.freebsd.org/changeset/base/333513 Log: dwatch(1): Bugfix, usage displayed with `-1Q' A return statement should have been an exit in list_profiles(). If the user passed `-Q' to list profiles and asked for one-line per profile (`-1'), list_profiles() would not exit as should. Sponsored by: Smule, Inc. Modified: head/cddl/usr.sbin/dwatch/dwatch Modified: head/cddl/usr.sbin/dwatch/dwatch == --- head/cddl/usr.sbin/dwatch/dwatchSat May 12 03:45:30 2018 (r333512) +++ head/cddl/usr.sbin/dwatch/dwatchSat May 12 05:36:47 2018 (r333513) @@ -47,7 +47,7 @@ DTRACE_PRAGMA=" GLOBALS -VERSION='$Version: 1.1 $' # -V +VERSION='$Version: 1.2 $' # -V pgm="${0##*/}" # Program basename @@ -490,8 +490,7 @@ list_profiles() function ans(s) { return cons ? "\033[" s "m" : "" } gsub(filter, ans("31;1") "&" ans("39;22")) ' # END-QUOTE - return $SUCCESS - # NOTREACHED + exit $SUCCESS fi [ "$quiet" ] || echo PROFILES: ___ 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: r333512 - head/sys/dev/hwpmc
Author: mmacy Date: Sat May 12 03:45:30 2018 New Revision: 333512 URL: https://svnweb.freebsd.org/changeset/base/333512 Log: hwpmc(9): clear remaining sample work for hardclock - fix last minute change in 333509 where by runcount references to a pmc would remaining causing us to pause loop forever Approved by: sbruno Modified: head/sys/dev/hwpmc/hwpmc_logging.c Modified: head/sys/dev/hwpmc/hwpmc_logging.c == --- head/sys/dev/hwpmc/hwpmc_logging.c Sat May 12 01:55:24 2018 (r333511) +++ head/sys/dev/hwpmc/hwpmc_logging.c Sat May 12 03:45:30 2018 (r333512) @@ -837,7 +837,8 @@ pmclog_schedule_one_cond(void *arg) spinlock_enter(); /* tell hardclock not to run again */ - DPCPU_SET(pmc_sampled, 0); + if (PMC_CPU_HAS_SAMPLES(PCPU_GET(cpuid))) + PMC_CALL_HOOK_UNLOCKED(curthread, PMC_FN_DO_SAMPLES, NULL); plb = po->po_curbuf[curcpu]; if (plb && plb->plb_ptr != plb->plb_base) pmclog_schedule_io(po); ___ 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: r333510 - head/sys/riscv/riscv
Author: imp Date: Sat May 12 01:43:32 2018 New Revision: 333510 URL: https://svnweb.freebsd.org/changeset/base/333510 Log: Remove extra copy of bcopy.c now that we're using the libkern version of this file. Deleted: head/sys/riscv/riscv/bcopy.c ___ 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: r333443 - in head/sys: conf libkern powerpc/powerpc
On Fri, May 11, 2018 at 5:59 PM, John Baldwinwrote: > On Thursday, May 10, 2018 02:31:38 AM Warner Losh wrote: > > Author: imp > > Date: Thu May 10 02:31:38 2018 > > New Revision: 333443 > > URL: https://svnweb.freebsd.org/changeset/base/333443 > > > > Log: > > Move MI-ish bcopy routine to libkern > > > > riscv and powerpc have nearly identical bcopy.c that's > > supposed to be mostly MI. Move it to the MI libkern. > > > > Differential Revision: https://reviews.freebsd.org/D15374 > > > > Added: > > head/sys/libkern/bcopy.c (contents, props changed) > > - copied, changed from r333436, head/sys/powerpc/powerpc/bcopy.c > > Deleted: > > head/sys/powerpc/powerpc/bcopy.c > > Modified: > > Hmm, is sys/riscv/riscv/bcopy.c still in the tree? > I forgot to remove it. It's gone now as of r333510 Warner ___ 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: r333509 - in head/sys: dev/hwpmc kern sys
Author: mmacy Date: Sat May 12 01:26:34 2018 New Revision: 333509 URL: https://svnweb.freebsd.org/changeset/base/333509 Log: hwpmc(9): Make pmclog buffer pcpu and update constants On non-trivial SMP systems the contention on the pmc_owner mutex leads to a substantial number of samples captured being from the pmc process itself. This change a) makes buffers larger to avoid contention on the global list b) makes the working sample buffer per cpu. Run pmcstat in the background (default event rate of 64k): pmcstat -S UNHALTED_CORE_CYCLES -O /dev/null sleep 600 & Before: make -j96 buildkernel -s >&/dev/null 3336.68s user 24684.10s system 7442% cpu 6:16.50 total After: make -j96 buildkernel -s >&/dev/null 2697.82s user 1347.35s system 6058% cpu 1:06.77 total For more realistic overhead measurement set the sample rate for ~2khz on a 2.1Ghz processor: pmcstat -n 105 -S UNHALTED_CORE_CYCLES -O /dev/null sleep 6000 & Collecting 10 samples of `make -j96 buildkernel` from each: x before + after real time: N Min MaxMedian AvgStddev x 10 76.4127.6284.84588.577 15.100031 + 10 59.71 60.7960.13560.1790.29957192 Difference at 95.0% confidence -28.398 +/- 10.0344 -32.0602% +/- 7.69825% (Student's t, pooled s = 10.6794) system time: N Min MaxMedian AvgStddev x 10 2277.96 6948.53 2949.47 3341.492 1385.2677 + 101038.7 1081.06 1070.555 1064.017 15.85404 Difference at 95.0% confidence -2277.47 +/- 920.425 -68.1574% +/- 8.77623% (Student's t, pooled s = 979.596) x no pmc + pmc running real time: HEAD: N Min MaxMedian AvgStddev x 10 58.38 59.15 58.8658.8470.22504567 + 10 76.4127.6284.84588.577 15.100031 Difference at 95.0% confidence 29.73 +/- 10.0335 50.5208% +/- 17.0525% (Student's t, pooled s = 10.6785) patched: N Min MaxMedian AvgStddev x 10 58.38 59.15 58.8658.8470.22504567 + 10 59.71 60.7960.13560.1790.29957192 Difference at 95.0% confidence 1.332 +/- 0.248939 2.2635% +/- 0.426506% (Student's t, pooled s = 0.264942) system time: HEAD: N Min MaxMedian AvgStddev x 10 1010.15 1073.31 1025.465 1031.524 18.135705 + 10 2277.96 6948.53 2949.47 3341.492 1385.2677 Difference at 95.0% confidence 2309.97 +/- 920.443 223.937% +/- 89.3039% (Student's t, pooled s = 979.616) patched: N Min MaxMedian AvgStddev x 10 1010.15 1073.31 1025.465 1031.524 18.135705 + 101038.7 1081.06 1070.555 1064.017 15.85404 Difference at 95.0% confidence 32.493 +/- 16.0042 3.15% +/- 1.5794% (Student's t, pooled s = 17.0331) Reviewed by: jeff@ Approved by: sbruno@ Differential Revision:https://reviews.freebsd.org/D15155 Modified: head/sys/dev/hwpmc/hwpmc_amd.c head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_e500.c head/sys/dev/hwpmc/hwpmc_intel.c head/sys/dev/hwpmc/hwpmc_logging.c head/sys/dev/hwpmc/hwpmc_mod.c head/sys/dev/hwpmc/hwpmc_mpc7xxx.c head/sys/dev/hwpmc/hwpmc_piv.c head/sys/dev/hwpmc/hwpmc_ppc970.c head/sys/dev/hwpmc/hwpmc_ppro.c head/sys/dev/hwpmc/hwpmc_soft.c head/sys/kern/kern_pmc.c head/sys/sys/pmc.h head/sys/sys/pmckern.h Modified: head/sys/dev/hwpmc/hwpmc_amd.c == --- head/sys/dev/hwpmc/hwpmc_amd.c Fri May 11 22:16:23 2018 (r333508) +++ head/sys/dev/hwpmc/hwpmc_amd.c Sat May 12 01:26:34 2018 (r333509) @@ -694,8 +694,10 @@ amd_intr(int cpu, struct trapframe *tf) wrmsr(evsel, config); } - atomic_add_int(retval ? _stats.pm_intr_processed : - _stats.pm_intr_ignored, 1); + if (retval) + counter_u64_add(pmc_stats.pm_intr_processed, 1); + else + counter_u64_add(pmc_stats.pm_intr_ignored, 1); PMCDBG1(MDP,INT,2, "retval=%d", retval); return (retval); Modified: head/sys/dev/hwpmc/hwpmc_core.c == --- head/sys/dev/hwpmc/hwpmc_core.c Fri May 11 22:16:23 2018 (r333508) +++
Re: svn commit: r333449 - in head: etc/rc.d lib/libc/db/mpool lib/libc/gen lib/libc/string lib/libc/sys lib/libz share/man/man3 share/man/man5 sys/libkern usr.bin/gzip usr.bin/ident usr.sbin/fstyp usr
On Thursday, May 10, 2018 06:41:09 AM Xin LI wrote: > Author: delphij > Date: Thu May 10 06:41:08 2018 > New Revision: 333449 > URL: https://svnweb.freebsd.org/changeset/base/333449 > > Log: > Remove "All rights reserved" from my files. > > See r91 for the rationale. Some of these have multiple authors. Did you have the consent of the other authors in those cases? > Modified: head/etc/rc.d/hostid > == > --- head/etc/rc.d/hostid Thu May 10 06:33:54 2018(r333448) > +++ head/etc/rc.d/hostid Thu May 10 06:41:08 2018(r333449) > @@ -2,7 +2,6 @@ > # > # Copyright (c) 2007 Pawel Jakub Dawidek> # Copyright (c) 2015 Xin LI > -# All rights reserved. > # > # Redistribution and use in source and binary forms, with or without > # modification, are permitted provided that the following conditions > > Modified: head/share/man/man5/tmpfs.5 > == > --- head/share/man/man5/tmpfs.5 Thu May 10 06:33:54 2018 > (r333448) > +++ head/share/man/man5/tmpfs.5 Thu May 10 06:41:08 2018 > (r333449) > @@ -1,7 +1,6 @@ > .\"- > .\" Copyright (c) 2007 Xin LI > .\" Copyright (c) 2017 The FreeBSD Foundation, Inc. > -.\" All rights reserved. > .\" > .\" Part of this documentation was written by > .\" Konstantin Belousov under sponsorship > > Modified: head/usr.bin/ident/ident.c > == > --- head/usr.bin/ident/ident.cThu May 10 06:33:54 2018 > (r333448) > +++ head/usr.bin/ident/ident.cThu May 10 06:41:08 2018 > (r333449) > @@ -1,7 +1,6 @@ > /*- > * Copyright (c) 2015 Baptiste Daroussin > * Copyright (c) 2015 Xin LI > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > > Modified: head/usr.sbin/fstyp/zfs.c > == > --- head/usr.sbin/fstyp/zfs.c Thu May 10 06:33:54 2018(r333448) > +++ head/usr.sbin/fstyp/zfs.c Thu May 10 06:41:08 2018(r333449) > @@ -1,7 +1,6 @@ > /*- > * Copyright (c) 2015 Allan Jude > * Copyright (c) 2015 Xin LI > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > -- 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"
Re: svn commit: r333443 - in head/sys: conf libkern powerpc/powerpc
On Thursday, May 10, 2018 02:31:38 AM Warner Losh wrote: > Author: imp > Date: Thu May 10 02:31:38 2018 > New Revision: 333443 > URL: https://svnweb.freebsd.org/changeset/base/333443 > > Log: > Move MI-ish bcopy routine to libkern > > riscv and powerpc have nearly identical bcopy.c that's > supposed to be mostly MI. Move it to the MI libkern. > > Differential Revision: https://reviews.freebsd.org/D15374 > > Added: > head/sys/libkern/bcopy.c (contents, props changed) > - copied, changed from r333436, head/sys/powerpc/powerpc/bcopy.c > Deleted: > head/sys/powerpc/powerpc/bcopy.c > Modified: Hmm, is sys/riscv/riscv/bcopy.c still in the tree? -- 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"
Re: svn commit: r333482 - head/usr.bin/expand
On Friday, May 11, 2018 06:55:03 AM Eitan Adler wrote: > Author: eadler > Date: Fri May 11 06:55:02 2018 > New Revision: 333482 > URL: https://svnweb.freebsd.org/changeset/base/333482 > > Log: > [expand] add __dead2 annotation to usage Can't any modern compiler infer this already from the call to exit() at the end? -- 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: r333508 - in head/sys/fs: nfs nfsserver
Author: rmacklem Date: Fri May 11 22:16:23 2018 New Revision: 333508 URL: https://svnweb.freebsd.org/changeset/base/333508 Log: Add support for the TestStateID operation to the NFSv4.1 server. The Linux client now uses the TestStateID operation, so this patch adds support for it to the NFSv4.1 server. The FreeBSD client never uses this operation, so it should not be affected. MFC after:2 months Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsserver/nfs_nfsdserv.c head/sys/fs/nfsserver/nfs_nfsdsocket.c head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfs/nfs_var.h == --- head/sys/fs/nfs/nfs_var.h Fri May 11 21:56:01 2018(r333507) +++ head/sys/fs/nfs/nfs_var.h Fri May 11 22:16:23 2018(r333508) @@ -98,6 +98,7 @@ int nfsrv_getclient(nfsquad_t, int, struct nfsclient * int nfsrv_destroyclient(nfsquad_t, NFSPROC_T *); int nfsrv_destroysession(struct nfsrv_descript *, uint8_t *); int nfsrv_freestateid(struct nfsrv_descript *, nfsv4stateid_t *, NFSPROC_T *); +int nfsrv_teststateid(struct nfsrv_descript *, nfsv4stateid_t *, NFSPROC_T *); int nfsrv_adminrevoke(struct nfsd_clid *, NFSPROC_T *); void nfsrv_dumpclients(struct nfsd_dumpclients *, int); void nfsrv_dumplocks(vnode_t, struct nfsd_dumplocks *, int, NFSPROC_T *); @@ -235,6 +236,8 @@ int nfsrvd_destroyclientid(struct nfsrv_descript *, in int nfsrvd_destroysession(struct nfsrv_descript *, int, vnode_t, NFSPROC_T *, struct nfsexstuff *); int nfsrvd_freestateid(struct nfsrv_descript *, int, +vnode_t, NFSPROC_T *, struct nfsexstuff *); +int nfsrvd_teststateid(struct nfsrv_descript *, int, vnode_t, NFSPROC_T *, struct nfsexstuff *); int nfsrvd_notsupp(struct nfsrv_descript *, int, vnode_t, NFSPROC_T *, struct nfsexstuff *); Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c == --- head/sys/fs/nfsserver/nfs_nfsdserv.cFri May 11 21:56:01 2018 (r333507) +++ head/sys/fs/nfsserver/nfs_nfsdserv.cFri May 11 22:16:23 2018 (r333508) @@ -4101,6 +4101,50 @@ nfsmout: } /* + * nfsv4 test stateid service + */ +APPLESTATIC int +nfsrvd_teststateid(struct nfsrv_descript *nd, __unused int isdgram, +__unused vnode_t vp, NFSPROC_T *p, __unused struct nfsexstuff *exp) +{ + uint32_t *tl; + nfsv4stateid_t *stateidp = NULL, *tstateidp; + int cnt, error = 0, i, ret; + + if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) { + nd->nd_repstat = NFSERR_WRONGSEC; + goto nfsmout; + } + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); + cnt = fxdr_unsigned(int, *tl); + if (cnt <= 0 || cnt > 1024) { + nd->nd_repstat = NFSERR_BADXDR; + goto nfsmout; + } + stateidp = mallocarray(cnt, sizeof(nfsv4stateid_t), M_TEMP, M_WAITOK); + tstateidp = stateidp; + for (i = 0; i < cnt; i++) { + NFSM_DISSECT(tl, uint32_t *, NFSX_STATEID); + tstateidp->seqid = fxdr_unsigned(uint32_t, *tl++); + NFSBCOPY(tl, tstateidp->other, NFSX_STATEIDOTHER); + tstateidp++; + } + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(cnt); + tstateidp = stateidp; + for (i = 0; i < cnt; i++) { + ret = nfsrv_teststateid(nd, tstateidp, p); + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(ret); + tstateidp++; + } +nfsmout: + free(stateidp, M_TEMP); + NFSEXITCODE2(error, nd); + return (error); +} + +/* * nfsv4 service not supported */ APPLESTATIC int Modified: head/sys/fs/nfsserver/nfs_nfsdsocket.c == --- head/sys/fs/nfsserver/nfs_nfsdsocket.c Fri May 11 21:56:01 2018 (r333507) +++ head/sys/fs/nfsserver/nfs_nfsdsocket.c Fri May 11 22:16:23 2018 (r333508) @@ -192,7 +192,7 @@ int (*nfsrv4_ops0[NFSV41_NOPS])(struct nfsrv_descript nfsrvd_notsupp, nfsrvd_sequence, nfsrvd_notsupp, - nfsrvd_notsupp, + nfsrvd_teststateid, nfsrvd_notsupp, nfsrvd_destroyclientid, nfsrvd_reclaimcomplete, Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c == --- head/sys/fs/nfsserver/nfs_nfsdstate.c Fri May 11 21:56:01 2018 (r333507) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Fri May 11 22:16:23 2018 (r333508) @@ -6050,6 +6050,32 @@ nfsrv_freestateid(struct nfsrv_descript *nd, nfsv4stat } /* + * Test a stateid. + */ +int +nfsrv_teststateid(struct nfsrv_descript *nd, nfsv4stateid_t *stateidp, +NFSPROC_T *p) +{ + struct nfsclient *clp; + struct nfsstate *stp; + int error; + +
svn commit: r333507 - head/bin/sh/tests/parser
Author: jilles Date: Fri May 11 21:56:01 2018 New Revision: 333507 URL: https://svnweb.freebsd.org/changeset/base/333507 Log: sh: Test that backslash-newline within single-quotes is not special This works correctly, but the test may be helpful when modifying the parser. Added: head/bin/sh/tests/parser/line-cont12.0 (contents, props changed) Modified: head/bin/sh/tests/parser/Makefile Modified: head/bin/sh/tests/parser/Makefile == --- head/bin/sh/tests/parser/Makefile Fri May 11 21:46:53 2018 (r333506) +++ head/bin/sh/tests/parser/Makefile Fri May 11 21:56:01 2018 (r333507) @@ -74,6 +74,7 @@ ${PACKAGE}FILES+= line-cont8.0 ${PACKAGE}FILES+= line-cont9.0 ${PACKAGE}FILES+= line-cont10.0 ${PACKAGE}FILES+= line-cont11.0 +${PACKAGE}FILES+= line-cont12.0 ${PACKAGE}FILES+= no-space1.0 ${PACKAGE}FILES+= no-space2.0 ${PACKAGE}FILES+= nul1.0 Added: head/bin/sh/tests/parser/line-cont12.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/parser/line-cont12.0 Fri May 11 21:56:01 2018 (r333507) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +[ '\ +' = "\\ +" ] ___ 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: r333505 - in head/sys: netinet netinet6
Author: shurd Date: Fri May 11 21:42:27 2018 New Revision: 333505 URL: https://svnweb.freebsd.org/changeset/base/333505 Log: Fix LORs in in6?_leave_group() r333175 updated the join_group functions, but not the leave_group ones. Reviewed by: sbruno Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D15393 Modified: head/sys/netinet/in_mcast.c head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet/in_mcast.c == --- head/sys/netinet/in_mcast.c Fri May 11 20:47:45 2018(r333504) +++ head/sys/netinet/in_mcast.c Fri May 11 21:42:27 2018(r333505) @@ -2501,6 +2501,8 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop /* * Begin state merge transaction at IGMP layer. */ + in_pcbref(inp); + INP_WUNLOCK(inp); IN_MULTI_LOCK(); if (is_final) { @@ -2531,6 +2533,9 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop out_in_multi_locked: IN_MULTI_UNLOCK(); + INP_WLOCK(inp); + if (in_pcbrele_wlocked(inp)) + return (ENXIO); if (error) imf_rollback(imf); Modified: head/sys/netinet6/in6_mcast.c == --- head/sys/netinet6/in6_mcast.c Fri May 11 20:47:45 2018 (r333504) +++ head/sys/netinet6/in6_mcast.c Fri May 11 21:42:27 2018 (r333505) @@ -2381,6 +2381,8 @@ in6p_leave_group(struct inpcb *inp, struct sockopt *so /* * Begin state merge transaction at MLD layer. */ + in_pcbref(inp); + INP_WUNLOCK(inp); IN6_MULTI_LOCK(); if (is_final) { @@ -2407,6 +2409,9 @@ in6p_leave_group(struct inpcb *inp, struct sockopt *so } IN6_MULTI_UNLOCK(); + INP_WLOCK(inp); + if (in_pcbrele_wlocked(inp)) + return (ENXIO); if (error) im6f_rollback(imf); ___ 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: r333504 - head/sys/i386/include
Author: kib Date: Fri May 11 20:47:45 2018 New Revision: 333504 URL: https://svnweb.freebsd.org/changeset/base/333504 Log: Remove dead declaration. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/sys/i386/include/pcb_ext.h Modified: head/sys/i386/include/pcb_ext.h == --- head/sys/i386/include/pcb_ext.h Fri May 11 20:40:26 2018 (r333503) +++ head/sys/i386/include/pcb_ext.h Fri May 11 20:47:45 2018 (r333504) @@ -46,10 +46,7 @@ struct pcb_ext { }; #ifdef _KERNEL -extern int private_tss; - int i386_extend_pcb(struct thread *); - #endif #endif /* _I386_PCB_EXT_H_ */ ___ 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: r333466 - in head: contrib/bmake sys/conf sys/kern sys/modules/epoch_test sys/sys sys/tests/epoch
It fixes something that is completely broken in bmake that everyone in the know patches on their local systems. It was included by accident. I immediately backed it out in the subsequent commit. On Fri, May 11, 2018 at 1:13 PM, Bryan Drewerywrote: > On 5/10/2018 10:55 AM, Matt Macy wrote: >> Author: mmacy >> Date: Thu May 10 17:55:24 2018 >> New Revision: 333466 >> URL: https://svnweb.freebsd.org/changeset/base/333466 >> >> Log: >> Add simple preempt safe epoch API >> >> Read locking is over used in the kernel to guarantee liveness. This API >> makes >> it easy to provide livenes guarantees without atomics. >> >> Includes epoch_test kernel module to stress test the API. >> >> Documentation will follow initial use case. >> >> Test case and improvements to preemption handling in response to discussion >> with mjg@ >> >> Reviewed by:imp@, shurd@ >> Approved by:sbruno@ >> >> Added: >> head/sys/kern/subr_epoch.c (contents, props changed) >> head/sys/modules/epoch_test/ >> head/sys/modules/epoch_test/Makefile (contents, props changed) >> head/sys/sys/epoch.h (contents, props changed) >> head/sys/tests/epoch/ >> head/sys/tests/epoch/epoch_test.c (contents, props changed) >> Modified: >> head/contrib/bmake/job.c >> head/sys/conf/files >> head/sys/conf/kern.pre.mk >> head/sys/kern/kern_malloc.c >> head/sys/kern/kern_synch.c >> head/sys/kern/subr_trap.c >> head/sys/kern/subr_turnstile.c >> head/sys/sys/proc.h >> head/sys/sys/turnstile.h >> >> Modified: head/contrib/bmake/job.c >> == >> --- head/contrib/bmake/job.c Thu May 10 17:22:04 2018(r333465) >> +++ head/contrib/bmake/job.c Thu May 10 17:55:24 2018(r333466) >> @@ -2121,13 +2121,15 @@ Job_CatchOutput(void) >> { >> int nready; >> Job *job; >> -int i; >> +int i, pollToken; >> >> (void)fflush(stdout); >> >> + pollToken = 0; >> + >> /* The first fd in the list is the job token pipe */ >> do { >> - nready = poll(fds + 1 - wantToken, nfds - 1 + wantToken, POLL_MSEC); >> + nready = poll(fds + 1 - pollToken, nfds - 1 + pollToken, POLL_MSEC); >> } while (nready < 0 && errno == EINTR); >> >> if (nready < 0) > > What's up with this? > > -- > Regards, > Bryan Drewery > ___ 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: r333466 - in head: contrib/bmake sys/conf sys/kern sys/modules/epoch_test sys/sys sys/tests/epoch
On Fri, May 11, 2018 at 1:13 PM, Bryan Drewerywrote: > On 5/10/2018 10:55 AM, Matt Macy wrote: >> Author: mmacy >> Date: Thu May 10 17:55:24 2018 >> New Revision: 333466 >> URL: https://svnweb.freebsd.org/changeset/base/333466 >> >> Log: >> Add simple preempt safe epoch API >> >> Read locking is over used in the kernel to guarantee liveness. This API >> makes >> it easy to provide livenes guarantees without atomics. >> >> Includes epoch_test kernel module to stress test the API. >> >> Documentation will follow initial use case. >> >> Test case and improvements to preemption handling in response to discussion >> with mjg@ >> >> Reviewed by:imp@, shurd@ >> Approved by:sbruno@ >> >> Added: >> head/sys/kern/subr_epoch.c (contents, props changed) >> head/sys/modules/epoch_test/ >> head/sys/modules/epoch_test/Makefile (contents, props changed) >> head/sys/sys/epoch.h (contents, props changed) >> head/sys/tests/epoch/ >> head/sys/tests/epoch/epoch_test.c (contents, props changed) >> Modified: >> head/contrib/bmake/job.c >> head/sys/conf/files >> head/sys/conf/kern.pre.mk >> head/sys/kern/kern_malloc.c >> head/sys/kern/kern_synch.c >> head/sys/kern/subr_trap.c >> head/sys/kern/subr_turnstile.c >> head/sys/sys/proc.h >> head/sys/sys/turnstile.h >> >> Modified: head/contrib/bmake/job.c >> == >> --- head/contrib/bmake/job.c Thu May 10 17:22:04 2018(r333465) >> +++ head/contrib/bmake/job.c Thu May 10 17:55:24 2018(r333466) >> @@ -2121,13 +2121,15 @@ Job_CatchOutput(void) >> { >> int nready; >> Job *job; >> -int i; >> +int i, pollToken; >> >> (void)fflush(stdout); >> >> + pollToken = 0; >> + >> /* The first fd in the list is the job token pipe */ >> do { >> - nready = poll(fds + 1 - wantToken, nfds - 1 + wantToken, POLL_MSEC); >> + nready = poll(fds + 1 - pollToken, nfds - 1 + pollToken, POLL_MSEC); >> } while (nready < 0 && errno == EINTR); >> >> if (nready < 0) > > What's up with this? https://svnweb.freebsd.org/changeset/base/333467 > > -- > Regards, > Bryan Drewery > ___ 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: r333466 - in head: contrib/bmake sys/conf sys/kern sys/modules/epoch_test sys/sys sys/tests/epoch
On 5/10/2018 10:55 AM, Matt Macy wrote: > Author: mmacy > Date: Thu May 10 17:55:24 2018 > New Revision: 333466 > URL: https://svnweb.freebsd.org/changeset/base/333466 > > Log: > Add simple preempt safe epoch API > > Read locking is over used in the kernel to guarantee liveness. This API > makes > it easy to provide livenes guarantees without atomics. > > Includes epoch_test kernel module to stress test the API. > > Documentation will follow initial use case. > > Test case and improvements to preemption handling in response to discussion > with mjg@ > > Reviewed by:imp@, shurd@ > Approved by:sbruno@ > > Added: > head/sys/kern/subr_epoch.c (contents, props changed) > head/sys/modules/epoch_test/ > head/sys/modules/epoch_test/Makefile (contents, props changed) > head/sys/sys/epoch.h (contents, props changed) > head/sys/tests/epoch/ > head/sys/tests/epoch/epoch_test.c (contents, props changed) > Modified: > head/contrib/bmake/job.c > head/sys/conf/files > head/sys/conf/kern.pre.mk > head/sys/kern/kern_malloc.c > head/sys/kern/kern_synch.c > head/sys/kern/subr_trap.c > head/sys/kern/subr_turnstile.c > head/sys/sys/proc.h > head/sys/sys/turnstile.h > > Modified: head/contrib/bmake/job.c > == > --- head/contrib/bmake/job.c Thu May 10 17:22:04 2018(r333465) > +++ head/contrib/bmake/job.c Thu May 10 17:55:24 2018(r333466) > @@ -2121,13 +2121,15 @@ Job_CatchOutput(void) > { > int nready; > Job *job; > -int i; > +int i, pollToken; > > (void)fflush(stdout); > > + pollToken = 0; > + > /* The first fd in the list is the job token pipe */ > do { > - nready = poll(fds + 1 - wantToken, nfds - 1 + wantToken, POLL_MSEC); > + nready = poll(fds + 1 - pollToken, nfds - 1 + pollToken, POLL_MSEC); > } while (nready < 0 && errno == EINTR); > > if (nready < 0) What's up with this? -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r333502 - in head/sys: conf net
Author: mmacy Date: Fri May 11 20:08:28 2018 New Revision: 333502 URL: https://svnweb.freebsd.org/changeset/base/333502 Log: iflib(9): Add support for cloning pseudo interfaces Part 3 of many ... The VPC framework relies heavily on cloning pseudo interfaces (vmnics, vpc switch, vcpswitch port, hostif, vxlan if, etc). This pulls in that piece. Some ancillary changes get pulled in as a side effect. Reviewed by: shurd@ Approved by: sbruno@ Sponsored by: Joyent, Inc. Differential Revision:https://reviews.freebsd.org/D15347 Added: head/sys/net/iflib_clone.c (contents, props changed) head/sys/net/iflib_private.h (contents, props changed) Modified: head/sys/conf/files head/sys/net/if.h head/sys/net/if_clone.c head/sys/net/if_clone.h head/sys/net/ifdi_if.m head/sys/net/iflib.c head/sys/net/iflib.h Modified: head/sys/conf/files == --- head/sys/conf/files Fri May 11 19:37:18 2018(r333501) +++ head/sys/conf/files Fri May 11 20:08:28 2018(r333502) @@ -4137,6 +4137,7 @@ net/if_vlan.c optional vlan net/if_vxlan.c optional vxlan inet | vxlan inet6 net/ifdi_if.m optional ether pci net/iflib.coptional ether pci +net/iflib_clone.c optional ether pci net/mp_ring.c optional ether net/mppcc.coptional netgraph_mppc_compression net/mppcd.coptional netgraph_mppc_compression Modified: head/sys/net/if.h == --- head/sys/net/if.h Fri May 11 19:37:18 2018(r333501) +++ head/sys/net/if.h Fri May 11 20:08:28 2018(r333502) @@ -162,6 +162,9 @@ struct if_data { #defineIFF_STATICARP 0x8 /* (n) static ARP */ #defineIFF_DYING 0x20/* (n) interface is winding down */ #defineIFF_RENAMING0x40/* (n) interface is being renamed */ +#defineIFF_NOGROUP 0x80/* (n) interface is not part of any groups */ + + /* * Old names for driver flags so that user space tools can continue to use * the old (portable) names. Modified: head/sys/net/if_clone.c == --- head/sys/net/if_clone.c Fri May 11 19:37:18 2018(r333501) +++ head/sys/net/if_clone.c Fri May 11 20:08:28 2018(r333502) @@ -67,6 +67,7 @@ struct if_clone { char ifc_name[IFCLOSIZ];/* (c) Name of device, e.g. `gif' */ struct unrhdr *ifc_unrhdr; /* (c) alloc_unr(9) header */ int ifc_maxunit;/* (c) maximum unit number */ + int ifc_flags; long ifc_refcnt;/* (i) Reference count. */ LIST_HEAD(, ifnet) ifc_iflist; /* (i) List of cloned interfaces */ struct mtx ifc_mtx; /* Mutex to protect members. */ @@ -232,7 +233,8 @@ if_clone_createif(struct if_clone *ifc, char *name, si if (ifp == NULL) panic("%s: lookup failed for %s", __func__, name); - if_addgroup(ifp, ifc->ifc_name); + if ((ifc->ifc_flags & IFC_NOGROUP) == 0) + if_addgroup(ifp, ifc->ifc_name); IF_CLONE_LOCK(ifc); IFC_IFLIST_INSERT(ifc, ifp); @@ -319,16 +321,17 @@ if_clone_destroyif(struct if_clone *ifc, struct ifnet CURVNET_RESTORE(); return (ENXIO); /* ifp is not on the list. */ } + if ((ifc->ifc_flags & IFC_NOGROUP) == 0) + if_delgroup(ifp, ifc->ifc_name); - if_delgroup(ifp, ifc->ifc_name); - if (ifc->ifc_type == SIMPLE) err = ifc_simple_destroy(ifc, ifp); else err = (*ifc->ifc_destroy)(ifc, ifp); if (err != 0) { - if_addgroup(ifp, ifc->ifc_name); + if ((ifc->ifc_flags & IFC_NOGROUP) == 0) + if_addgroup(ifp, ifc->ifc_name); IF_CLONE_LOCK(ifc); IFC_IFLIST_INSERT(ifc, ifp); @@ -553,9 +556,10 @@ if_clone_findifc(struct ifnet *ifp) void if_clone_addgroup(struct ifnet *ifp, struct if_clone *ifc) { - - if_addgroup(ifp, ifc->ifc_name); - IF_CLONE_REMREF(ifc); + if ((ifc->ifc_flags & IFC_NOGROUP) == 0) { + if_addgroup(ifp, ifc->ifc_name); + IF_CLONE_REMREF(ifc); + } } /* @@ -731,4 +735,22 @@ ifc_simple_destroy(struct if_clone *ifc, struct ifnet ifc_free_unit(ifc, unit); return (0); +} + +const char * +ifc_name(struct if_clone *ifc) +{ + return (ifc->ifc_name); +} + +void +ifc_flags_set(struct if_clone *ifc, int flags) +{ + ifc->ifc_flags = flags; +} + +int +ifc_flags_get(struct if_clone *ifc) +{ + return (ifc->ifc_flags);
svn commit: r333501 - head/usr.sbin/mld6query
Author: shurd Date: Fri May 11 19:37:18 2018 New Revision: 333501 URL: https://svnweb.freebsd.org/changeset/base/333501 Log: Fix mld6query(8) and add a new -g option The mld6query command relies on KAME behaviour which allows the ipv6mr_multiaddr member of the request object in a IPV6_JOIN_GROUP setsockopt() call to be INADDR6_ANY. The FreeBSD stack doesn't allow this, so mld6query has been non-functional. Also, add a -g option which sends a General Query (query INADDR6_ANY) Reviewed by: sbruno, mmacy Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D15384 Modified: head/usr.sbin/mld6query/mld6.c head/usr.sbin/mld6query/mld6query.8 Modified: head/usr.sbin/mld6query/mld6.c == --- head/usr.sbin/mld6query/mld6.c Fri May 11 18:37:14 2018 (r333500) +++ head/usr.sbin/mld6query/mld6.c Fri May 11 19:37:18 2018 (r333501) @@ -85,7 +85,7 @@ int s; #define QUERY_RESPONSE_INTERVAL 1 -void make_msg(int index, struct in6_addr *addr, u_int type); +void make_msg(int index, struct in6_addr *addr, u_int type, struct in6_addr *qaddr); void usage(void); void dump(int); void quit(int); @@ -100,14 +100,26 @@ main(int argc, char *argv[]) struct itimerval itimer; u_int type; int ch; + struct in6_addr *qaddr = type = MLD_LISTENER_QUERY; - while ((ch = getopt(argc, argv, "dr")) != -1) { + while ((ch = getopt(argc, argv, "dgr")) != -1) { switch (ch) { case 'd': + if (type != MLD_LISTENER_QUERY) { + printf("Can not specifiy -d with -r\n"); + return 1; + } type = MLD_LISTENER_DONE; break; + case 'g': + qaddr = + break; case 'r': + if (type != MLD_LISTENER_QUERY) { + printf("Can not specifiy -r with -d\n"); + return 1; + } type = MLD_LISTENER_REPORT; break; default: @@ -127,6 +139,10 @@ main(int argc, char *argv[]) usage(); if (argc == 2 && inet_pton(AF_INET6, argv[1], ) != 1) usage(); + if (type != MLD_LISTENER_QUERY && qaddr != ) { + printf("Can not specifiy -g with -d or -r\n"); + return 1; + } if ((s = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6)) < 0) err(1, "socket"); @@ -135,7 +151,12 @@ main(int argc, char *argv[]) sizeof(hlim)) == -1) err(1, "setsockopt(IPV6_MULTICAST_HOPS)"); - mreq.ipv6mr_multiaddr = any; + if (IN6_IS_ADDR_UNSPECIFIED()) { + if (inet_pton(AF_INET6, "ff02::1", ) != 1) + errx(1, "inet_pton failed"); + } + + mreq.ipv6mr_multiaddr = maddr; mreq.ipv6mr_interface = ifindex; if (setsockopt(s, IPPROTO_IPV6, IPV6_JOIN_GROUP, , sizeof(mreq)) == -1) @@ -149,7 +170,7 @@ main(int argc, char *argv[]) sizeof(filt)) < 0) err(1, "setsockopt(ICMP6_FILTER)"); - make_msg(ifindex, , type); + make_msg(ifindex, , type, qaddr); if (sendmsg(s, , 0) < 0) err(1, "sendmsg"); @@ -177,7 +198,7 @@ main(int argc, char *argv[]) } void -make_msg(int index, struct in6_addr *addr, u_int type) +make_msg(int index, struct in6_addr *addr, u_int type, struct in6_addr *qaddr) { static struct iovec iov[2]; static u_char *cmsgbuf; @@ -196,12 +217,7 @@ make_msg(int index, struct in6_addr *addr, u_int type) dst.sin6_len = sizeof(dst); dst.sin6_family = AF_INET6; - if (IN6_IS_ADDR_UNSPECIFIED(addr)) { - if (inet_pton(AF_INET6, "ff02::1", _addr) != 1) - errx(1, "inet_pton failed"); - } - else - dst.sin6_addr = *addr; + dst.sin6_addr = *addr; m.msg_name = (caddr_t) m.msg_namelen = dst.sin6_len; iov[0].iov_base = (caddr_t) @@ -212,7 +228,7 @@ make_msg(int index, struct in6_addr *addr, u_int type) bzero(, sizeof(mldh)); mldh.mld_type = type & 0xff; mldh.mld_maxdelay = htons(QUERY_RESPONSE_INTERVAL); - mldh.mld_addr = *addr; + mldh.mld_addr = *qaddr; /* MLD packet should be advertised from linklocal address */ getifaddrs(); @@ -337,7 +353,7 @@ dump(int s) void quit(int signum __unused) { - mreq.ipv6mr_multiaddr = any; + mreq.ipv6mr_multiaddr = maddr; mreq.ipv6mr_interface = ifindex; if (setsockopt(s, IPPROTO_IPV6, IPV6_LEAVE_GROUP, ,
Re: svn commit: r333466 - in head: contrib/bmake sys/conf sys/kern sys/modules/epoch_test sys/sys sys/tests/epoch
Thanks On Fri, May 11, 2018 at 11:47 Mark Johnstonwrote: > On Thu, May 10, 2018 at 05:55:25PM +, Matt Macy wrote: > > Author: mmacy > > Date: Thu May 10 17:55:24 2018 > > New Revision: 333466 > > URL: https://svnweb.freebsd.org/changeset/base/333466 > > > > Log: > > Add simple preempt safe epoch API > > > > Read locking is over used in the kernel to guarantee liveness. This > API makes > > it easy to provide livenes guarantees without atomics. > > > > Includes epoch_test kernel module to stress test the API. > > > > Documentation will follow initial use case. > > > > Test case and improvements to preemption handling in response to > discussion > > with mjg@ > > > > Reviewed by:imp@, shurd@ > > Approved by:sbruno@ > > > > Added: > > head/sys/kern/subr_epoch.c (contents, props changed) > > head/sys/modules/epoch_test/ > > head/sys/modules/epoch_test/Makefile (contents, props changed) > > head/sys/sys/epoch.h (contents, props changed) > > head/sys/tests/epoch/ > > head/sys/tests/epoch/epoch_test.c (contents, props changed) > > Modified: > > head/contrib/bmake/job.c > > head/sys/conf/files > > head/sys/conf/kern.pre.mk > > head/sys/kern/kern_malloc.c > > head/sys/kern/kern_synch.c > > head/sys/kern/subr_trap.c > > head/sys/kern/subr_turnstile.c > > head/sys/sys/proc.h > > head/sys/sys/turnstile.h > > > > Modified: head/sys/sys/proc.h > > > == > > --- head/sys/sys/proc.h Thu May 10 17:22:04 2018(r333465) > > +++ head/sys/sys/proc.h Thu May 10 17:55:24 2018(r333466) > > @@ -243,6 +243,7 @@ struct thread { > > > > /* Cleared during fork1() */ > > #define td_startzero td_flags > > + u_char td_epochnest; /* (k) Private thread epoch nest counter */ > > It looks like td_epochnest was inteded to be in the zeroed section, but > td_startzero still points to td_flags. > > > int td_flags; /* (t) TDF_* flags. */ > > int td_inhibitors; /* (t) Why can not run. */ > > int td_pflags; /* (k) Private thread (TDP_*) > flags. */ > > @@ -355,6 +356,7 @@ struct thread { > > int td_lastcpu; /* (t) Last cpu we were on. */ > > int td_oncpu; /* (t) Which cpu we are on. */ > > void*td_lkpi_task; /* LinuxKPI task struct pointer */ > > + TAILQ_ENTRY(thread) td_epochq; /* (t) Epoch queue. */ > > }; > ___ 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: r333466 - in head: contrib/bmake sys/conf sys/kern sys/modules/epoch_test sys/sys sys/tests/epoch
On Thu, May 10, 2018 at 05:55:25PM +, Matt Macy wrote: > Author: mmacy > Date: Thu May 10 17:55:24 2018 > New Revision: 333466 > URL: https://svnweb.freebsd.org/changeset/base/333466 > > Log: > Add simple preempt safe epoch API > > Read locking is over used in the kernel to guarantee liveness. This API > makes > it easy to provide livenes guarantees without atomics. > > Includes epoch_test kernel module to stress test the API. > > Documentation will follow initial use case. > > Test case and improvements to preemption handling in response to discussion > with mjg@ > > Reviewed by:imp@, shurd@ > Approved by:sbruno@ > > Added: > head/sys/kern/subr_epoch.c (contents, props changed) > head/sys/modules/epoch_test/ > head/sys/modules/epoch_test/Makefile (contents, props changed) > head/sys/sys/epoch.h (contents, props changed) > head/sys/tests/epoch/ > head/sys/tests/epoch/epoch_test.c (contents, props changed) > Modified: > head/contrib/bmake/job.c > head/sys/conf/files > head/sys/conf/kern.pre.mk > head/sys/kern/kern_malloc.c > head/sys/kern/kern_synch.c > head/sys/kern/subr_trap.c > head/sys/kern/subr_turnstile.c > head/sys/sys/proc.h > head/sys/sys/turnstile.h > > Modified: head/sys/sys/proc.h > == > --- head/sys/sys/proc.h Thu May 10 17:22:04 2018(r333465) > +++ head/sys/sys/proc.h Thu May 10 17:55:24 2018(r333466) > @@ -243,6 +243,7 @@ struct thread { > > /* Cleared during fork1() */ > #define td_startzero td_flags > + u_char td_epochnest; /* (k) Private thread epoch nest counter */ It looks like td_epochnest was inteded to be in the zeroed section, but td_startzero still points to td_flags. > int td_flags; /* (t) TDF_* flags. */ > int td_inhibitors; /* (t) Why can not run. */ > int td_pflags; /* (k) Private thread (TDP_*) flags. */ > @@ -355,6 +356,7 @@ struct thread { > int td_lastcpu; /* (t) Last cpu we were on. */ > int td_oncpu; /* (t) Which cpu we are on. */ > void*td_lkpi_task; /* LinuxKPI task struct pointer */ > + TAILQ_ENTRY(thread) td_epochq; /* (t) Epoch queue. */ > }; ___ 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: r333500 - head/sys/kern
Author: mmacy Date: Fri May 11 18:37:14 2018 New Revision: 333500 URL: https://svnweb.freebsd.org/changeset/base/333500 Log: epoch(9): always set inited in epoch_init - set inited in the !usedomains case Reported by: jhibbits Approved by: sbruno Modified: head/sys/kern/subr_epoch.c Modified: head/sys/kern/subr_epoch.c == --- head/sys/kern/subr_epoch.c Fri May 11 17:26:59 2018(r333499) +++ head/sys/kern/subr_epoch.c Fri May 11 18:37:14 2018(r333500) @@ -136,8 +136,10 @@ epoch_init(void *arg __unused) migrate_count = counter_u64_alloc(M_WAITOK); turnstile_count = counter_u64_alloc(M_WAITOK); switch_count = counter_u64_alloc(M_WAITOK); - if (usedomains == false) + if (usedomains == false) { + inited = 1; return; + } count = domain = 0; domoffsets[0] = 0; for (domain = 0; domain < vm_ndomains; domain++) { @@ -154,7 +156,6 @@ epoch_init(void *arg __unused) break; } } - inited = 1; } SYSINIT(epoch, SI_SUB_CPU + 1, SI_ORDER_FIRST, epoch_init, NULL); ___ 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: r333494 - head/share/man/man7
On Fri, May 11, 2018 at 10:59 AM, Rodney W. Grimes < free...@pdx.rh.cn85.dnsmgr.net> wrote: > > On Fri, May 11, 2018 at 8:26 AM, Rodney W. Grimes > >wrote: > > >> @@ -67,7 +72,8 @@ Changes are first committed to CURRENT and then > usuall > > >> to STABLE. > > >> Every few years the CURRENT branch is renamed to STABLE, and a new > > >> CURRENT is branched, with an incremented major version number. > > >> -Releases are then branched off STABLE and numbered with consecutive > minor numbers. > > >> +Releases are then branched off STABLE and numbered with consecutive > minor > > >> +numbers. > > > > > > Proper place to line break long lines is at conjuncatives such > > > as the "and" above, yeilding: > > > > What? Are you just inventing these rules out of blue sky? What > > possible reason is there to do as you have proposed? > > Well known and established man page style rules, documented someplace, > which I can not seem to locate right now. > No such rule exists, and even if it did, it's never been enforced in the last 23 years I've been committing to man pages. I know I'd flat out ignore you if you told me to do that after a commit I did. Warner ___ 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: r333494 - head/share/man/man7
On Fri, 2018-05-11 at 08:26 -0700, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > > > Author: trasz > > Date: Fri May 11 15:11:53 2018 > > New Revision: 333494 > > URL: https://svnweb.freebsd.org/changeset/base/333494 > > > > Log: > > Â Improve development(7): > > Â Â > > Â Â Â - Use Fx when referring to FreeBSD. > > Â Â Â - Use Ql instead of Cm for command invocations. > > Â Â Â - Remove some redundant Pp macros. > > Â Â Â - Use a literal indented Bd instead of a series of Dl macros. > > Â Â > > Â Submitted by: 0mp@ > > Â Reviewed by: eadler@ > > Â MFC after:2 weeks > > Â Differential Revision:https://reviews.freebsd.org/D15126 > > > > Modified: > > Â head/share/man/man7/development.7 > > > > Modified: head/share/man/man7/development.7 > > === > > === > > [...] > > Â to STABLE. > > Â Every few years the CURRENT branch is renamed to STABLE, and a new > > Â CURRENT is branched, with an incremented major version number. > > -Releases are then branched off STABLE and numbered with > > consecutive minor numbers. > > +Releases are then branched off STABLE and numbered with > > consecutive minor > > +numbers. > Proper place to line break long lines is at conjuncatives such > as the "and" above, yeilding: > Releases are then branched off STABLE > and numbered with consecutive minor numbers. > The last thing we need is more stupid arbitrary rules that discourage people from writing manpages. This commit deserves praise, not pointless nitpicking. -- Ian ___ 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: r333461 - head/sys/amd64/amd64
PR here, for the curious: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228161 On Fri, May 11, 2018 at 11:00 AM, Conrad Meyerwrote: > On Fri, May 11, 2018 at 3:07 AM, Konstantin Belousov > wrote: >> On FreeBSD, gcc configuration requires explicit >> --enable-gnu-indirect-function >> option. I see it in e.g. lang/gcc7 port Makefile. >> >> On the other hand, I do not understand how devel/amd64-xtoolchain-gcc >> and devel/powerpc64-xtoolchain-gcc are build, so cannot see whether the >> switch is added to the configure invocation. But I suspect that it is >> not. >> >> In other words, most likely the problem is due to the port itself. > > Sure, I will try to track it down and file a port bug. Until then, > though, head is broken for cross toolchain GCC users :-(. > > I believe xtoolchain GCC is configured here: > https://svnweb.freebsd.org/ports/head/devel/powerpc64-gcc/Makefile?view=markup#l44 > (Indeed, --enable-gnu-indirect-function is absent.) > > Thanks, > Conrad ___ 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: r333461 - head/sys/amd64/amd64
On Fri, May 11, 2018 at 3:07 AM, Konstantin Belousovwrote: > On FreeBSD, gcc configuration requires explicit --enable-gnu-indirect-function > option. I see it in e.g. lang/gcc7 port Makefile. > > On the other hand, I do not understand how devel/amd64-xtoolchain-gcc > and devel/powerpc64-xtoolchain-gcc are build, so cannot see whether the > switch is added to the configure invocation. But I suspect that it is > not. > > In other words, most likely the problem is due to the port itself. Sure, I will try to track it down and file a port bug. Until then, though, head is broken for cross toolchain GCC users :-(. I believe xtoolchain GCC is configured here: https://svnweb.freebsd.org/ports/head/devel/powerpc64-gcc/Makefile?view=markup#l44 (Indeed, --enable-gnu-indirect-function is absent.) Thanks, Conrad ___ 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: r333499 - in head: share/man/man4 sys/dev/vxge
Author: sbruno Date: Fri May 11 17:26:59 2018 New Revision: 333499 URL: https://svnweb.freebsd.org/changeset/base/333499 Log: vxge(4): deprecation notice This hardware isn't totally ancient, about equal to a mxge(4) or mlx4en(4), but the company was sold to Exar which then promptly exited the Ethernet business so the card was commercially available for under 2 years. On deep search, the only usage of these cards I found was by the importing of the driver. There are code quality issues identified by Brooks and Hiren and no visible use nor maintainership that warrant removal from FreeBSD 12.0. Submitted by: kbowling Reviewed by: gnn brooks Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D15363 Modified: head/share/man/man4/vxge.4 head/sys/dev/vxge/vxge.c Modified: head/share/man/man4/vxge.4 == --- head/share/man/man4/vxge.4 Fri May 11 17:24:04 2018(r333498) +++ head/share/man/man4/vxge.4 Fri May 11 17:26:59 2018(r333499) @@ -44,6 +44,12 @@ module at boot time, place the following line in .Bd -literal -offset indent if_vxge_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 12.0 +and later. .Sh DESCRIPTION The .Nm Modified: head/sys/dev/vxge/vxge.c == --- head/sys/dev/vxge/vxge.cFri May 11 17:24:04 2018(r333498) +++ head/sys/dev/vxge/vxge.cFri May 11 17:26:59 2018(r333499) @@ -236,6 +236,7 @@ _exit0: err = ENXIO; } + gone_in_dev(ndev, 12, "vxge(4) driver"); return (err); } ___ 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: r333498 - head
Author: bdrewery Date: Fri May 11 17:24:04 2018 New Revision: 333498 URL: https://svnweb.freebsd.org/changeset/base/333498 Log: Revert r333496. I didn't put the correct paths, nor lib32, and I may have been comparing against the wrong source tree. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Fri May 11 16:50:25 2018(r333497) +++ head/ObsoleteFiles.inc Fri May 11 17:24:04 2018(r333498) @@ -38,25 +38,6 @@ # xargs -n1 | sort | uniq -d; # done -# 20180511: old orphaned libs -OLD_LIBS+=libarchive.so.5 -OLD_LIBS+=libasn1.so.10 -OLD_LIBS+=libdialog.so.7 -OLD_LIBS+=libdwarf.so.2 -OLD_LIBS+=libftpio.so.8 -OLD_LIBS+=libhdb.so.10 -OLD_LIBS+=libheimntlm.so.10 -OLD_LIBS+=libkadm5clnt.so.10 -OLD_LIBS+=libkadm5srv.so.10 -OLD_LIBS+=libkafs5.so.10 -OLD_LIBS+=liblwres.so.80 -OLD_LIBS+=libobjc.so.4 -OLD_LIBS+=libopie.so.6 -OLD_LIBS+=libroken.so.10 -OLD_LIBS+=librtld_db.so.1 -OLD_LIBS+=libstdc++.so.6 -OLD_LIBS+=libtacplus.so.4 -OLD_LIBS+=libusb.so.2 # 20180508: retire nxge OLD_FILES+=usr/share/man/man4/if_nxge.4.gz OLD_FILES+=usr/share/man/man4/nxge.4.gz ___ 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: r333496 - head
On 5/11/2018 10:14 AM, Konstantin Belousov wrote: > On Fri, May 11, 2018 at 04:46:52PM +, Bryan Drewery wrote: >> Author: bdrewery >> Date: Fri May 11 16:46:52 2018 >> New Revision: 333496 >> URL: https://svnweb.freebsd.org/changeset/base/333496 >> >> Log: >> Add a bunch of orphaned libraries. >> >> MFC after: 3 days >> >> Modified: >> head/ObsoleteFiles.inc >> >> Modified: head/ObsoleteFiles.inc >> == >> --- head/ObsoleteFiles.inc Fri May 11 16:11:24 2018(r333495) >> +++ head/ObsoleteFiles.inc Fri May 11 16:46:52 2018 (r333496) >> @@ -38,6 +38,25 @@ >> # xargs -n1 | sort | uniq -d; >> # done >> >> +# 20180511: old orphaned libs >> +OLD_LIBS+=libarchive.so.5 >> +OLD_LIBS+=libasn1.so.10 >> +OLD_LIBS+=libdialog.so.7 >> +OLD_LIBS+=libdwarf.so.2 >> +OLD_LIBS+=libftpio.so.8 >> +OLD_LIBS+=libhdb.so.10 >> +OLD_LIBS+=libheimntlm.so.10 >> +OLD_LIBS+=libkadm5clnt.so.10 >> +OLD_LIBS+=libkadm5srv.so.10 >> +OLD_LIBS+=libkafs5.so.10 >> +OLD_LIBS+=liblwres.so.80 >> +OLD_LIBS+=libobjc.so.4 >> +OLD_LIBS+=libopie.so.6 >> +OLD_LIBS+=libroken.so.10 >> +OLD_LIBS+=librtld_db.so.1 >> +OLD_LIBS+=libstdc++.so.6 >> +OLD_LIBS+=libtacplus.so.4 >> +OLD_LIBS+=libusb.so.2 >> # 20180508: retire nxge >> OLD_FILES+=usr/share/man/man4/if_nxge.4.gz >> OLD_FILES+=usr/share/man/man4/nxge.4.gz > > Are lib32 counterparts also require handling ? > Yeah, I also spaced out and didn't put /usr/lib. Oops. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r333496 - head
On Fri, May 11, 2018 at 04:46:52PM +, Bryan Drewery wrote: > Author: bdrewery > Date: Fri May 11 16:46:52 2018 > New Revision: 333496 > URL: https://svnweb.freebsd.org/changeset/base/333496 > > Log: > Add a bunch of orphaned libraries. > > MFC after: 3 days > > Modified: > head/ObsoleteFiles.inc > > Modified: head/ObsoleteFiles.inc > == > --- head/ObsoleteFiles.incFri May 11 16:11:24 2018(r333495) > +++ head/ObsoleteFiles.incFri May 11 16:46:52 2018(r333496) > @@ -38,6 +38,25 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20180511: old orphaned libs > +OLD_LIBS+=libarchive.so.5 > +OLD_LIBS+=libasn1.so.10 > +OLD_LIBS+=libdialog.so.7 > +OLD_LIBS+=libdwarf.so.2 > +OLD_LIBS+=libftpio.so.8 > +OLD_LIBS+=libhdb.so.10 > +OLD_LIBS+=libheimntlm.so.10 > +OLD_LIBS+=libkadm5clnt.so.10 > +OLD_LIBS+=libkadm5srv.so.10 > +OLD_LIBS+=libkafs5.so.10 > +OLD_LIBS+=liblwres.so.80 > +OLD_LIBS+=libobjc.so.4 > +OLD_LIBS+=libopie.so.6 > +OLD_LIBS+=libroken.so.10 > +OLD_LIBS+=librtld_db.so.1 > +OLD_LIBS+=libstdc++.so.6 > +OLD_LIBS+=libtacplus.so.4 > +OLD_LIBS+=libusb.so.2 > # 20180508: retire nxge > OLD_FILES+=usr/share/man/man4/if_nxge.4.gz > OLD_FILES+=usr/share/man/man4/nxge.4.gz Are lib32 counterparts also require handling ? ___ 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: r333494 - head/share/man/man7
On Sat, May 12, 2018, 12:59 AM Rodney W. Grimes < free...@pdx.rh.cn85.dnsmgr.net> wrote: > > On Fri, May 11, 2018 at 8:26 AM, Rodney W. Grimes > >wrote: > > >> @@ -67,7 +72,8 @@ Changes are first committed to CURRENT and then > usuall > > >> to STABLE. > > >> Every few years the CURRENT branch is renamed to STABLE, and a new > > >> CURRENT is branched, with an incremented major version number. > > >> -Releases are then branched off STABLE and numbered with consecutive > minor numbers. > > >> +Releases are then branched off STABLE and numbered with consecutive > minor > > >> +numbers. > > > > > > Proper place to line break long lines is at conjuncatives such > > > as the "and" above, yeilding: > > > > What? Are you just inventing these rules out of blue sky? What > > possible reason is there to do as you have proposed? > > Well known and established man page style rules, documented someplace, > which I can not seem to locate right now. > Could you please find that if possible and share with us? Personally I'm about to rewrite some man page and that would be useful in my case! > > > Conrad > > -- > Rod Grimes > rgri...@freebsd.org > > ___ 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: r333494 - head/share/man/man7
> On Fri, May 11, 2018 at 8:26 AM, Rodney W. Grimes >wrote: > >> @@ -67,7 +72,8 @@ Changes are first committed to CURRENT and then usuall > >> to STABLE. > >> Every few years the CURRENT branch is renamed to STABLE, and a new > >> CURRENT is branched, with an incremented major version number. > >> -Releases are then branched off STABLE and numbered with consecutive minor > >> numbers. > >> +Releases are then branched off STABLE and numbered with consecutive minor > >> +numbers. > > > > Proper place to line break long lines is at conjuncatives such > > as the "and" above, yeilding: > > What? Are you just inventing these rules out of blue sky? What > possible reason is there to do as you have proposed? Well known and established man page style rules, documented someplace, which I can not seem to locate right now. > Conrad -- Rod Grimes rgri...@freebsd.org ___ 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: r333497 - head/sys/net
Author: ae Date: Fri May 11 16:50:25 2018 New Revision: 333497 URL: https://svnweb.freebsd.org/changeset/base/333497 Log: Apply the change from r272770 to if_ipsec(4) interface. It is guaranteed that if_ipsec(4) interface is used only for tunnel mode IPsec, i.e. decrypted and decapsultaed packet has its own IP header. Thus we can consider it as new packet and clear the protocols flags. This allows ICMP/ICMPv6 properly handle errors that may cause this packet. PR: 228108 MFC after:1 week Modified: head/sys/net/if_ipsec.c Modified: head/sys/net/if_ipsec.c == --- head/sys/net/if_ipsec.c Fri May 11 16:46:52 2018(r333496) +++ head/sys/net/if_ipsec.c Fri May 11 16:50:25 2018(r333497) @@ -434,7 +434,7 @@ ipsec_if_input(struct mbuf *m, struct secasvar *sav, u m->m_pkthdr.rcvif = ifp; IPSEC_SC_RUNLOCK(); - /* m_clrprotoflags(m); */ + m_clrprotoflags(m); M_SETFIB(m, ifp->if_fib); BPF_MTAP2(ifp, , sizeof(af), m); if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); ___ 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: r333496 - head
Author: bdrewery Date: Fri May 11 16:46:52 2018 New Revision: 333496 URL: https://svnweb.freebsd.org/changeset/base/333496 Log: Add a bunch of orphaned libraries. MFC after:3 days Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Fri May 11 16:11:24 2018(r333495) +++ head/ObsoleteFiles.inc Fri May 11 16:46:52 2018(r333496) @@ -38,6 +38,25 @@ # xargs -n1 | sort | uniq -d; # done +# 20180511: old orphaned libs +OLD_LIBS+=libarchive.so.5 +OLD_LIBS+=libasn1.so.10 +OLD_LIBS+=libdialog.so.7 +OLD_LIBS+=libdwarf.so.2 +OLD_LIBS+=libftpio.so.8 +OLD_LIBS+=libhdb.so.10 +OLD_LIBS+=libheimntlm.so.10 +OLD_LIBS+=libkadm5clnt.so.10 +OLD_LIBS+=libkadm5srv.so.10 +OLD_LIBS+=libkafs5.so.10 +OLD_LIBS+=liblwres.so.80 +OLD_LIBS+=libobjc.so.4 +OLD_LIBS+=libopie.so.6 +OLD_LIBS+=libroken.so.10 +OLD_LIBS+=librtld_db.so.1 +OLD_LIBS+=libstdc++.so.6 +OLD_LIBS+=libtacplus.so.4 +OLD_LIBS+=libusb.so.2 # 20180508: retire nxge OLD_FILES+=usr/share/man/man4/if_nxge.4.gz OLD_FILES+=usr/share/man/man4/nxge.4.gz ___ 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: r333494 - head/share/man/man7
On Fri, May 11, 2018 at 8:26 AM, Rodney W. Grimeswrote: >> @@ -67,7 +72,8 @@ Changes are first committed to CURRENT and then usuall >> to STABLE. >> Every few years the CURRENT branch is renamed to STABLE, and a new >> CURRENT is branched, with an incremented major version number. >> -Releases are then branched off STABLE and numbered with consecutive minor >> numbers. >> +Releases are then branched off STABLE and numbered with consecutive minor >> +numbers. > > Proper place to line break long lines is at conjuncatives such > as the "and" above, yeilding: What? Are you just inventing these rules out of blue sky? What possible reason is there to do as you have proposed? Conrad ___ 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: r333495 - in head/tests/sys/cddl/zfs/tests: exec history link_count migration mount
Author: emaste Date: Fri May 11 16:11:24 2018 New Revision: 333495 URL: https://svnweb.freebsd.org/changeset/base/333495 Log: Strip trailing / from TESTSDIR Otherwise makefs gets upset: makefs: ./usr/tests/sys/cddl/zfs/tests/exec/: empty leaf element Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/cddl/zfs/tests/exec/Makefile head/tests/sys/cddl/zfs/tests/history/Makefile head/tests/sys/cddl/zfs/tests/link_count/Makefile head/tests/sys/cddl/zfs/tests/migration/Makefile head/tests/sys/cddl/zfs/tests/mount/Makefile Modified: head/tests/sys/cddl/zfs/tests/exec/Makefile == --- head/tests/sys/cddl/zfs/tests/exec/Makefile Fri May 11 15:11:53 2018 (r333494) +++ head/tests/sys/cddl/zfs/tests/exec/Makefile Fri May 11 16:11:24 2018 (r333495) @@ -3,7 +3,7 @@ .include PACKAGE=tests -TESTSDIR=${TESTSBASE}/sys/cddl/zfs/tests/exec/ +TESTSDIR=${TESTSBASE}/sys/cddl/zfs/tests/exec FILESDIR=${TESTSDIR} BINDIR=${TESTSDIR} Modified: head/tests/sys/cddl/zfs/tests/history/Makefile == --- head/tests/sys/cddl/zfs/tests/history/Makefile Fri May 11 15:11:53 2018(r333494) +++ head/tests/sys/cddl/zfs/tests/history/Makefile Fri May 11 16:11:24 2018(r333495) @@ -3,7 +3,7 @@ .include PACKAGE=tests -TESTSDIR=${TESTSBASE}/sys/cddl/zfs/tests/history/ +TESTSDIR=${TESTSBASE}/sys/cddl/zfs/tests/history FILESDIR=${TESTSDIR} ATF_TESTS_KSH93+= history_test Modified: head/tests/sys/cddl/zfs/tests/link_count/Makefile == --- head/tests/sys/cddl/zfs/tests/link_count/Makefile Fri May 11 15:11:53 2018(r333494) +++ head/tests/sys/cddl/zfs/tests/link_count/Makefile Fri May 11 16:11:24 2018(r333495) @@ -3,7 +3,7 @@ .include PACKAGE=tests -TESTSDIR=${TESTSBASE}/sys/cddl/zfs/tests/link_count/ +TESTSDIR=${TESTSBASE}/sys/cddl/zfs/tests/link_count FILESDIR=${TESTSDIR} ATF_TESTS_KSH93+= link_count_test Modified: head/tests/sys/cddl/zfs/tests/migration/Makefile == --- head/tests/sys/cddl/zfs/tests/migration/MakefileFri May 11 15:11:53 2018(r333494) +++ head/tests/sys/cddl/zfs/tests/migration/MakefileFri May 11 16:11:24 2018(r333495) @@ -3,7 +3,7 @@ .include PACKAGE=tests -TESTSDIR=${TESTSBASE}/sys/cddl/zfs/tests/migration/ +TESTSDIR=${TESTSBASE}/sys/cddl/zfs/tests/migration FILESDIR=${TESTSDIR} ATF_TESTS_KSH93+= migration_test Modified: head/tests/sys/cddl/zfs/tests/mount/Makefile == --- head/tests/sys/cddl/zfs/tests/mount/MakefileFri May 11 15:11:53 2018(r333494) +++ head/tests/sys/cddl/zfs/tests/mount/MakefileFri May 11 16:11:24 2018(r333495) @@ -3,7 +3,7 @@ .include PACKAGE=tests -TESTSDIR=${TESTSBASE}/sys/cddl/zfs/tests/mount/ +TESTSDIR=${TESTSBASE}/sys/cddl/zfs/tests/mount FILESDIR=${TESTSDIR} ATF_TESTS_KSH93+= mount_test ___ 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: r333494 - head/share/man/man7
On Fri, 11 May 2018 08:26:07 -0700 (PDT) "Rodney W. Grimes"wrote: >> Author: trasz >> Date: Fri May 11 15:11:53 2018 >> New Revision: 333494 >> URL: https://svnweb.freebsd.org/changeset/base/333494 >> >> ... >> >> Modified: head/share/man/man7/development.7 >> == >> --- head/share/man/man7/development.7Fri May 11 14:52:35 >> 2018 (r333493) +++ head/share/man/man7/development.7 >> Fri May 11 15:11:53 2018 (r333494) @@ -24,16 +24,20 @@ >> >> ... >> >> @@ -67,7 +72,8 @@ Changes are first committed to CURRENT and then >> usuall to STABLE. >> Every few years the CURRENT branch is renamed to STABLE, and a new >> CURRENT is branched, with an incremented major version number. >> -Releases are then branched off STABLE and numbered with consecutive >> minor numbers. +Releases are then branched off STABLE and numbered >> with consecutive minor +numbers. > >Proper place to line break long lines is at conjuncatives such >as the "and" above, yeilding: >Releases are then branched off STABLE >and numbered with consecutive minor numbers. Alright. Thanks, I'll try to remember about it next time. Mateusz ___ 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: r333494 - head/share/man/man7
[ Charset UTF-8 unsupported, converting... ] > Author: trasz > Date: Fri May 11 15:11:53 2018 > New Revision: 333494 > URL: https://svnweb.freebsd.org/changeset/base/333494 > > Log: > Improve development(7): > >- Use Fx when referring to FreeBSD. >- Use Ql instead of Cm for command invocations. >- Remove some redundant Pp macros. >- Use a literal indented Bd instead of a series of Dl macros. > > Submitted by: 0mp@ > Reviewed by:eadler@ > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D15126 > > Modified: > head/share/man/man7/development.7 > > Modified: head/share/man/man7/development.7 > == > --- head/share/man/man7/development.7 Fri May 11 14:52:35 2018 > (r333493) > +++ head/share/man/man7/development.7 Fri May 11 15:11:53 2018 > (r333494) > @@ -24,16 +24,20 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd April 10, 2018 > +.Dd May 11, 2018 > .Dt DEVELOPMENT 7 > .Os > .Sh NAME > .Nm development > -.Nd introduction to FreeBSD development process > +.Nd introduction to > +.Fx > +development process > .Sh DESCRIPTION > .Fx > development is split into three major suprojects: doc, ports, and src. > -Doc is the documentation, such as the FreeBSD Handbook. > +Doc is the documentation, such as the > +.Fx > +Handbook. > To read more, see: > .Pp > .Lk https://www.FreeBSD.org/doc/en/books/fdp-primer/ > @@ -54,7 +58,8 @@ can be found at: > .Pp > .Lk https://www.FreeBSD.org/doc/en/articles/committers-guide/ > .Pp > -FreeBSD src development takes place in the CURRENT branch in Subversion, > +.Fx > +src development takes place in the CURRENT branch in Subversion, > located at: > .Pp > .Lk https://svn.FreeBSD.org/base/head > @@ -67,7 +72,8 @@ Changes are first committed to CURRENT and then usuall > to STABLE. > Every few years the CURRENT branch is renamed to STABLE, and a new > CURRENT is branched, with an incremented major version number. > -Releases are then branched off STABLE and numbered with consecutive minor > numbers. > +Releases are then branched off STABLE and numbered with consecutive minor > +numbers. Proper place to line break long lines is at conjuncatives such as the "and" above, yeilding: Releases are then branched off STABLE and numbered with consecutive minor numbers. > .Pp > Layout of the source tree is described in > .Xr hier 7 . > @@ -76,7 +82,7 @@ Build instructions can be found in > and > .Xr release 7 . > Kernel APIs are usually documented, use > -.Cm apropos -s 9 '' > +.Ql "apropos -s 9 ''" > for a list. > Regression test suite is described in > .Xr tests 7 . > @@ -88,26 +94,31 @@ such as freebsd-arch@ and freebsd-hackers@: > .Pp > .Lk https://lists.FreeBSD.org/ > .Pp > -To get your patches integrated into the main FreeBSD repository use > Phabricator; > +To get your patches integrated into the main > +.Fx > +repository use Phabricator; > it is a code review tool that allows other developers to review the changes, > suggest improvements, and, eventually, allows them to pick up the change and > commit it: > .Pp > .Lk https://reviews.FreeBSD.org/ > -.Pp > .Sh EXAMPLES > Check out the CURRENT branch, build it, and install, overwriting the current > system: > -.Dl svnlite co https://svn.FreeBSD.org/base/head src > -.Dl cd src > -.Dl make -j8 buildworld buildkernel installkernel > -.Dl reboot > +.Bd -literal -offset indent > +svnlite co https://svn.FreeBSD.org/base/head src > +cd src > +make -j8 buildworld buildkernel installkernel > +reboot > +.Ed > .Pp > After reboot: > -.Dl cd src > -.Dl make -j8 installworld > -.Pp > +.Bd -literal -offset indent > +cd src > +make -j8 installworld > +.Ed > .Sh SEE ALSO > +.Xr svnlite 1 , > .Xr witness 4 , > .Xr build 7 , > .Xr hier 7 , > > -- Rod Grimes rgri...@freebsd.org ___ 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: r333494 - head/share/man/man7
Author: trasz Date: Fri May 11 15:11:53 2018 New Revision: 333494 URL: https://svnweb.freebsd.org/changeset/base/333494 Log: Improve development(7): - Use Fx when referring to FreeBSD. - Use Ql instead of Cm for command invocations. - Remove some redundant Pp macros. - Use a literal indented Bd instead of a series of Dl macros. Submitted by: 0mp@ Reviewed by: eadler@ MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D15126 Modified: head/share/man/man7/development.7 Modified: head/share/man/man7/development.7 == --- head/share/man/man7/development.7 Fri May 11 14:52:35 2018 (r333493) +++ head/share/man/man7/development.7 Fri May 11 15:11:53 2018 (r333494) @@ -24,16 +24,20 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 2018 +.Dd May 11, 2018 .Dt DEVELOPMENT 7 .Os .Sh NAME .Nm development -.Nd introduction to FreeBSD development process +.Nd introduction to +.Fx +development process .Sh DESCRIPTION .Fx development is split into three major suprojects: doc, ports, and src. -Doc is the documentation, such as the FreeBSD Handbook. +Doc is the documentation, such as the +.Fx +Handbook. To read more, see: .Pp .Lk https://www.FreeBSD.org/doc/en/books/fdp-primer/ @@ -54,7 +58,8 @@ can be found at: .Pp .Lk https://www.FreeBSD.org/doc/en/articles/committers-guide/ .Pp -FreeBSD src development takes place in the CURRENT branch in Subversion, +.Fx +src development takes place in the CURRENT branch in Subversion, located at: .Pp .Lk https://svn.FreeBSD.org/base/head @@ -67,7 +72,8 @@ Changes are first committed to CURRENT and then usuall to STABLE. Every few years the CURRENT branch is renamed to STABLE, and a new CURRENT is branched, with an incremented major version number. -Releases are then branched off STABLE and numbered with consecutive minor numbers. +Releases are then branched off STABLE and numbered with consecutive minor +numbers. .Pp Layout of the source tree is described in .Xr hier 7 . @@ -76,7 +82,7 @@ Build instructions can be found in and .Xr release 7 . Kernel APIs are usually documented, use -.Cm apropos -s 9 '' +.Ql "apropos -s 9 ''" for a list. Regression test suite is described in .Xr tests 7 . @@ -88,26 +94,31 @@ such as freebsd-arch@ and freebsd-hackers@: .Pp .Lk https://lists.FreeBSD.org/ .Pp -To get your patches integrated into the main FreeBSD repository use Phabricator; +To get your patches integrated into the main +.Fx +repository use Phabricator; it is a code review tool that allows other developers to review the changes, suggest improvements, and, eventually, allows them to pick up the change and commit it: .Pp .Lk https://reviews.FreeBSD.org/ -.Pp .Sh EXAMPLES Check out the CURRENT branch, build it, and install, overwriting the current system: -.Dl svnlite co https://svn.FreeBSD.org/base/head src -.Dl cd src -.Dl make -j8 buildworld buildkernel installkernel -.Dl reboot +.Bd -literal -offset indent +svnlite co https://svn.FreeBSD.org/base/head src +cd src +make -j8 buildworld buildkernel installkernel +reboot +.Ed .Pp After reboot: -.Dl cd src -.Dl make -j8 installworld -.Pp +.Bd -literal -offset indent +cd src +make -j8 installworld +.Ed .Sh SEE ALSO +.Xr svnlite 1 , .Xr witness 4 , .Xr build 7 , .Xr hier 7 , ___ 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: r333493 - head/release/tools
Author: trasz Date: Fri May 11 14:52:35 2018 New Revision: 333493 URL: https://svnweb.freebsd.org/changeset/base/333493 Log: Set kldxref_enable="YES" for ARM images. Without it, the images are missing the /boot/kernel/linker.hints file, which breaks loading some of the modules with dependencies, eg cfiscsi.ko. This is a minimal fix for ARM images, in order to safely MFC it before 11.2-RELEASE. Afterwards, however, I believe we should actually just change the default (as in, etc/defaults/rc.conf). The reason is that it's required for every image that's being cross-built, as kldxref(1) cannot handle files for non-native architectures. For the one that is not - amd64 - having it on by default doesn't change anything - the script is noop if the linker.hints already exists. The long-term solution would be to rewrite kldxref(1) to handle other architectures, and generate linker.hints at build time. Reviewed by: gjb@ MFC after:3 days Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D14534 Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr == --- head/release/tools/arm.subr Fri May 11 14:50:26 2018(r333492) +++ head/release/tools/arm.subr Fri May 11 14:52:35 2018(r333493) @@ -122,6 +122,7 @@ arm_install_base() { echo 'sendmail_outbound_enable="NO"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf echo 'sendmail_msp_queue_enable="NO"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf echo 'growfs_enable="YES"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf + echo 'kldxref_enable="YES"' >> ${CHROOTDIR}/${DESTDIR}/etc/rc.conf sync umount_loop ${CHROOTDIR}/${DESTDIR} ___ 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: r333476 - head/sys/net
> This booted and runs without issue, although obviously I wouldn't want > to commit it: Looks pretty close to what I did the first time. We could also wrap this in my proposed ifdef, and add a sysctl() to turn it on and off though it would probably be beter to do that in the code areas that bde patches this out. > > Index: sys/net/if.c > === > --- sys/net/if.c (revision 333490) > +++ sys/net/if.c (working copy) > @@ -1814,6 +1814,7 @@ > ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa, > struct sockaddr *ia) > { > +#if 0 #ifdef MAINTAIN_LOOPBACK_ROUTE > int error; > struct rt_addrinfo info; > struct sockaddr_dl null_sdl; > @@ -1837,6 +1838,9 @@ > if_printf(ifp, "%s failed: %d\n", otype, error); > > return (error); > +#else > + return (0); > +#endif > } > > int > > DES > -- > Dag-Erling Sm?rgrav - d...@des.no > > -- Rod Grimes rgri...@freebsd.org ___ 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: r333492 - head/sys/dev/ocs_fc
Author: ken Date: Fri May 11 14:50:26 2018 New Revision: 333492 URL: https://svnweb.freebsd.org/changeset/base/333492 Log: Clear out the entire structure, not just the size of a pointer to it. sys/dev/ocs/ocs_os.c: In ocs_thread_create(), use sizeof(*thread) (instead of sizeof(thread)) as the size argument to memset so that we clear out the entire thread structure instead of just a few bytes of it. Submitted by: jtl MFC after:3 days Modified: head/sys/dev/ocs_fc/ocs_os.c Modified: head/sys/dev/ocs_fc/ocs_os.c == --- head/sys/dev/ocs_fc/ocs_os.cFri May 11 14:43:21 2018 (r333491) +++ head/sys/dev/ocs_fc/ocs_os.cFri May 11 14:50:26 2018 (r333492) @@ -630,7 +630,7 @@ ocs_thread_create(ocs_os_handle_t os, ocs_thread_t *th { int32_t rc = 0; - ocs_memset(thread, 0, sizeof(thread)); + ocs_memset(thread, 0, sizeof(*thread)); thread->fctn = fctn; thread->name = ocs_strdup(name); ___ 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: r333491 - head/etc/rc.d
Author: trasz Date: Fri May 11 14:43:21 2018 New Revision: 333491 URL: https://svnweb.freebsd.org/changeset/base/333491 Log: Make /etc/rc.d/kldxref not print anything for directories that don't contain any kernel modules. This makes the common case completely silent, as it should be. Reviewed by: imp@ MFC after:2 weeks Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D14694 Modified: head/etc/rc.d/kldxref Modified: head/etc/rc.d/kldxref == --- head/etc/rc.d/kldxref Fri May 11 13:22:43 2018(r333490) +++ head/etc/rc.d/kldxref Fri May 11 14:43:21 2018(r333491) @@ -24,8 +24,9 @@ kldxref_start() { fi IFS=';' for MODULE_DIR in $MODULE_PATHS; do - if [ ! -f "$MODULE_DIR/linker.hints" ] || - checkyesno kldxref_clobber; then + if checkyesno kldxref_clobber || + [ ! -f "$MODULE_DIR/linker.hints" ] && + [ `echo ${MODULE_DIR}/*.ko` != "${MODULE_DIR}/*.ko" ]; then echo "Building $MODULE_DIR/linker.hints" kldxref "$MODULE_DIR" fi ___ 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: r333476 - head/sys/net
This booted and runs without issue, although obviously I wouldn't want to commit it: Index: sys/net/if.c === --- sys/net/if.c(revision 333490) +++ sys/net/if.c(working copy) @@ -1814,6 +1814,7 @@ ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa, struct sockaddr *ia) { +#if 0 int error; struct rt_addrinfo info; struct sockaddr_dl null_sdl; @@ -1837,6 +1838,9 @@ if_printf(ifp, "%s failed: %d\n", otype, error); return (error); +#else + return (0); +#endif } int DES -- Dag-Erling Smørgrav - d...@des.no ___ 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: r333484 - head/sys/vm
[ Charset UTF-8 unsupported, converting... ] > Author: mjg > Date: Fri May 11 07:04:57 2018 > New Revision: 333484 > URL: https://svnweb.freebsd.org/changeset/base/333484 > > Log: > uma: increase alignment to 128 bytes on amd64 > > Current UMA internals are not suited for efficient operation in > multi-socket environments. In particular there is very common use of > MAXCPU arrays and other fields which are not always properly aligned and > are not local for target threads (apart from the first node of course). > Turns out the existing UMA_ALIGN macro can be used to mostly work around > the problem until the code get fixed. The current setting of 64 bytes > runs into trouble when adjacent cache line prefetcher gets to work. > > An example 128-way benchmark doing a lot of malloc/frees has the following > instruction samples: What are the effects of this on 4, 8, and 16-way systems? Is this more optimization for big iron that pessimizes little iron? I find it odd that changing something from a cache line size dependent to a hardcoded value is an optimization for all. I understand that this is coming about because the value of CACHE_LINE_SIZE was changed, but is this really the correct fix? Should work be started to stop the assumption that we can compile a kernel for all CACHE line sizes and start to adjust things at load time? There are lots of places that CACHE size and topology effect what are optimal values, and this stuffing of constants is just not a long term workable solution. If ANYTHING this constant 128 should become some type of #define so that it can be tuned at compile time, or wrapped in #ifndef, see below. > before: > kernel`lf_advlockasync+0x43b32940 > kernel`malloc+0xe542380 > kernel`bzero+0x1947798 > kernel`spinlock_exit+0x2660423 >kernel`0x8078238 >0x0 136947 > kernel`uma_zfree_arg+0x46 159594 >kernel`uma_zalloc_arg+0x672 180556 > kernel`uma_zfree_arg+0x2a 459923 >kernel`uma_zalloc_arg+0x5ec 489910 > > after: > kernel`bzero+0xd46115 > kernel`lf_advlockasync+0x25f46134 > kernel`lf_advlockasync+0x38a49078 > kernel`fget_unlocked+0xd149942 > kernel`lf_advlockasync+0x43b55392 > kernel`copyin+0x4a56963 > kernel`bzero+0x1981983 > kernel`spinlock_exit+0x2691889 >kernel`0x80 136357 >0x0 239424 > > See the review for more details. > > Reviewed by:kib > Differential Revision: https://reviews.freebsd.org/D15346 > > Modified: > head/sys/vm/uma_int.h > > Modified: head/sys/vm/uma_int.h > == > --- head/sys/vm/uma_int.h Fri May 11 06:59:54 2018(r333483) > +++ head/sys/vm/uma_int.h Fri May 11 07:04:57 2018(r333484) > @@ -177,7 +177,7 @@ struct uma_hash { > * align field or structure to cache line > */ #ifndef UMA_ALIGN > #if defined(__amd64__) > -#define UMA_ALIGN__aligned(CACHE_LINE_SIZE) > +#define UMA_ALIGN__aligned(128) > #else > #define UMA_ALIGN > #endif #endif > > -- Rod Grimes rgri...@freebsd.org ___ 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: r333489 - head/sys/dev/usb
Author: emaste Date: Fri May 11 13:09:21 2018 New Revision: 333489 URL: https://svnweb.freebsd.org/changeset/base/333489 Log: usbdevs: add new Microchip USB-Ethernet device IDs LAN7800 USB 3.1 to 10/100/1000 Ethernet with PHY LAN7801 USB 3.1 to 10/100/1000 Ethernet with RGMII interface Also update manufacturer name for the Vendor ID. Microchip acquired SMSC in May 2012. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsFri May 11 12:58:36 2018(r333488) +++ head/sys/dev/usb/usbdevsFri May 11 13:09:21 2018(r333489) @@ -103,7 +103,7 @@ vendor CREATIVE 0x041e Creative Labs vendor NOKIA 0x0421 Nokia vendor ADI 0x0422 ADI Systems vendor CATC0x0423 Computer Access Technology -vendor SMC20x0424 Standard Microsystems +vendor SMC20x0424 Microchip (Standard Microsystems) vendor MOTOROLA_HK 0x0425 Motorola HK vendor GRAVIS 0x0428 Advanced Gravis Computer vendor CIRRUSLOGIC 0x0429 Cirrus Logic @@ -4320,6 +4320,8 @@ product SMC 2862WG0xee13 EZ Connect Wireless Adapter product SMC2 2020HUB 0x2020 USB Hub product SMC2 2514HUB 0x2514 USB Hub product SMC3 2662WUSB 0xa002 2662W-AR Wireless +product SMC2 LAN7800_ETH 0x7800 USB/Ethernet +product SMC2 LAN7801_ETH 0x7801 USB/Ethernet product SMC2 LAN9500_ETH 0x9500 USB/Ethernet product SMC2 LAN9505_ETH 0x9505 USB/Ethernet product SMC2 LAN9530_ETH 0x9530 USB/Ethernet ___ 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: r333488 - head/sbin/geom/class/part
Author: emaste Date: Fri May 11 12:58:36 2018 New Revision: 333488 URL: https://svnweb.freebsd.org/changeset/base/333488 Log: gpart.8: list all options in table form for each command Previously gpart's man page listed some command options in prose, and some in table form, which made it more difficult to use as a reference. Reviewed by: bcr Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D15135 Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 == --- head/sbin/geom/class/part/gpart.8 Fri May 11 12:57:25 2018 (r333487) +++ head/sbin/geom/class/part/gpart.8 Fri May 11 12:58:36 2018 (r333488) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 2, 2018 +.Dd May 11, 2018 .Dt GPART 8 .Os .Sh NAME @@ -147,26 +147,14 @@ The first argument is the action to be taken: .It Cm add Add a new partition to the partitioning scheme given by .Ar geom . -The partition begins on the logical block address given by the -.Fl b Ar start -option. -Its size is given by the -.Fl s Ar size -option. -SI unit suffixes are allowed. -One or both -.Fl b -and -.Fl s -options can be omitted. -If so they are automatically calculated. -The type of the partition is given by the -.Fl t Ar type -option. -Partition types are discussed below in the section entitled -.Sx "PARTITION TYPES" . +The partition type must be specified with +.Fl t Ar type . +The partition's location, size, and other attributes will be calculated +automatically if the corresponding options are not specified. .Pp -Additional options include: +The +.Cm add +command accepts these options: .Bl -tag -width 12n .It Fl a Ar alignment If specified, then @@ -178,6 +166,9 @@ offset and partition to be multiple of .Ar alignment value. +.It Fl b Ar start +The logical block address where the partition will begin. +A SI unit suffix is allowed. .It Fl f Ar flags Additional operational flags. See the section entitled @@ -193,6 +184,15 @@ to represent the partition. The label attached to the partition. This option is only valid when used on partitioning schemes that support partition labels. +.It Fl s Ar size +Create a partition of size +.Ar size . +A SI unit suffix is allowed. +.It Fl t Ar type +Create a partition of type +.Ar type . +Partition types are discussed below in the section entitled +.Sx "PARTITION TYPES" . .El .\" BACKUP .It Cm backup @@ -209,33 +209,42 @@ or write bootstrap code into a partition (using .Fl p Ar partcode and .Fl i Ar index ) . +.Pp +The +.Cm bootcode +command accepts these options: +.Bl -tag -width 10n +.It Fl b Ar bootcode +Embed bootstrap code from the file +.Ar bootcode +into the partitioning scheme's metadata for +.Ar geom . Not all partitioning schemes have embedded bootstrap code, so the .Fl b Ar bootcode option is scheme-specific in nature (see the section entitled .Sx BOOTSTRAPPING below). The -.Fl b Ar bootcode -option specifies a file that contains the bootstrap code. -The contents and size of the file are determined by the partitioning -scheme. -The -.Fl p Ar partcode -option specifies a file that contains the bootstrap code intended to be -written to a partition. -The partition is specified by the -.Fl i Ar index -option. -The size of the file must be smaller than the size of the partition. -.Pp -Additional options include: -.Bl -tag -width 10n +.Ar bootcode +file must match the partitioning scheme's requirements for file content +and size. .It Fl f Ar flags Additional operational flags. See the section entitled .Sx "OPERATIONAL FLAGS" below for a discussion about its use. +.It Fl i Ar index +Specify the target partition for +.Fl p Ar partcode . +.It Fl p Ar partcode +Write the bootstrap code from the file +.Ar partcode +into the +.Ar geom +partition specified by +.Fl i Ar index . +The size of the file must be smaller than the size of the partition. .El .\" COMMIT .It Cm commit @@ -256,13 +265,13 @@ action will write all pending changes to disk. .It Cm create Create a new partitioning scheme on a provider given by .Ar provider . -The +The scheme to use must be specified with the .Fl s Ar scheme -option determines the scheme to use. -The kernel must have support for a particular scheme before -that scheme can be used to partition a disk. +option. .Pp -Additional options include: +The +.Cm create +command accepts these options: .Bl -tag -width 10n .It Fl f Ar flags Additional operational flags. @@ -279,6 +288,10 @@ Some schemes have a maximum equal to the minimum and s a maximum large enough to be considered unlimited. By default, partition tables are created with the minimum number of entries. +.It Fl s Ar scheme +Specify the partitioning scheme to use. +The kernel must have support for a particular scheme before +that scheme can be used to partition a disk. .El .\"
svn commit: r333487 - head/sbin/geom/class/part
Author: emaste Date: Fri May 11 12:57:25 2018 New Revision: 333487 URL: https://svnweb.freebsd.org/changeset/base/333487 Log: gpart.8: sort suboptions per mdoc(7) Alphabetical order, uppercase before lowercase for each letter and with no regard to whether an option takes an argument. Sponsored by: The FreeBSD Foundation Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 == --- head/sbin/geom/class/part/gpart.8 Fri May 11 08:56:39 2018 (r333486) +++ head/sbin/geom/class/part/gpart.8 Fri May 11 12:57:25 2018 (r333487) @@ -178,6 +178,12 @@ offset and partition to be multiple of .Ar alignment value. +.It Fl f Ar flags +Additional operational flags. +See the section entitled +.Sx "OPERATIONAL FLAGS" +below for a discussion +about its use. .It Fl i Ar index The index in the partition table at which the new partition is to be placed. @@ -187,12 +193,6 @@ to represent the partition. The label attached to the partition. This option is only valid when used on partitioning schemes that support partition labels. -.It Fl f Ar flags -Additional operational flags. -See the section entitled -.Sx "OPERATIONAL FLAGS" -below for a discussion -about its use. .El .\" BACKUP .It Cm backup @@ -264,6 +264,12 @@ that scheme can be used to partition a disk. .Pp Additional options include: .Bl -tag -width 10n +.It Fl f Ar flags +Additional operational flags. +See the section entitled +.Sx "OPERATIONAL FLAGS" +below for a discussion +about its use. .It Fl n Ar entries The number of entries in the partition table. Every partitioning scheme has a minimum and maximum number of entries. @@ -273,12 +279,6 @@ Some schemes have a maximum equal to the minimum and s a maximum large enough to be considered unlimited. By default, partition tables are created with the minimum number of entries. -.It Fl f Ar flags -Additional operational flags. -See the section entitled -.Sx "OPERATIONAL FLAGS" -below for a discussion -about its use. .El .\" DELETE .It Cm delete @@ -407,14 +407,14 @@ Additional options include: Destroy partition table on the given .Ar provider before doing restore. -.It Fl l -Restore partition labels for partitioning schemes that support them. .It Fl f Ar flags Additional operational flags. See the section entitled .Sx "OPERATIONAL FLAGS" below for a discussion about its use. +.It Fl l +Restore partition labels for partitioning schemes that support them. .El .\" SET .It Cm set ___ 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: r333461 - head/sys/amd64/amd64
On Thu, May 10, 2018 at 10:17:06PM -0400, Ed Maste wrote: > On 10 May 2018 at 15:38, Konstantin Belousovwrote: > > > > Yes, I already noted and mjg noted that ifuncs are directed through PLT. > > I remember that it was not the case when I did it the first time, but then > > both compiler and linker were different. > > I'm trying to find evidence of non-PLT ifuncs, but have been > unsuccessful so far. > > >From ifunc.txt at https://sites.google.com/site/x32abi/documents: > | All references to a STT_GNU_IFUNC symbol, including function call and > | function pointer, will go through a PLT slot, which jumps to the address > | stored in the GOT entry. If the STT_GNU_IFUNC symbol is locally defined, > | a R_*_IRELATIVE relocation will be applied to the GOT entry at load time. > | Otherwise, dynamic linker will lookup the symbol at the first call to the > | function and update the GOT entry. This applies to all usages of > | STT_GNU_IFUNC symbols in shared library, dynamic executable and static > | executable. I very well can misremember. I suspect that I could have looked at the amd64 modules, which are not finally linked. This would explain it. ___ 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: r333482 - head/usr.bin/expand
On Fri, 11 May 2018, Eitan Adler wrote: Log: [expand] add __dead2 annotation to usage Declaring static functions as __dead2 has no good effect, but reduces portability and is a style bug. Compilers have always been able to see inside static functions and determine if they return. Primitive compilers might not see forward functions, and now clang doesn't even support the -fno-unit-at-a-time flag which is needed for turning off excessive forwarding. __dead2 might be useful for primitive code analysis tools like lint, but lint in FreeBSD never understood any attributes, and even lint always read full files, so it only needed special help with extern functions whose source is not visible. In /usr/src/bin, in 4.4BSD, there are no instances of this style bug for static functions. Howver, 4.4BSD is not careful to declare functions as static, and it has the worse style bugs for the usage() in the following programs: - sbin/route/route.c: this declares usage() as implicit-extern and bogusly declares the function as __dead, and also helps lint by /* NOTREACH */ after the function usages exit() to not return. 4.4BSD also isn't careful about prototypes. No function in route.c has a prototype. Most functions in route.c are forward-declared, but usage() has the style bug of being placed before main() so that it doesn't need a forward declaration. So its __dead declaration has no effect even with -fno-unit-at-a-time. __dead is the gcc-1 spelling of __dead2. gcc-1 doesn't need it provided exit() is declared as __dead, which it is in 4.4BSD. - usr.bin/rlogin/rlogin.c: usage() is implicit-extern and forward-declared, and even has a prototype using __P(()). Its definition is also declared as __dead. In gcc-1, __dead isn't an attribute (since gcc-1 doesn't support attributes), but is the volatile keyword invalidly overloaded. Perhaps the function definition needs to have the same qualifiers as the forward declaration, but in general C has the opposite problem with types for functions -- function declarations can be built up from incomplete declarations to obfuscate what the combined qualifiers/types are are. - usr.bin/touch/touch.c: like rlogin except usage() is forward-declared with a prototype using __P(()) and the function definition doesn't have /* NOTREACHED */. __dead is bogusly attached to the function definition where it has no effect. That is all instances of __dead for usage() in /usr/*bin in 4.4BSD. There are only about 10 other commands that use __dead for other functions. Some of these uses are actually correct, since they are for extern functions in header files. FreeBSD has expanded this style bug only a little. In /usr/src/bin, there about 39 programs, but there are only 19 instances of __dead2 and only 3 instances of the style bug for static usage() (for cat, hostname and realpath). stty has an example of correct use of __dead2 usage() (when usage() is extern and prototyped in a header file. Of the other 15 instances, 7 are correct (for extern functions) and 8 are style bugs (for static functions). Most of the bugs are in bin/sh. Some of these instances expand the bugs by misplacing __dead2 before the function name. This is a style bug at best, and might be a syntax error for old versions of gcc. gcc-1 had to place __dead first since it was a qualifier, and this couldn't just be changed to an attribute since gcc-2 didn't allow attributes there, so __dead2 was placed at the end of the declaration. Some of these instances also add other attributes like __printflike() to forward declarations. I don't know if compilers look deeply enough into function definitions to see such attributes there. I guess that they don't for __printflike() and other complicated attributes. Even after inlining everything, it is hard to see if the inlined block implements attributes as specified by _printflike(). Parts of the block might inherit attributes by calling vfprintf(), but other parts might do things like 'switch (*fmt)' as in the implementation of vfprintf(), and understanding that requires a deep analysis. FreeBSD has expanded on this style bug by sometimes spelling __dead2 as _Noreturn and misplacing this before the function name. This is used mainly to add style bugs to header files. 3 style bugs in most places: - rename __dead2 to _Noreturn - place it before function names where it is syntactically incorrect for old compilers - misformat it there. In /usr/src/bin, there is only 1 instance of a case-sensitive noreturn. This is in pkill, where FreeBSD macros to hide unportabilities are not even used. Instead, the attribute is hard-coded as __attribute__((__noreturn__)). This is the only instance in src/bin of the style and portability bug of using hard-coded __attribute__(()). Bruce ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe,
Re: svn commit: r333436 - in head/etc: etc.aarch64 etc.amd64 etc.arm etc.i386 etc.powerpc etc.riscv etc.sparc64
Warner Loshwrites: > Log: > For video consoles, only launch a getty if the device exists. > > Differential Revision: https://reviews.freebsd.org/D15169 I think it might also be time to remove the (commented-out) ttyv8 entry. Modern greeters run as services. DES -- Dag-Erling Smørgrav - d...@des.no ___ 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: r333461 - head/sys/amd64/amd64
On Thu, May 10, 2018 at 07:57:03PM -0700, Conrad Meyer wrote: > On Thu, May 10, 2018 at 8:01 AM, Konstantin Belousovwrote: > > Author: kib > > Date: Thu May 10 15:01:43 2018 > > New Revision: 333461 > > URL: https://svnweb.freebsd.org/changeset/base/333461 > > > > Log: > > Make fpusave() and fpurestore() on amd64 ifuncs. > > > > From now on, linking amd64 kernel requires either lld or newer ld.bfd. > > Hi, > > This commit seems to break amd64-gcc cross toolchain build (note, this > is a cc error, not ld): > > In file included from /usr/src/sys/amd64/amd64/fpu.c:64:0: > /usr/src/sys/amd64/amd64/fpu.c:195:22: error: ifunc is not supported > on this target > DEFINE_IFUNC(, void, fpusave, (void *), static) > ^ > ./x86/ifunc.h:55:19: note: in definition of macro 'DEFINE_IFUNC' > qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \ >^~~~ > /usr/src/sys/amd64/amd64/fpu.c:202:22: error: ifunc is not supported > on this target > DEFINE_IFUNC(, void, fpurestore, (void *), static) > ^ > ./x86/ifunc.h:55:19: note: in definition of macro 'DEFINE_IFUNC' > qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \ >^~~~ > --- fpu.o --- > *** [fpu.o] Error code 1 On FreeBSD, gcc configuration requires explicit --enable-gnu-indirect-function option. I see it in e.g. lang/gcc7 port Makefile. On the other hand, I do not understand how devel/amd64-xtoolchain-gcc and devel/powerpc64-xtoolchain-gcc are build, so cannot see whether the switch is added to the configure invocation. But I suspect that it is not. In other words, most likely the problem is due to the port itself. ___ 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: r333486 - head/sys/conf
Author: mjg Date: Fri May 11 08:56:39 2018 New Revision: 333486 URL: https://svnweb.freebsd.org/changeset/base/333486 Log: amd64: align the .data.exclusive_cache_line section to 128 This aligns the section itself compared to other sections, does not change internal alignment of fields stored inside. This may or may not come later. The motivation is partially combating adverse effects of the adjacent cache line prefetcher. Without the annotation part of read_mostly section was on the line of fire. Modified: head/sys/conf/ldscript.amd64 Modified: head/sys/conf/ldscript.amd64 == --- head/sys/conf/ldscript.amd64Fri May 11 08:16:56 2018 (r333485) +++ head/sys/conf/ldscript.amd64Fri May 11 08:56:39 2018 (r333486) @@ -155,12 +155,12 @@ SECTIONS { *(.data.read_mostly) } - . = ALIGN(64); + . = ALIGN(128); .data.exclusive_cache_line : { *(.data.exclusive_cache_line) } - . = ALIGN(64); + . = ALIGN(128); .data : { *(.data .data.* .gnu.linkonce.d.*) ___ 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: r333485 - head/sys/kern
Author: mmacy Date: Fri May 11 08:16:56 2018 New Revision: 333485 URL: https://svnweb.freebsd.org/changeset/base/333485 Log: epoch(9): callback task fixes - initialize the pcpu STAILQ in the NUMA case - don't enqueue the callback task if there isn't sufficient work to be done Reported by: pho@ Approved by: sbruno@ Modified: head/sys/kern/subr_epoch.c Modified: head/sys/kern/subr_epoch.c == --- head/sys/kern/subr_epoch.c Fri May 11 07:04:57 2018(r333484) +++ head/sys/kern/subr_epoch.c Fri May 11 08:16:56 2018(r333485) @@ -108,6 +108,8 @@ struct epoch { int e_flags; /* make sure that immutable data doesn't overlap with the gtask, callout, and mutex*/ struct epoch_pcpu_state *e_pcpu_dom[MAXMEMDOM] __aligned(EPOCH_ALIGN); + counter_u64_t e_frees; + uint64_t e_free_last; struct epoch_pcpu_state *e_pcpu[0]; }; @@ -172,6 +174,7 @@ epoch_init_numa(epoch_t epoch) for (int i = 0; i < domcount[domain]; i++, eps++) { epoch->e_pcpu[cpu_offset + i] = eps; er = >eps_record; + STAILQ_INIT(>eps_cblist); ck_epoch_register(>e_epoch, >er_record, NULL); TAILQ_INIT((struct threadlist *)(uintptr_t)>er_tdlist); er->er_cpuid = cpu_offset + i; @@ -201,9 +204,15 @@ static void epoch_callout(void *arg) { epoch_t epoch; + uint64_t frees; epoch = arg; - GROUPTASK_ENQUEUE(>e_gtask); + frees = counter_u64_fetch(epoch->e_frees); + /* pick some better value */ + if (frees - epoch->e_free_last > 10) { + GROUPTASK_ENQUEUE(>e_gtask); + epoch->e_free_last = frees; + } if ((epoch->e_flags & EPOCH_EXITING) == 0) callout_reset(>e_timer, poll_intvl, epoch_callout, epoch); } @@ -218,6 +227,7 @@ epoch_alloc(void) epoch = malloc(sizeof(struct epoch) + mp_ncpus*sizeof(void*), M_EPOCH, M_ZERO|M_WAITOK); ck_epoch_init(>e_epoch); + epoch->e_frees = counter_u64_alloc(M_WAITOK); mtx_init(>e_lock, "epoch callout", NULL, MTX_DEF); callout_init_mtx(>e_timer, >e_lock, 0); taskqgroup_config_gtask_init(epoch, >e_gtask, epoch_call_task, "epoch call task"); @@ -252,6 +262,7 @@ epoch_free(epoch_t epoch) gtaskqueue_drain(epoch->e_gtask.gt_taskqueue, >e_gtask.gt_task); callout_drain(>e_timer); mtx_destroy(>e_lock); + counter_u64_free(epoch->e_frees); taskqgroup_config_gtask_deinit(>e_gtask); if (usedomains) for (domain = 0; domain < vm_ndomains; domain++) @@ -534,6 +545,7 @@ epoch_call(epoch_t epoch, epoch_context_t ctx, void (* MPASS(epoch); MPASS(callback); cb->ec_callback = callback; + counter_u64_add(epoch->e_frees, 1); critical_enter(); eps = epoch->e_pcpu[curcpu]; STAILQ_INSERT_HEAD(>eps_cblist, cb, ec_link); ___ 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: r333480 - head/sys/kern
Weird. Try tha. @@ -172,6 +174,7 @@ epoch_init_numa(epoch_t epoch) for (int i = 0; i < domcount[domain]; i++, eps++) { epoch->e_pcpu[cpu_offset + i] = eps; er = >eps_record; + STAILQ_INIT(>eps_cblist); ck_epoch_register(>e_epoch, >er_record, NULL); TAILQ_INIT((struct threadlist *)(uintptr_t)>er_tdlist); er->er_cpuid = cpu_offset + i; On Fri, May 11, 2018 at 12:49 AM, Peter Holmwrote: > On Fri, May 11, 2018 at 12:36:40AM -0700, Matthew Macy wrote: >> - How many cores? How many sockets? >> - Any special config options other than DIAGNOSTIC? >> > > CPU: Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz (1995.24-MHz K8-class CPU) > Origin="GenuineIntel" Id=0x206d7 Family=0x6 Model=0x2d Stepping=7 > > Features=0xbfebfbff > > Features2=0x1fbee3ff > AMD Features=0x2c100800 > AMD Features2=0x1 > XSAVE Features=0x1 > VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID > TSC: P-state invariant, performance statistics > real memory = 68719476736 (65536 MB) > avail memory = 66740162560 (63648 MB) > Event timer "LAPIC" quality 600 > ACPI APIC Table: > FreeBSD/SMP: Multiprocessor System Detected: 24 CPUs > FreeBSD/SMP: 2 package(s) x 6 core(s) x 2 hardware threads > > $ sed '/^#/d; /^$/d' < /usr/src/sys/amd64/conf/PHO > include GENERIC > ident PHO-GENERIC > options ALT_BREAK_TO_DEBUGGER > options SW_WATCHDOG > options DEBUG_LOCKS > options DEBUG_VFS_LOCKS > options DIAGNOSTIC > nooptions DEADLKRES # watchdogd handles this > options UFS_EXTATTR > options UFS_EXTATTR_AUTOSTART > $ > > - Peter > >> On Fri, May 11, 2018 at 12:29 AM, Matthew Macy wrote: >> > Yes. Can you give me the line number for epoch_call_task+0x7b >> > >> > >> > On Fri, May 11, 2018 at 12:18 AM, Peter Holm wrote: >> >> On Fri, May 11, 2018 at 04:54:13AM +, Matt Macy wrote: >> >>> Author: mmacy >> >>> Date: Fri May 11 04:54:12 2018 >> >>> New Revision: 333480 >> >>> URL: https://svnweb.freebsd.org/changeset/base/333480 >> >>> >> >>> Log: >> >>> epoch(9): fix priority handling, make callback lists pcpu, and other >> >>> fixes >> >>> >> >>> - Lend priority to preempted threads in epoch_wait to handle the case >> >>> in which we've had priority lent to us. Previously we borrowed the >> >>> priority of the lowest priority preempted thread. (pointed out by >> >>> mjg@) >> >>> >> >>> - Don't attempt allocate memory per-domain on powerpc, we don't >> >>> currently >> >>> handle empty sockets (as is the case on jhibbits Talos' board). >> >>> >> >>> - Handle deferred callbacks as pcpu lists and poll the lists >> >>> periodically. >> >>> Currently the interval is 1/hz. >> >>> >> >>> - Drop the thread lock when adaptive spinning. Holding the lock starves >> >>> other threads and can even lead to lockups. >> >>> >> >>> - Keep a generation count pcpu so that we don't keep spining if a >> >>> thread >> >>> has left and re-entered an epoch section. >> >>> >> >>> - Actually removed the callback from the callback list so that we don't >> >>> double free. Sigh ... >> >>> >> >>> Approved by:sbruno@ >> >>> >> >>> Modified: >> >>> head/sys/kern/subr_epoch.c >> >>> >> >>> Modified: head/sys/kern/subr_epoch.c >> >>> == >> >>> --- head/sys/kern/subr_epoch.cFri May 11 04:47:05 2018 >> >>> (r333479) >> >> >> >> Could this be yours? >> >> >> >> cd0: Attempt to query device size failed: NOT READY, Medium not present - >> >> tray closed >> >> WARNING: WITNESS option enabled, expect reduced performance. >> >> WARNING: DIAGNOSTIC option enabled, expect reduced performance. >> >> Trying to mount root from ufs:/dev/da0p2 [rw]... >> >> Expensive timeout(9) function: 0x809f20d0(0x81af5140) >> >> 0.006730830 s >> >> uhub1: 4 ports with 4 removable, self powered >> >> kernel trap 12 with interrupts disabled >> >> >> >> >> >> Fatal trap 12: page fault while in kernel mode >> >> cpuid = 12; apic id = 20 >> >> fault virtual address = 0x100 >> >> fault code = supervisor read data, page not present >> >> instruction pointer = 0x20:0x80bb68db >> >> stack pointer = 0x0:0xfe4e19b0 >> >> frame pointer = 0x0:0xfe4e19f0 >> >> code segment= base 0x0, limit 0xf, type 0x1b >> >> = DPL 0, pres 1, long 1, def32 0, gran 1 >> >> processor eflags=
Re: svn commit: r333480 - head/sys/kern
On Fri, May 11, 2018 at 12:36:40AM -0700, Matthew Macy wrote: > - How many cores? How many sockets? > - Any special config options other than DIAGNOSTIC? > CPU: Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz (1995.24-MHz K8-class CPU) Origin="GenuineIntel" Id=0x206d7 Family=0x6 Model=0x2d Stepping=7 Features=0xbfebfbffFeatures2=0x1fbee3ff AMD Features=0x2c100800 AMD Features2=0x1 XSAVE Features=0x1 VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID TSC: P-state invariant, performance statistics real memory = 68719476736 (65536 MB) avail memory = 66740162560 (63648 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 24 CPUs FreeBSD/SMP: 2 package(s) x 6 core(s) x 2 hardware threads $ sed '/^#/d; /^$/d' < /usr/src/sys/amd64/conf/PHO include GENERIC ident PHO-GENERIC options ALT_BREAK_TO_DEBUGGER options SW_WATCHDOG options DEBUG_LOCKS options DEBUG_VFS_LOCKS options DIAGNOSTIC nooptions DEADLKRES # watchdogd handles this options UFS_EXTATTR options UFS_EXTATTR_AUTOSTART $ - Peter > On Fri, May 11, 2018 at 12:29 AM, Matthew Macy wrote: > > Yes. Can you give me the line number for epoch_call_task+0x7b > > > > > > On Fri, May 11, 2018 at 12:18 AM, Peter Holm wrote: > >> On Fri, May 11, 2018 at 04:54:13AM +, Matt Macy wrote: > >>> Author: mmacy > >>> Date: Fri May 11 04:54:12 2018 > >>> New Revision: 333480 > >>> URL: https://svnweb.freebsd.org/changeset/base/333480 > >>> > >>> Log: > >>> epoch(9): fix priority handling, make callback lists pcpu, and other > >>> fixes > >>> > >>> - Lend priority to preempted threads in epoch_wait to handle the case > >>> in which we've had priority lent to us. Previously we borrowed the > >>> priority of the lowest priority preempted thread. (pointed out by > >>> mjg@) > >>> > >>> - Don't attempt allocate memory per-domain on powerpc, we don't > >>> currently > >>> handle empty sockets (as is the case on jhibbits Talos' board). > >>> > >>> - Handle deferred callbacks as pcpu lists and poll the lists > >>> periodically. > >>> Currently the interval is 1/hz. > >>> > >>> - Drop the thread lock when adaptive spinning. Holding the lock starves > >>> other threads and can even lead to lockups. > >>> > >>> - Keep a generation count pcpu so that we don't keep spining if a thread > >>> has left and re-entered an epoch section. > >>> > >>> - Actually removed the callback from the callback list so that we don't > >>> double free. Sigh ... > >>> > >>> Approved by:sbruno@ > >>> > >>> Modified: > >>> head/sys/kern/subr_epoch.c > >>> > >>> Modified: head/sys/kern/subr_epoch.c > >>> == > >>> --- head/sys/kern/subr_epoch.cFri May 11 04:47:05 2018 > >>> (r333479) > >> > >> Could this be yours? > >> > >> cd0: Attempt to query device size failed: NOT READY, Medium not present - > >> tray closed > >> WARNING: WITNESS option enabled, expect reduced performance. > >> WARNING: DIAGNOSTIC option enabled, expect reduced performance. > >> Trying to mount root from ufs:/dev/da0p2 [rw]... > >> Expensive timeout(9) function: 0x809f20d0(0x81af5140) > >> 0.006730830 s > >> uhub1: 4 ports with 4 removable, self powered > >> kernel trap 12 with interrupts disabled > >> > >> > >> Fatal trap 12: page fault while in kernel mode > >> cpuid = 12; apic id = 20 > >> fault virtual address = 0x100 > >> fault code = supervisor read data, page not present > >> instruction pointer = 0x20:0x80bb68db > >> stack pointer = 0x0:0xfe4e19b0 > >> frame pointer = 0x0:0xfe4e19f0 > >> code segment= base 0x0, limit 0xf, type 0x1b > >> = DPL 0, pres 1, long 1, def32 0, gran 1 > >> processor eflags= resume, IOPL = 0 > >> current process = 0 (config_0) > >> [ thread pid 0 tid 100081 ] > >> Stopped at epoch_call_task+0x7b: movqll+0xdf(%rax),%rcx > >> db> show registers > >> cs0x20 > >> ds0x3b ll+0x1a > >> es0x3b ll+0x1a > >> fs0x13 > >> gs0x1b > >> ss 0 > >> rax 0 > >> rcx 0x858 ll+0x837 > >> rdx 0x812f6968 > >> rbx0xc > >> rsp 0xfe4e19b0 > >> rbp 0xfe4e19f0 > >> rsi 0x14 > >> rdi
Re: svn commit: r333480 - head/sys/kern
On Fri, May 11, 2018 at 12:29:30AM -0700, Matthew Macy wrote: > Yes. Can you give me the line number for epoch_call_task+0x7b > (kgdb) l *epoch_call_task+0x7b 0x80bb68db is in epoch_call_task (/usr/src/sys/kern/subr_epoch.c:560). 555 td = curthread; 556 thread_lock(td); 557 CPU_FOREACH(cpu) { 558 sched_bind(td, cpu); 559 eps = epoch->e_pcpu[cpu]; 560 if (!STAILQ_EMPTY(>eps_cblist)) 561 STAILQ_CONCAT(_head, >eps_cblist); 562 } 563 sched_unbind(td); 564 thread_unlock(td); (kgdb) - Peter > > On Fri, May 11, 2018 at 12:18 AM, Peter Holmwrote: > > On Fri, May 11, 2018 at 04:54:13AM +, Matt Macy wrote: > >> Author: mmacy > >> Date: Fri May 11 04:54:12 2018 > >> New Revision: 333480 > >> URL: https://svnweb.freebsd.org/changeset/base/333480 > >> > >> Log: > >> epoch(9): fix priority handling, make callback lists pcpu, and other > >> fixes > >> > >> - Lend priority to preempted threads in epoch_wait to handle the case > >> in which we've had priority lent to us. Previously we borrowed the > >> priority of the lowest priority preempted thread. (pointed out by mjg@) > >> > >> - Don't attempt allocate memory per-domain on powerpc, we don't currently > >> handle empty sockets (as is the case on jhibbits Talos' board). > >> > >> - Handle deferred callbacks as pcpu lists and poll the lists > >> periodically. > >> Currently the interval is 1/hz. > >> > >> - Drop the thread lock when adaptive spinning. Holding the lock starves > >> other threads and can even lead to lockups. > >> > >> - Keep a generation count pcpu so that we don't keep spining if a thread > >> has left and re-entered an epoch section. > >> > >> - Actually removed the callback from the callback list so that we don't > >> double free. Sigh ... > >> > >> Approved by:sbruno@ > >> > >> Modified: > >> head/sys/kern/subr_epoch.c > >> > >> Modified: head/sys/kern/subr_epoch.c > >> == > >> --- head/sys/kern/subr_epoch.cFri May 11 04:47:05 2018 > >> (r333479) > > > > Could this be yours? > > > > cd0: Attempt to query device size failed: NOT READY, Medium not present - > > tray closed > > WARNING: WITNESS option enabled, expect reduced performance. > > WARNING: DIAGNOSTIC option enabled, expect reduced performance. > > Trying to mount root from ufs:/dev/da0p2 [rw]... > > Expensive timeout(9) function: 0x809f20d0(0x81af5140) > > 0.006730830 s > > uhub1: 4 ports with 4 removable, self powered > > kernel trap 12 with interrupts disabled > > > > > > Fatal trap 12: page fault while in kernel mode > > cpuid = 12; apic id = 20 > > fault virtual address = 0x100 > > fault code = supervisor read data, page not present > > instruction pointer = 0x20:0x80bb68db > > stack pointer = 0x0:0xfe4e19b0 > > frame pointer = 0x0:0xfe4e19f0 > > code segment= base 0x0, limit 0xf, type 0x1b > > = DPL 0, pres 1, long 1, def32 0, gran 1 > > processor eflags= resume, IOPL = 0 > > current process = 0 (config_0) > > [ thread pid 0 tid 100081 ] > > Stopped at epoch_call_task+0x7b: movqll+0xdf(%rax),%rcx > > db> show registers > > cs0x20 > > ds0x3b ll+0x1a > > es0x3b ll+0x1a > > fs0x13 > > gs0x1b > > ss 0 > > rax 0 > > rcx 0x858 ll+0x837 > > rdx 0x812f6968 > > rbx0xc > > rsp 0xfe4e19b0 > > rbp 0xfe4e19f0 > > rsi 0x14 > > rdi 0 > > r8 0xf800038f3000 > > r9 0x81ff1620 vmspace0+0x130 > > r10 0xf800038f3000 > > r11 0x40 ll+0x1f > > r12 0xfe4e19b8 > > r130xc > > r14 0xf8001f0ed400 > > r15 0xf800038f3000 > > rip 0x80bb68db epoch_call_task+0x7b > > rflags 0x10086 > > epoch_call_task+0x7b: movqll+0xdf(%rax),%rcx > > db> bt > > Tracing pid 0 tid 100081 td 0xf800038f3000 > > epoch_call_task() at epoch_call_task+0x7b/frame 0xfe4e19f0 > > gtaskqueue_run_locked() at gtaskqueue_run_locked+0x139/frame > > 0xfe4e1a40 > > gtaskqueue_thread_loop() at gtaskqueue_thread_loop+0x88/frame > > 0xfe4e1a70 > > fork_exit() at fork_exit+0x84/frame 0xfe4e1ab0 > > fork_trampoline() at fork_trampoline+0xe/frame 0xfe4e1ab0 > > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > > db> x/s version > > version:FreeBSD 12.0-CURRENT
Re: svn commit: r333480 - head/sys/kern
- How many cores? How many sockets? - Any special config options other than DIAGNOSTIC? On Fri, May 11, 2018 at 12:29 AM, Matthew Macywrote: > Yes. Can you give me the line number for epoch_call_task+0x7b > > > On Fri, May 11, 2018 at 12:18 AM, Peter Holm wrote: >> On Fri, May 11, 2018 at 04:54:13AM +, Matt Macy wrote: >>> Author: mmacy >>> Date: Fri May 11 04:54:12 2018 >>> New Revision: 333480 >>> URL: https://svnweb.freebsd.org/changeset/base/333480 >>> >>> Log: >>> epoch(9): fix priority handling, make callback lists pcpu, and other fixes >>> >>> - Lend priority to preempted threads in epoch_wait to handle the case >>> in which we've had priority lent to us. Previously we borrowed the >>> priority of the lowest priority preempted thread. (pointed out by mjg@) >>> >>> - Don't attempt allocate memory per-domain on powerpc, we don't currently >>> handle empty sockets (as is the case on jhibbits Talos' board). >>> >>> - Handle deferred callbacks as pcpu lists and poll the lists periodically. >>> Currently the interval is 1/hz. >>> >>> - Drop the thread lock when adaptive spinning. Holding the lock starves >>> other threads and can even lead to lockups. >>> >>> - Keep a generation count pcpu so that we don't keep spining if a thread >>> has left and re-entered an epoch section. >>> >>> - Actually removed the callback from the callback list so that we don't >>> double free. Sigh ... >>> >>> Approved by:sbruno@ >>> >>> Modified: >>> head/sys/kern/subr_epoch.c >>> >>> Modified: head/sys/kern/subr_epoch.c >>> == >>> --- head/sys/kern/subr_epoch.cFri May 11 04:47:05 2018 >>> (r333479) >> >> Could this be yours? >> >> cd0: Attempt to query device size failed: NOT READY, Medium not present - >> tray closed >> WARNING: WITNESS option enabled, expect reduced performance. >> WARNING: DIAGNOSTIC option enabled, expect reduced performance. >> Trying to mount root from ufs:/dev/da0p2 [rw]... >> Expensive timeout(9) function: 0x809f20d0(0x81af5140) >> 0.006730830 s >> uhub1: 4 ports with 4 removable, self powered >> kernel trap 12 with interrupts disabled >> >> >> Fatal trap 12: page fault while in kernel mode >> cpuid = 12; apic id = 20 >> fault virtual address = 0x100 >> fault code = supervisor read data, page not present >> instruction pointer = 0x20:0x80bb68db >> stack pointer = 0x0:0xfe4e19b0 >> frame pointer = 0x0:0xfe4e19f0 >> code segment= base 0x0, limit 0xf, type 0x1b >> = DPL 0, pres 1, long 1, def32 0, gran 1 >> processor eflags= resume, IOPL = 0 >> current process = 0 (config_0) >> [ thread pid 0 tid 100081 ] >> Stopped at epoch_call_task+0x7b: movqll+0xdf(%rax),%rcx >> db> show registers >> cs0x20 >> ds0x3b ll+0x1a >> es0x3b ll+0x1a >> fs0x13 >> gs0x1b >> ss 0 >> rax 0 >> rcx 0x858 ll+0x837 >> rdx 0x812f6968 >> rbx0xc >> rsp 0xfe4e19b0 >> rbp 0xfe4e19f0 >> rsi 0x14 >> rdi 0 >> r8 0xf800038f3000 >> r9 0x81ff1620 vmspace0+0x130 >> r10 0xf800038f3000 >> r11 0x40 ll+0x1f >> r12 0xfe4e19b8 >> r130xc >> r14 0xf8001f0ed400 >> r15 0xf800038f3000 >> rip 0x80bb68db epoch_call_task+0x7b >> rflags 0x10086 >> epoch_call_task+0x7b: movqll+0xdf(%rax),%rcx >> db> bt >> Tracing pid 0 tid 100081 td 0xf800038f3000 >> epoch_call_task() at epoch_call_task+0x7b/frame 0xfe4e19f0 >> gtaskqueue_run_locked() at gtaskqueue_run_locked+0x139/frame >> 0xfe4e1a40 >> gtaskqueue_thread_loop() at gtaskqueue_thread_loop+0x88/frame >> 0xfe4e1a70 >> fork_exit() at fork_exit+0x84/frame 0xfe4e1ab0 >> fork_trampoline() at fork_trampoline+0xe/frame 0xfe4e1ab0 >> --- trap 0, rip = 0, rsp = 0, rbp = 0 --- >> db> x/s version >> version:FreeBSD 12.0-CURRENT #0 r333481: Fri May 11 09:08:40 CEST >> 2018\012p...@t2.osted.lan:/usr/obj/usr/src/amd64.amd64/sys/PHO\012 >> db> >> >> - Peter ___ 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: r333480 - head/sys/kern
Yes. Can you give me the line number for epoch_call_task+0x7b On Fri, May 11, 2018 at 12:18 AM, Peter Holmwrote: > On Fri, May 11, 2018 at 04:54:13AM +, Matt Macy wrote: >> Author: mmacy >> Date: Fri May 11 04:54:12 2018 >> New Revision: 333480 >> URL: https://svnweb.freebsd.org/changeset/base/333480 >> >> Log: >> epoch(9): fix priority handling, make callback lists pcpu, and other fixes >> >> - Lend priority to preempted threads in epoch_wait to handle the case >> in which we've had priority lent to us. Previously we borrowed the >> priority of the lowest priority preempted thread. (pointed out by mjg@) >> >> - Don't attempt allocate memory per-domain on powerpc, we don't currently >> handle empty sockets (as is the case on jhibbits Talos' board). >> >> - Handle deferred callbacks as pcpu lists and poll the lists periodically. >> Currently the interval is 1/hz. >> >> - Drop the thread lock when adaptive spinning. Holding the lock starves >> other threads and can even lead to lockups. >> >> - Keep a generation count pcpu so that we don't keep spining if a thread >> has left and re-entered an epoch section. >> >> - Actually removed the callback from the callback list so that we don't >> double free. Sigh ... >> >> Approved by:sbruno@ >> >> Modified: >> head/sys/kern/subr_epoch.c >> >> Modified: head/sys/kern/subr_epoch.c >> == >> --- head/sys/kern/subr_epoch.cFri May 11 04:47:05 2018 >> (r333479) > > Could this be yours? > > cd0: Attempt to query device size failed: NOT READY, Medium not present - > tray closed > WARNING: WITNESS option enabled, expect reduced performance. > WARNING: DIAGNOSTIC option enabled, expect reduced performance. > Trying to mount root from ufs:/dev/da0p2 [rw]... > Expensive timeout(9) function: 0x809f20d0(0x81af5140) > 0.006730830 s > uhub1: 4 ports with 4 removable, self powered > kernel trap 12 with interrupts disabled > > > Fatal trap 12: page fault while in kernel mode > cpuid = 12; apic id = 20 > fault virtual address = 0x100 > fault code = supervisor read data, page not present > instruction pointer = 0x20:0x80bb68db > stack pointer = 0x0:0xfe4e19b0 > frame pointer = 0x0:0xfe4e19f0 > code segment= base 0x0, limit 0xf, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags= resume, IOPL = 0 > current process = 0 (config_0) > [ thread pid 0 tid 100081 ] > Stopped at epoch_call_task+0x7b: movqll+0xdf(%rax),%rcx > db> show registers > cs0x20 > ds0x3b ll+0x1a > es0x3b ll+0x1a > fs0x13 > gs0x1b > ss 0 > rax 0 > rcx 0x858 ll+0x837 > rdx 0x812f6968 > rbx0xc > rsp 0xfe4e19b0 > rbp 0xfe4e19f0 > rsi 0x14 > rdi 0 > r8 0xf800038f3000 > r9 0x81ff1620 vmspace0+0x130 > r10 0xf800038f3000 > r11 0x40 ll+0x1f > r12 0xfe4e19b8 > r130xc > r14 0xf8001f0ed400 > r15 0xf800038f3000 > rip 0x80bb68db epoch_call_task+0x7b > rflags 0x10086 > epoch_call_task+0x7b: movqll+0xdf(%rax),%rcx > db> bt > Tracing pid 0 tid 100081 td 0xf800038f3000 > epoch_call_task() at epoch_call_task+0x7b/frame 0xfe4e19f0 > gtaskqueue_run_locked() at gtaskqueue_run_locked+0x139/frame > 0xfe4e1a40 > gtaskqueue_thread_loop() at gtaskqueue_thread_loop+0x88/frame > 0xfe4e1a70 > fork_exit() at fork_exit+0x84/frame 0xfe4e1ab0 > fork_trampoline() at fork_trampoline+0xe/frame 0xfe4e1ab0 > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > db> x/s version > version:FreeBSD 12.0-CURRENT #0 r333481: Fri May 11 09:08:40 CEST > 2018\012p...@t2.osted.lan:/usr/obj/usr/src/amd64.amd64/sys/PHO\012 > db> > > - Peter ___ 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: r333480 - head/sys/kern
On Fri, May 11, 2018 at 04:54:13AM +, Matt Macy wrote: > Author: mmacy > Date: Fri May 11 04:54:12 2018 > New Revision: 333480 > URL: https://svnweb.freebsd.org/changeset/base/333480 > > Log: > epoch(9): fix priority handling, make callback lists pcpu, and other fixes > > - Lend priority to preempted threads in epoch_wait to handle the case > in which we've had priority lent to us. Previously we borrowed the > priority of the lowest priority preempted thread. (pointed out by mjg@) > > - Don't attempt allocate memory per-domain on powerpc, we don't currently > handle empty sockets (as is the case on jhibbits Talos' board). > > - Handle deferred callbacks as pcpu lists and poll the lists periodically. > Currently the interval is 1/hz. > > - Drop the thread lock when adaptive spinning. Holding the lock starves > other threads and can even lead to lockups. > > - Keep a generation count pcpu so that we don't keep spining if a thread > has left and re-entered an epoch section. > > - Actually removed the callback from the callback list so that we don't > double free. Sigh ... > > Approved by:sbruno@ > > Modified: > head/sys/kern/subr_epoch.c > > Modified: head/sys/kern/subr_epoch.c > == > --- head/sys/kern/subr_epoch.cFri May 11 04:47:05 2018 > (r333479) Could this be yours? cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed WARNING: WITNESS option enabled, expect reduced performance. WARNING: DIAGNOSTIC option enabled, expect reduced performance. Trying to mount root from ufs:/dev/da0p2 [rw]... Expensive timeout(9) function: 0x809f20d0(0x81af5140) 0.006730830 s uhub1: 4 ports with 4 removable, self powered kernel trap 12 with interrupts disabled Fatal trap 12: page fault while in kernel mode cpuid = 12; apic id = 20 fault virtual address = 0x100 fault code = supervisor read data, page not present instruction pointer = 0x20:0x80bb68db stack pointer = 0x0:0xfe4e19b0 frame pointer = 0x0:0xfe4e19f0 code segment= base 0x0, limit 0xf, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags= resume, IOPL = 0 current process = 0 (config_0) [ thread pid 0 tid 100081 ] Stopped at epoch_call_task+0x7b: movqll+0xdf(%rax),%rcx db> show registers cs0x20 ds0x3b ll+0x1a es0x3b ll+0x1a fs0x13 gs0x1b ss 0 rax 0 rcx 0x858 ll+0x837 rdx 0x812f6968 rbx0xc rsp 0xfe4e19b0 rbp 0xfe4e19f0 rsi 0x14 rdi 0 r8 0xf800038f3000 r9 0x81ff1620 vmspace0+0x130 r10 0xf800038f3000 r11 0x40 ll+0x1f r12 0xfe4e19b8 r130xc r14 0xf8001f0ed400 r15 0xf800038f3000 rip 0x80bb68db epoch_call_task+0x7b rflags 0x10086 epoch_call_task+0x7b: movqll+0xdf(%rax),%rcx db> bt Tracing pid 0 tid 100081 td 0xf800038f3000 epoch_call_task() at epoch_call_task+0x7b/frame 0xfe4e19f0 gtaskqueue_run_locked() at gtaskqueue_run_locked+0x139/frame 0xfe4e1a40 gtaskqueue_thread_loop() at gtaskqueue_thread_loop+0x88/frame 0xfe4e1a70 fork_exit() at fork_exit+0x84/frame 0xfe4e1ab0 fork_trampoline() at fork_trampoline+0xe/frame 0xfe4e1ab0 --- trap 0, rip = 0, rsp = 0, rbp = 0 --- db> x/s version version:FreeBSD 12.0-CURRENT #0 r333481: Fri May 11 09:08:40 CEST 2018\012p...@t2.osted.lan:/usr/obj/usr/src/amd64.amd64/sys/PHO\012 db> - Peter ___ 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: r333484 - head/sys/vm
Author: mjg Date: Fri May 11 07:04:57 2018 New Revision: 333484 URL: https://svnweb.freebsd.org/changeset/base/333484 Log: uma: increase alignment to 128 bytes on amd64 Current UMA internals are not suited for efficient operation in multi-socket environments. In particular there is very common use of MAXCPU arrays and other fields which are not always properly aligned and are not local for target threads (apart from the first node of course). Turns out the existing UMA_ALIGN macro can be used to mostly work around the problem until the code get fixed. The current setting of 64 bytes runs into trouble when adjacent cache line prefetcher gets to work. An example 128-way benchmark doing a lot of malloc/frees has the following instruction samples: before: kernel`lf_advlockasync+0x43b32940 kernel`malloc+0xe542380 kernel`bzero+0x1947798 kernel`spinlock_exit+0x2660423 kernel`0x8078238 0x0 136947 kernel`uma_zfree_arg+0x46 159594 kernel`uma_zalloc_arg+0x672 180556 kernel`uma_zfree_arg+0x2a 459923 kernel`uma_zalloc_arg+0x5ec 489910 after: kernel`bzero+0xd46115 kernel`lf_advlockasync+0x25f46134 kernel`lf_advlockasync+0x38a49078 kernel`fget_unlocked+0xd149942 kernel`lf_advlockasync+0x43b55392 kernel`copyin+0x4a56963 kernel`bzero+0x1981983 kernel`spinlock_exit+0x2691889 kernel`0x80 136357 0x0 239424 See the review for more details. Reviewed by: kib Differential Revision:https://reviews.freebsd.org/D15346 Modified: head/sys/vm/uma_int.h Modified: head/sys/vm/uma_int.h == --- head/sys/vm/uma_int.h Fri May 11 06:59:54 2018(r333483) +++ head/sys/vm/uma_int.h Fri May 11 07:04:57 2018(r333484) @@ -177,7 +177,7 @@ struct uma_hash { * align field or structure to cache line */ #if defined(__amd64__) -#define UMA_ALIGN __aligned(CACHE_LINE_SIZE) +#define UMA_ALIGN __aligned(128) #else #define UMA_ALIGN #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: r333483 - head/sys/kern
Author: mjg Date: Fri May 11 06:59:54 2018 New Revision: 333483 URL: https://svnweb.freebsd.org/changeset/base/333483 Log: rmlock: partially depessimize lock/unlock fastpath Previusly the slow path was folded in and partially jumped over in the common case. Modified: head/sys/kern/kern_rmlock.c Modified: head/sys/kern/kern_rmlock.c == --- head/sys/kern/kern_rmlock.c Fri May 11 06:55:02 2018(r333482) +++ head/sys/kern/kern_rmlock.c Fri May 11 06:59:54 2018(r333483) @@ -344,7 +344,7 @@ rm_sysinit(void *arg) rm_init_flags(args->ra_rm, args->ra_desc, args->ra_flags); } -static int +static __noinline int _rm_rlock_hard(struct rmlock *rm, struct rm_priotracker *tracker, int trylock) { struct pcpu *pc; @@ -459,15 +459,15 @@ _rm_rlock(struct rmlock *rm, struct rm_priotracker *tr * Fast path to combine two common conditions into a single * conditional jump. */ - if (0 == (td->td_owepreempt | - CPU_ISSET(pc->pc_cpuid, >rm_writecpus))) + if (__predict_true(0 == (td->td_owepreempt | + CPU_ISSET(pc->pc_cpuid, >rm_writecpus return (1); /* We do not have a read token and need to acquire one. */ return _rm_rlock_hard(rm, tracker, trylock); } -static void +static __noinline void _rm_unlock_hard(struct thread *td,struct rm_priotracker *tracker) { @@ -518,7 +518,7 @@ _rm_runlock(struct rmlock *rm, struct rm_priotracker * if (rm->lock_object.lo_flags & LO_SLEEPABLE) THREAD_SLEEPING_OK(); - if (0 == (td->td_owepreempt | tracker->rmp_flags)) + if (__predict_true(0 == (td->td_owepreempt | tracker->rmp_flags))) return; _rm_unlock_hard(td, tracker); ___ 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: r333482 - head/usr.bin/expand
Author: eadler Date: Fri May 11 06:55:02 2018 New Revision: 333482 URL: https://svnweb.freebsd.org/changeset/base/333482 Log: [expand] add __dead2 annotation to usage Modified: head/usr.bin/expand/expand.c Modified: head/usr.bin/expand/expand.c == --- head/usr.bin/expand/expand.cFri May 11 05:00:40 2018 (r333481) +++ head/usr.bin/expand/expand.cFri May 11 06:55:02 2018 (r333482) @@ -59,7 +59,7 @@ static intnstops; static int tabstops[100]; static void getstops(char *); -static void usage(void); +static void usage(void) __dead2; int main(int argc, char *argv[]) ___ 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"