svn commit: r332350 - head/share/man/man7
Author: trasz Date: Tue Apr 10 08:01:55 2018 New Revision: 332350 URL: https://svnweb.freebsd.org/changeset/base/332350 Log: Make development(7) mention tests and section 9 of manual pages. MFC after:2 weeks Modified: head/share/man/man7/development.7 Modified: head/share/man/man7/development.7 == --- head/share/man/man7/development.7 Tue Apr 10 04:56:31 2018 (r332349) +++ head/share/man/man7/development.7 Tue Apr 10 08:01:55 2018 (r332350) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 27, 2018 +.Dd April 10, 2018 .Dt DEVELOPMENT 7 .Os .Sh NAME @@ -75,6 +75,11 @@ Build instructions can be found in .Xr build 7 and .Xr release 7 . +Kernel APIs are usually documented, use +.Cm apropos -s 9 '' +for a list. +Regression test suite is described in +.Xr tests 7 . For coding conventions, see .Xr style 9 . .Pp ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
On Tue, Apr 10, 2018 at 01:29:19AM +0200, Oliver Pinter wrote: > On Monday, April 9, 2018, Warner Losh wrote: > > On Mon, Apr 9, 2018 at 10:09 AM, Kyle Evans wrote: > > > Right- so, back out this MFC (and the subsequent FreeBSD_version bump) > > > and fix the ports to do the right thing for 12.x while that's still > > > not a technically supported branch? > > > > Don't back out the version bump. Other things may be riding along on it > > 'for free'. Better to bump it again when you unMFC (if it's been more than > > a few days since we've had one), and then yet-again when a fixed MFC > > happens. Unless there's something you can ride along on for free :) > > > > Otherwise, that's a great plan. > > What's about "direction Z"? Like moving find to /bin and do a compatibility > symlink for them from /usr/bin? That smells fishy. Reminds me of GNU/Linux where I typically have to parse through gazillion of compatibility symlinks before stumbling upon 30-byte shim saying "implemented in systemd now". :-( ./danfe ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332351 - head/sbin/camcontrol
Author: trasz Date: Tue Apr 10 08:13:59 2018 New Revision: 332351 URL: https://svnweb.freebsd.org/changeset/base/332351 Log: Strip trailing whitespace. MFC after:2 weeks Modified: head/sbin/camcontrol/camcontrol.8 Modified: head/sbin/camcontrol/camcontrol.8 == --- head/sbin/camcontrol/camcontrol.8 Tue Apr 10 08:01:55 2018 (r332350) +++ head/sbin/camcontrol/camcontrol.8 Tue Apr 10 08:13:59 2018 (r332351) @@ -561,7 +561,7 @@ the blocksize. Note that this command only displays the information, it does not update the kernel data structures. Use the -.Nm +.Nm reprobe subcommand to do that. .It Ic start Send the SCSI Start/Stop Unit (0x1B) command to the given device with the @@ -1593,7 +1593,7 @@ If the device is a .Tn SCSI device and it provides a recommended timeout for the WRITE BUFFER command (see the -.Nm +.Nm opcodes subcommand), that timeout will be used for the firmware download. The drive-recommended timeout value may be overridden on the command line with the @@ -1644,12 +1644,12 @@ will currently attempt a firmware download to any .Tn ATA or .Tn SATA -device, since the standard +device, since the standard .Tn ATA DOWNLOAD MICROCODE command may work. Firmware downloads to .Tn ATA -and +and .Tn SATA devices are supported for devices connected to standard @@ -1658,7 +1658,7 @@ and .Tn SATA controllers, and devices connected to SAS controllers with -.Tn SCSI +.Tn SCSI to .Tn ATA translation capability. @@ -1667,7 +1667,7 @@ In the latter case, uses the .Tn SCSI .Tn ATA -PASS-THROUGH command to send the +PASS-THROUGH command to send the .Tn ATA DOWNLOAD MICROCODE command to the drive. Some @@ -1991,9 +1991,9 @@ For instance, .Tn LTO tapes have MAM. Either the -.Fl r +.Fl r option or the -.Fl w +.Fl w option must be specified. .Bl -tag -width 14n .It Fl r Ar action @@ -2022,7 +2022,7 @@ This option is not yet implemented. .It Fl a Ar num Specify the attribute number to display. This option only works with the attr_values, attr_list and supp_attr -arguments to +arguments to .Fl r . .It Fl c Display cached attributes. @@ -2038,7 +2038,7 @@ Specify the output format for the attribute values (at comma separated list of options. The default output is currently set to field_all,nonascii_trim,text_raw. Once this code is ported to FreeBSD 10, any text fields will be converted -from their codeset to the user's native codeset with +from their codeset to the user's native codeset with .Xr iconv 3 . .Pp The text options are mutually exclusive; if you specify more than one, you @@ -2146,7 +2146,7 @@ action. This requests that the device report Nominal and Recommended timeout values for the given command or commands. The timeout values are in seconds. -The timeout descriptor also includes a command-specific +The timeout descriptor also includes a command-specific .El .It Ic zone Manage @@ -2287,8 +2287,8 @@ The summary and column headings are printed, fields ar and the fields themselves may contain spaces. .It summary Just print the summary: the number of zones, the maximum LBA (LBA of the -last logical block on the drive), and the value of the -.Dq same +last logical block on the drive), and the value of the +.Dq same field. The .Dq same @@ -2319,7 +2319,7 @@ to translation layer (SAT). It may be helpful to read the ATA Command Set - 4 (ACS-4) description of the Extended Power Conditions feature set, available at t13.org, to -understand the details of this particular +understand the details of this particular .Nm subcommand. .Bl -tag -width 6n @@ -2365,7 +2365,7 @@ Idle and Standby mode supported by the drive. .Bl -tag -width 8n .It Fl e Enable the power condition. -One of +One of .Fl e or .Fl d @@ -2395,7 +2395,7 @@ Enable or disable a particular power condition. .Bl -tag -width 7n .It Fl e Enable the power condition. -One of +One of .Fl e or .Fl d @@ -2485,7 +2485,7 @@ time, but override the system time zone and use UTC in .It Fl s Set the device's timestamp. Either the .Fl f -and +and .Fl T options or the .Fl U @@ -2494,7 +2494,7 @@ option must be specified. .It Fl f Ar format Specify the strptime format string, as documented in strptime(3). The time must also be specified with the -.Fl T +.Fl T option. .It Fl T Ar time Provide the time in the format specified with the @@ -2790,7 +2790,7 @@ camcontrol epc da4 -c goto -p Standby_z -H Tell drive .Pa da4 to go to the Standby_z power state (which is -the drive's lowest power state) and hold in that state until it is +the drive's lowest power state) and hold in that state until it is explicitly released by another .Cm goto command. @@ -2802,14 +2802,14 @@ camcontrol epc da2 -c status -P Report only the power state of drive .Pa da2 . -Some drives will power up in response to the commands sent by the +Some drives will power up in response t
svn commit: r332352 - head/usr.sbin/ctld
Author: trasz Date: Tue Apr 10 08:14:31 2018 New Revision: 332352 URL: https://svnweb.freebsd.org/changeset/base/332352 Log: Strip trailing whitespace. MFC after:2 weeks Modified: head/usr.sbin/ctld/ctl.conf.5 Modified: head/usr.sbin/ctld/ctl.conf.5 == --- head/usr.sbin/ctld/ctl.conf.5 Tue Apr 10 08:13:59 2018 (r332351) +++ head/usr.sbin/ctld/ctl.conf.5 Tue Apr 10 08:14:31 2018 (r332352) @@ -483,7 +483,7 @@ target naa.50015178f369f092 { .Ed .Pp An equivalent configuration in UCL format, for use with -.Fl u : +.Fl u : .Bd -literal auth-group { ag0 { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332353 - head/usr.bin/systat
Author: tuexen Date: Tue Apr 10 08:19:14 2018 New Revision: 332353 URL: https://svnweb.freebsd.org/changeset/base/332353 Log: Don't show the number of currently established SCTP associations, since this is not monotonically increasing. It's number can be derived from the other counters shown. MFC after:3 days Modified: head/usr.bin/systat/sctp.c Modified: head/usr.bin/systat/sctp.c == --- head/usr.bin/systat/sctp.c Tue Apr 10 08:14:31 2018(r332352) +++ head/usr.bin/systat/sctp.c Tue Apr 10 08:19:14 2018(r332353) @@ -53,24 +53,23 @@ static struct sctpstat curstat, initstat, oldstat; 00 SCTP Associations SCTP Packets 01 associations initiated packets sent 02 associations accepted packets received -03 associations established - out of the blue -04 associations restarted - bad vtag -05 associations terminated - bad crc32c -06 associations aborted -07 -08 SCTP Timers SCTP Chunks -09 init timeouts control chunks sent -10 cookie timeouts data chunks sent -11 data timeouts - ordered -12 delayed sack timeouts - unordered -13 shutdown timeouts control chunks received -14 shutdown-ack timeouts data chunks received -15 shutdown guard timeouts - ordered -16 heartbeat timeouts - unordered -17 path MTU timeouts -18 autoclose timeoutsSCTP user messages -19 asconf timeouts fragmented -20 stream reset timeouts reassembled +03 associations restarted - out of the blue +04 associations terminated - bad vtag +05 associations aborted - bad crc32c +06 +07 SCTP Timers SCTP Chunks +08 init timeouts control chunks sent +09 cookie timeouts data chunks sent +10 data timeouts - ordered +11 delayed sack timeouts - unordered +12 shutdown timeouts control chunks received +13 shutdown-ack timeouts data chunks received +14 shutdown guard timeouts - ordered +15 heartbeat timeouts - unordered +16 path MTU timeouts +17 autoclose timeoutsSCTP user messages +18 asconf timeouts fragmented +19 stream reset timeouts reassembled --0123456789012345678901234567890123456789012345678901234567890123456789012345 --0 1 2 3 4 5 6 7 */ @@ -100,24 +99,23 @@ labelsctp(void) L(0, "SCTP Associations"); R(0, "SCTP Packets"); L(1, "associations initiated"); R(1, "packets sent"); L(2, "associations accepted"); R(2, "packets received"); - L(3, "associations established"); R(3, "- out of the blue"); - L(4, "associations restarted"); R(4, "- bad vtag"); - L(5, "associations terminated");R(5, "- bad crc32c"); - L(6, "associations aborted"); + L(3, "associations restarted"); R(3, "- out of the blue"); + L(4, "associations terminated");R(4, "- bad vtag"); + L(5, "associations aborted"); R(5, "- bad crc32c"); - L(8, "SCTP Timers");R(8, "SCTP Chunks"); - L(9, "init timeouts"); R(9, "control chunks sent"); - L(10, "cookie timeouts"); R(10, "data chunks sent"); - L(11, "data timeouts"); R(11, "- ordered"); - L(12, "delayed sack timeouts"); R(12, "- unordered"); - L(13, "shutdown timeouts"); R(13, "control chunks received"); - L(14, "shutdown-ack timeouts"); R(14, "data chunks received"); - L(15, "shutdown guard timeouts"); R(15, "- ordered"); - L(16, "heartbeat timeouts");R(16, "- unordered"); - L(17, "path MTU timeouts"); - L(18, "autoclose timeouts");R(18, "SCTP User Messages"); - L(19, "asconf timeouts"); R(19, "fragmented"); - L(20, "stream reset timeouts"); R(20, "reassembled"); + L(7, "SCTP Timers");R(7, "SCTP Chunks"); + L(8, "init timeouts"); R(8, "cont
svn commit: r332354 - head/sys/dev/etherswitch/e6000sw
Author: mw Date: Tue Apr 10 08:35:43 2018 New Revision: 332354 URL: https://svnweb.freebsd.org/changeset/base/332354 Log: Improve detection of addressing mode in e6000sw Some devices cannot rely on the switch MDIO address passed in the DTB for specifying single/multi-chip addressing mode. Introduce new property "single-chip-addressing" which added to DTS will force single-chip mode. Submitted by: Michal Mazur Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D14800 Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c == --- head/sys/dev/etherswitch/e6000sw/e6000sw.c Tue Apr 10 08:19:14 2018 (r332353) +++ head/sys/dev/etherswitch/e6000sw/e6000sw.c Tue Apr 10 08:35:43 2018 (r332354) @@ -213,7 +213,9 @@ e6000sw_probe(device_t dev) if (OF_getencprop(sc->node, "reg", &sc->sw_addr, sizeof(sc->sw_addr)) < 0) return (ENXIO); - if (sc->sw_addr != 0 && (sc->sw_addr % 2) == 0) + + if (!OF_hasprop(sc->node, "single-chip-addressing") && + (sc->sw_addr != 0 && (sc->sw_addr % 2) == 0)) sc->multi_chip = true; /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332358 - head/tests/sys/netpfil
Author: kp Date: Tue Apr 10 12:45:34 2018 New Revision: 332358 URL: https://svnweb.freebsd.org/changeset/base/332358 Log: pf tests: Do not build or install if pf is not enabled Do not build or install pf tests if WITHOUT_PF is set. This fixes the build failure with WITHOUT_PF=yes. Reported by: Vladimir Zakharov Modified: head/tests/sys/netpfil/Makefile Modified: head/tests/sys/netpfil/Makefile == --- head/tests/sys/netpfil/Makefile Tue Apr 10 10:27:55 2018 (r332357) +++ head/tests/sys/netpfil/Makefile Tue Apr 10 12:45:34 2018 (r332358) @@ -1,7 +1,11 @@ # $FreeBSD$ +.include + TESTSDIR= ${TESTSBASE}/sys/netpfil +.if ${MK_PF} != "no" TESTS_SUBDIRS+=pf +.endif .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332359 - in head/sys: arm64/conf arm64/qualcomm conf
Author: br Date: Tue Apr 10 12:53:48 2018 New Revision: 332359 URL: https://svnweb.freebsd.org/changeset/base/332359 Log: Enable Qualcomm Debug Subsystem (QDSS) block on MSM8916 SoC. This is required for ARM Coresight operation on Dragonboard 410c. Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D14987 Added: head/sys/arm64/qualcomm/ head/sys/arm64/qualcomm/qcom_gcc.c (contents, props changed) Modified: head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 Modified: head/sys/arm64/conf/GENERIC == --- head/sys/arm64/conf/GENERIC Tue Apr 10 12:45:34 2018(r332358) +++ head/sys/arm64/conf/GENERIC Tue Apr 10 12:53:48 2018(r332359) @@ -106,6 +106,9 @@ device al_iofic# I/O Fabric Interrupt Controller device al_serdes # Serializer/Deserializer device al_udma # Universal DMA +# Qualcomm Snapdragon drivers +device qcom_gcc# Global Clock Controller + # VirtIO support device virtio device virtio_pci Added: head/sys/arm64/qualcomm/qcom_gcc.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/qualcomm/qcom_gcc.c Tue Apr 10 12:53:48 2018 (r332359) @@ -0,0 +1,148 @@ +/*- + * Copyright (c) 2018 Ruslan Bukin + * All rights reserved. + * + * This software was developed by BAE Systems, the University of Cambridge + * Computer Laboratory, and Memorial University under DARPA/AFRL contract + * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing + * (TC) research program. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#defineGCC_QDSS_BCR0x29000 +#define GCC_QDSS_BCR_BLK_ARES (1 << 0) /* Async software reset. */ +#defineGCC_QDSS_CFG_AHB_CBCR 0x29008 +#define AHB_CBCR_CLK_ENABLE(1 << 0) /* AHB clk branch ctrl */ +#defineGCC_QDSS_ETR_USB_CBCR 0x29028 +#define ETR_USB_CBCR_CLK_ENABLE(1 << 0) /* ETR USB clk branch ctrl */ +#defineGCC_QDSS_DAP_CBCR 0x29084 +#define DAP_CBCR_CLK_ENABLE(1 << 0) /* DAP clk branch ctrl */ + +static struct ofw_compat_data compat_data[] = { + { "qcom,gcc-msm8916", 1 }, + { NULL, 0 } +}; + +struct qcom_gcc_softc { + struct resource *res; +}; + +static struct resource_spec qcom_gcc_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +/* + * Qualcomm Debug Subsystem (QDSS) + * block enabling routine. + */ +static void +qcom_qdss_enable(struct qcom_gcc_softc *sc) +{ + + /* Put QDSS block to reset */ + bus_write_4(sc->res, GCC_QDSS_BCR, GCC_QDSS_BCR_BLK_ARES); + + /* Enable AHB clock branch */ + bus_write_4(sc->res, GCC_QDSS_CFG_AHB_CBCR, AHB_CBCR_CLK_ENABLE); + + /* Enable DAP clock branch */ + bus_write_4(sc->res, GCC_QDSS_DAP_CBCR, DAP_CBCR_CLK_ENABLE); + + /* Enable ETR USB clock branch */ + bus_write_4(sc->res, GCC_QDSS_ETR_USB_CBCR, ETR_USB_CBCR_CLK_ENABLE); + + /* Out of reset */ + bus_write_4(sc->res, GCC_QDSS_BCR, 0); +} + +static int +qcom_gcc_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_c
Re: svn commit: r331880 - stable/11/etc
On Mon, Apr 9, 2018 at 11:22 PM, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> On Mon, Apr 9, 2018 at 11:59 AM, Warner Losh wrote: >> > >> > >> > On Mon, Apr 9, 2018 at 10:09 AM, Kyle Evans wrote: >> >> >> >> Right- so, back out this MFC (and the subsequent FreeBSD_version bump) >> >> and fix the ports to do the right thing for 12.x while that's still >> >> not a technically supported branch? >> > >> > >> > Don't back out the version bump. Other things may be riding along on it >> > 'for >> > free'. Better to bump it again when you unMFC (if it's been more than a few >> > days since we've had one), and then yet-again when a fixed MFC happens. >> > Unless there's something you can ride along on for free :) >> > >> > Otherwise, that's a great plan. >> >> Ok, I think the result of this thread and discussion with 0mp is the >> following set of actions: >> >> 1.) One (1) commit to stable/11 to revert the MFC and bump >> FreeBSD_Version again for the removal >> 2.) One (1) commit to doc to document the new FreeBSD_Version >> 3.) Fixing ports to use the "new" behavior on 12, both the >> yet-to-be-patched ports and the ports that had already been patched >> under the assumption that it would still land first in 11.1-stable >> 4.) Documenting the original commit? >> >> The hard part of point #3 has already been done by 0mp, who has >> submitted patches for all of the ports using this behavior. His >> patches will just need a bump of the version they're testing to the >> 12.x FreeBSD_Version and a fix-up on the patches that already landed. >> >> For point #4, this seems like the type of breakage we should be >> documenting in release notes or something for the eventual upgrading >> of systems to 12.0. All usage of _limits stuff in custom rc scripts >> need to be audited, and all rc.conf(5)'s need to be scrubbed for >> ${name}_limits usage that doesn't make sense with the new context. I'm >> not sure what the most appropriate action here is, or what we should >> do this far ahead of time for such a thing. > > We do need a way to stack little notes that need to make it into > the release notes, even if there is no single commit they are related > to, or in this case we find out later that a change had wider > impacts and needs to have a note added. Maybe gjb@ has a place we > can just commit to that gets collected for the release? > >> If this sounds like a good path forward, I'll execute #1 and #2 in the >> morning (CST, so ~11 hours from this e-mail being sent). > > I am on board with this much of this plan. > > > What about cy@ changes to the ddb and other startup scripts? > Right- I was mostly concerned with fixing the fallout from this particular commit. I think that merits its own discussion in a separate thread or in the early referenced PR, but I'm tempted to go ahead and commit Cy's ddb patch to start while we assess the other damage. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332360 - svnadmin/conf
Author: ken Date: Tue Apr 10 13:16:50 2018 New Revision: 332360 URL: https://svnweb.freebsd.org/changeset/base/332360 Log: Add Ram Kishore Vegesna (ram) as a src committer. Ram works for Broadcom and will be maintaining the Broadcom / Emulex ocs_fc(4) fibre channel driver. Alexander Motin (mav) and I will be his mentors. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access == --- svnadmin/conf/accessTue Apr 10 12:53:48 2018(r332359) +++ svnadmin/conf/accessTue Apr 10 13:16:50 2018(r332360) @@ -175,6 +175,7 @@ pkelsey pluknet pstef qingli +ram ray rgrimes rlibby Modified: svnadmin/conf/mentors == --- svnadmin/conf/mentors Tue Apr 10 12:53:48 2018(r332359) +++ svnadmin/conf/mentors Tue Apr 10 13:16:50 2018(r332360) @@ -26,6 +26,7 @@ kadesai ken Co-mentor: scottl, ambrisko mahrensmckusick mjoras rstone peterj jhb Co-mentor: grog +ramken Co-mentor: mav rgrimesphk Co-mentor: bde sefmav slavashkib Co-mentor: hselasky ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332361 - in head: sbin/geom/class/eli sys/geom/eli
Author: oshogbo Date: Tue Apr 10 13:22:48 2018 New Revision: 332361 URL: https://svnweb.freebsd.org/changeset/base/332361 Log: Introduce dry run option for attaching the device. This will allow us to verify if passphrase and key is valid without decrypting whole device. Reviewed by: cem@, allanjude@ Differential Revision:https://reviews.freebsd.org/D15000 Modified: head/sbin/geom/class/eli/geli.8 head/sbin/geom/class/eli/geom_eli.c head/sys/geom/eli/g_eli_ctl.c Modified: head/sbin/geom/class/eli/geli.8 == --- head/sbin/geom/class/eli/geli.8 Tue Apr 10 13:16:50 2018 (r332360) +++ head/sbin/geom/class/eli/geli.8 Tue Apr 10 13:22:48 2018 (r332361) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 17, 2017 +.Dd April 10, 2018 .Dt GELI 8 .Os .Sh NAME @@ -67,7 +67,7 @@ utility: .Cm init .Nm .Cm attach -.Op Fl dprv +.Op Fl dnprv .Op Fl j Ar passfile .Op Fl k Ar keyfile .Ar prov @@ -420,6 +420,9 @@ For more information see the description of the option for the .Cm init subcommand. +.It Fl n +Do a dry-run decryption. +This is useful to verify passphrase and keyfile without decrypting the device. .It Fl p Do not use a passphrase as a component of the User Key. Cannot be combined with the Modified: head/sbin/geom/class/eli/geom_eli.c == --- head/sbin/geom/class/eli/geom_eli.c Tue Apr 10 13:16:50 2018 (r332360) +++ head/sbin/geom/class/eli/geom_eli.c Tue Apr 10 13:22:48 2018 (r332361) @@ -148,11 +148,12 @@ struct g_command class_commands[] = { { 'd', "detach", NULL, G_TYPE_BOOL }, { 'j', "passfile", G_VAL_OPTIONAL, G_TYPE_STRING | G_TYPE_MULTI }, { 'k', "keyfile", G_VAL_OPTIONAL, G_TYPE_STRING | G_TYPE_MULTI }, + { 'n', "dryrun", NULL, G_TYPE_BOOL }, { 'p', "nopassphrase", NULL, G_TYPE_BOOL }, { 'r', "readonly", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - "[-dprv] [-j passfile] [-k keyfile] prov" + "[-dnprv] [-j passfile] [-k keyfile] prov" }, { "detach", 0, NULL, { Modified: head/sys/geom/eli/g_eli_ctl.c == --- head/sys/geom/eli/g_eli_ctl.c Tue Apr 10 13:16:50 2018 (r332360) +++ head/sys/geom/eli/g_eli_ctl.c Tue Apr 10 13:22:48 2018 (r332361) @@ -59,7 +59,7 @@ g_eli_ctl_attach(struct gctl_req *req, struct g_class struct g_provider *pp; const char *name; u_char *key, mkey[G_ELI_DATAIVKEYLEN]; - int *nargs, *detach, *readonly; + int *nargs, *detach, *readonly, *dryrun; int keysize, error; u_int nkey; @@ -87,6 +87,12 @@ g_eli_ctl_attach(struct gctl_req *req, struct g_class return; } + dryrun = gctl_get_paraml(req, "dryrun", sizeof(*dryrun)); + if (dryrun == NULL) { + gctl_error(req, "No '%s' argument.", "dryrun"); + return; + } + if (*detach && *readonly) { gctl_error(req, "Options -d and -r are mutually exclusive."); return; @@ -141,7 +147,8 @@ g_eli_ctl_attach(struct gctl_req *req, struct g_class md.md_flags |= G_ELI_FLAG_WO_DETACH; if (*readonly) md.md_flags |= G_ELI_FLAG_RO; - g_eli_create(req, mp, pp, &md, mkey, nkey); + if (!*dryrun) + g_eli_create(req, mp, pp, &md, mkey, nkey); explicit_bzero(mkey, sizeof(mkey)); explicit_bzero(&md, sizeof(md)); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332362 - head/sys/dts/arm
Author: mw Date: Tue Apr 10 13:25:42 2018 New Revision: 332362 URL: https://svnweb.freebsd.org/changeset/base/332362 Log: Remove deprecated DT sources of Armada 38x SoCs Now, as all platform code and drivers support Linux DT binding, safely remove deprecated sources and rely on sys/gnu/dts from now on. Obtained from: Semihalf Sponsored by: Stormshield Deleted: head/sys/dts/arm/armada-380.dtsi head/sys/dts/arm/armada-385-db-ap.dts head/sys/dts/arm/armada-385.dtsi head/sys/dts/arm/armada-388-clearfog.dts head/sys/dts/arm/armada-388-gp.dts head/sys/dts/arm/armada-388.dtsi head/sys/dts/arm/armada-38x-solidrun-microsom.dtsi head/sys/dts/arm/armada-38x.dtsi ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332363 - in stable/11: etc sys/sys
Author: kevans Date: Tue Apr 10 13:35:07 2018 New Revision: 332363 URL: https://svnweb.freebsd.org/changeset/base/332363 Log: Revert r331880, MFC of r328331 and bump FreeBSD_version There are logistics issues that weren't considered when this was originally MFC'd. All rc scripts in ports need audited (this is in progress) for usage of ${name}_limits that doesn't line up with the new interpretation, and individual rc.conf(5)'s need to be scrubbed of usage that doesn't line up. It's since been decided that it should be left for a feature in 12. 1101514 introduced interpretation of ${name}_limits for rc scripts; this feature no longer exists as of 1101515. Modified: stable/11/etc/rc.subr stable/11/sys/sys/param.h Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.subr == --- stable/11/etc/rc.subr Tue Apr 10 13:25:42 2018(r332362) +++ stable/11/etc/rc.subr Tue Apr 10 13:35:07 2018(r332363) @@ -773,8 +773,6 @@ check_startmsgs() # # ${name}_login_class n Login class to use, else "daemon". # -# ${name}_limits n limits(1) to apply to ${command}. -# # ${rc_arg}_cmd n If set, use this as the method when invoked; # Otherwise, use default command (see below) # @@ -954,7 +952,7 @@ run_rc_command() _group=\$${name}_group _groups=\$${name}_groups \ _fib=\$${name}_fib _env=\$${name}_env \ _prepend=\$${name}_prepend _login_class=\${${name}_login_class:-daemon} \ - _limits=\$${name}_limits_oomprotect=\$${name}_oomprotect + _oomprotect=\$${name}_oomprotect if [ -n "$_user" ]; then# unset $_user if running as that user if [ "$_user" = "$(eval $IDCMD)" ]; then @@ -1075,7 +1073,7 @@ $command $rc_flags $command_args" fi # Prepend default limits - _doit="$_cd limits -C $_login_class $_limits $_doit" + _doit="$_cd limits -C $_login_class $_doit" # run the full command # Modified: stable/11/sys/sys/param.h == --- stable/11/sys/sys/param.h Tue Apr 10 13:25:42 2018(r332362) +++ stable/11/sys/sys/param.h Tue Apr 10 13:35:07 2018(r332363) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1101514 /* Master, propagated to newvers */ +#define __FreeBSD_version 1101515 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332364 - in head/sys/cddl: contrib/opensolaris/uts/common/dtrace dev/dtrace
Author: markj Date: Tue Apr 10 13:47:09 2018 New Revision: 332364 URL: https://svnweb.freebsd.org/changeset/base/332364 Log: Assert that dtrace_probe() doesn't re-enter itself. This helps catch cases where an instrumented function is called while in probe context. Submitted by: Domagoj Stolfa MFC after:2 weeks Sponsored by: DARPA/AFRL Differential Revision:https://reviews.freebsd.org/D14863 Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/dev/dtrace/dtrace_cddl.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c == --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.cTue Apr 10 13:35:07 2018(r332363) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.cTue Apr 10 13:47:09 2018(r332364) @@ -7257,6 +7257,44 @@ dtrace_store_by_ref(dtrace_difo_t *dp, caddr_t tomax, } /* + * Disables interrupts and sets the per-thread inprobe flag. When DEBUG is + * defined, we also assert that we are not recursing unless the probe ID is an + * error probe. + */ +static dtrace_icookie_t +dtrace_probe_enter(dtrace_id_t id) +{ + dtrace_icookie_t cookie; + + cookie = dtrace_interrupt_disable(); + + /* +* Unless this is an ERROR probe, we are not allowed to recurse in +* dtrace_probe(). Recursing into DTrace probe usually means that a +* function is instrumented that should not have been instrumented or +* that the ordering guarantee of the records will be violated, +* resulting in unexpected output. If there is an exception to this +* assertion, a new case should be added. +*/ + ASSERT(curthread->t_dtrace_inprobe == 0 || + id == dtrace_probeid_error); + curthread->t_dtrace_inprobe = 1; + + return (cookie); +} + +/* + * Disables interrupts and clears the per-thread inprobe flag. + */ +static void +dtrace_probe_exit(dtrace_icookie_t cookie) +{ + + curthread->t_dtrace_inprobe = 0; + dtrace_interrupt_enable(cookie); +} + +/* * If you're looking for the epicenter of DTrace, you just found it. This * is the function called by the provider to fire a probe -- from which all * subsequent probe-context DTrace activity emanates. @@ -7290,7 +7328,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t return; #endif - cookie = dtrace_interrupt_disable(); + cookie = dtrace_probe_enter(id); probe = dtrace_probes[id - 1]; cpuid = curcpu; onintr = CPU_ON_INTR(CPU); @@ -7301,7 +7339,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t * We have hit in the predicate cache; we know that * this predicate would evaluate to be false. */ - dtrace_interrupt_enable(cookie); + dtrace_probe_exit(cookie); return; } @@ -7313,7 +7351,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t /* * We don't trace anything if we're panicking. */ - dtrace_interrupt_enable(cookie); + dtrace_probe_exit(cookie); return; } @@ -7939,7 +7977,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t if (vtime) curthread->t_dtrace_start = dtrace_gethrtime(); - dtrace_interrupt_enable(cookie); + dtrace_probe_exit(cookie); } /* Modified: head/sys/cddl/dev/dtrace/dtrace_cddl.h == --- head/sys/cddl/dev/dtrace/dtrace_cddl.h Tue Apr 10 13:35:07 2018 (r332363) +++ head/sys/cddl/dev/dtrace/dtrace_cddl.h Tue Apr 10 13:47:09 2018 (r332364) @@ -46,6 +46,7 @@ typedef struct kdtrace_proc { typedef struct kdtrace_thread { u_int8_ttd_dtrace_stop; /* Indicates a DTrace-desired stop */ u_int8_ttd_dtrace_sig; /* Signal sent via DTrace's raise() */ + u_int8_ttd_dtrace_inprobe; /* Are we in a probe? */ u_int td_predcache; /* DTrace predicate cache */ u_int64_t td_dtrace_vtime; /* DTrace virtual time */ u_int64_t td_dtrace_start; /* DTrace slice start time */ @@ -97,6 +98,7 @@ typedef struct kdtrace_thread { #definet_dtrace_start td_dtrace->td_dtrace_start #definet_dtrace_stop td_dtrace->td_dtrace_stop #definet_dtrace_sigtd_dtrace->td_dtrace_sig +#definet_dtrace_inprobetd_dtrace->td_dtrace_inprobe #definet_predcache td_dtrace->td_predcache #definet_dtrace_ft td_dtrace->td_dtrace_ft #definet_dtrace_on td_dtrace->td_dtrace_on ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinf
svn commit: r332365 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: markj Date: Tue Apr 10 13:56:06 2018 New Revision: 332365 URL: https://svnweb.freebsd.org/changeset/base/332365 Log: Set zfs_arc_free_target to v_free_target. Page daemon output is now regulated by a PID controller with a setpoint of v_free_target. Moreover, the page daemon now wakes up regularly rather than waiting for a wakeup from another thread. This means that the free page count is unlikely to drop below the old zfs_arc_free_target value, and as a result the ARC was not readily freeing pages under memory pressure. Address the immediate problem by updating zfs_arc_free_target to match the page daemon's new behaviour. Reported and tested by: truckman Discussed with: jeff X-MFC with: r329882 Differential Revision:https://reviews.freebsd.org/D14994 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Apr 10 13:47:09 2018(r332364) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Apr 10 13:56:06 2018(r332365) @@ -389,7 +389,7 @@ static void arc_free_target_init(void *unused __unused) { - zfs_arc_free_target = (vm_cnt.v_free_min / 10) * 11; + zfs_arc_free_target = vm_cnt.v_free_target; } SYSINIT(arc_free_target_init, SI_SUB_KTHREAD_PAGE, SI_ORDER_ANY, arc_free_target_init, NULL); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332366 - stable/11
Author: kevans Date: Tue Apr 10 13:56:30 2018 New Revision: 332366 URL: https://svnweb.freebsd.org/changeset/base/332366 Log: MFC r316487, r316516, r316546, r316567: One big nop r316487: Allow command modifiers (fast, quiet etc.) to be stacked in any order. Add a "debug" modifier that sets rc_debug. r316516: r316487 altered the defined values of rc_force from "yes" (for yes) and NULL (for no) to "no" (for no) and no change to the definition of yes. Two rc.d scripts, dhclient and bgfsck check rc_force for yesi, using test -n, and no, using test -z. The redefinition of yes and no by r316487 caused rc.d/dhclient, when invoked by devd using a devd.conf rule, to assign DHCP assigned IP addresses for interfaces with statically assigned interfaces, breaking boot. Point of breakage was at line 25 of etc/rc.d/dhclient (r301068) where $rc_force needs to be NULL. X-MFC with: r316487 r316546: Revert r316516. des@ asked that r316516 be reverted so that he can spend a little more time getting r316487 right. Requested by: des@ r316567: Revert r316487. It is broken, causing boot to fail due to line 25 in etc/rc.d/dhclient unconditionally testing true when called by a devd rule during boot, ignoring statically assigned IP addresses in rc.conf. Requested by: des@ Modified: Directory Properties: stable/11/ (props changed) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332367 - stable/11/etc
Author: kevans Date: Tue Apr 10 14:00:45 2018 New Revision: 332367 URL: https://svnweb.freebsd.org/changeset/base/332367 Log: MFC r308896 r308896: rc.subr: $(ps -p $$ -o jid=) is always 0, so do not fork ps for it. The JID keyword writes 0 for a process also in the host system or in the same jail. Modified: stable/11/etc/rc.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.subr == --- stable/11/etc/rc.subr Tue Apr 10 13:56:30 2018(r332366) +++ stable/11/etc/rc.subr Tue Apr 10 14:00:45 2018(r332367) @@ -49,7 +49,7 @@ PROTECT="/usr/bin/protect" ID="/usr/bin/id" IDCMD="if [ -x $ID ]; then $ID -un; fi" PS="/bin/ps -ww" -JID=`$PS -p $$ -o jid=` +JID=0 # # functions ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332368 - in stable/11/etc: . defaults
Author: kevans Date: Tue Apr 10 14:04:11 2018 New Revision: 332368 URL: https://svnweb.freebsd.org/changeset/base/332368 Log: MFC r309350, r309352 r309350: If the kenv variable rc_debug is set, turn on rc_debug. r309352: Finish incomplete comments in prior revision. I was going to fix this after I tested it, but didn't. Modified: stable/11/etc/defaults/rc.conf stable/11/etc/rc.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/defaults/rc.conf == --- stable/11/etc/defaults/rc.conf Tue Apr 10 14:00:45 2018 (r332367) +++ stable/11/etc/defaults/rc.conf Tue Apr 10 14:04:11 2018 (r332368) @@ -21,6 +21,8 @@ ### Important initial Boot-time options ## +# rc_debug can't be set here without interferring with rc.subr's setting it +# when the kenv variable rc.debug is set. #rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. rc_startmsgs="YES" # Show "Starting foo:" messages at boot Modified: stable/11/etc/rc.subr == --- stable/11/etc/rc.subr Tue Apr 10 14:00:45 2018(r332367) +++ stable/11/etc/rc.subr Tue Apr 10 14:04:11 2018(r332368) @@ -2166,6 +2166,13 @@ _echoonce() esac } +# If the loader env variable rc.debug is set, turn on debugging. rc.conf will +# still override this, but /etc/defaults/rc.conf can't unconditionally set this +# since it would undo what we've done here. +if kenv -q rc.debug > /dev/null ; then + rc_debug=YES +fi + fi # [ -z "${_rc_subr_loaded}" ] _rc_subr_loaded=: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332369 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace
Author: markj Date: Tue Apr 10 14:07:02 2018 New Revision: 332369 URL: https://svnweb.freebsd.org/changeset/base/332369 Log: Correct a comment. Submitted by: Domagoj Stolfa X-MFC with: r332364 Sponsored by: DARPA, AFRL Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c == --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.cTue Apr 10 14:04:11 2018(r332368) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.cTue Apr 10 14:07:02 2018(r332369) @@ -7284,7 +7284,7 @@ dtrace_probe_enter(dtrace_id_t id) } /* - * Disables interrupts and clears the per-thread inprobe flag. + * Clears the per-thread inprobe flag and enables interrupts. */ static void dtrace_probe_exit(dtrace_icookie_t cookie) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332370 - in stable: 10/release/doc/share/xml 11/release/doc/share/xml
Author: gjb Date: Tue Apr 10 14:07:29 2018 New Revision: 332370 URL: https://svnweb.freebsd.org/changeset/base/332370 Log: Document EN-18:03, EN-18:04, SA-18:04, SA-18:05. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/errata.xml stable/10/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/errata.xml == --- stable/10/release/doc/share/xml/errata.xml Tue Apr 10 14:07:02 2018 (r332369) +++ stable/10/release/doc/share/xml/errata.xml Tue Apr 10 14:07:29 2018 (r332370) @@ -40,6 +40,22 @@ 07 March 2018 Stack-based buffer overflow + + + FreeBSD-EN-18:03.tzdata + 04 April 2018 + Update timezone database + information + + + + FreeBSD-EN-18:04.mem + 04 April 2018 + Multiple small kernel memory + disclosures + Modified: stable/10/release/doc/share/xml/security.xml == --- stable/10/release/doc/share/xml/security.xmlTue Apr 10 14:07:02 2018(r332369) +++ stable/10/release/doc/share/xml/security.xmlTue Apr 10 14:07:29 2018(r332370) @@ -83,6 +83,21 @@ 07 March 2018 Multiple vulnerabilities + + + FreeBSD-SA-18:04.vt + 04 April 2018 + Fix &man.vt.4; console memory + disclosure + + + + FreeBSD-SA-18:05.ipsec + 04 April 2018 + Fix denial of service + ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332370 - in stable: 10/release/doc/share/xml 11/release/doc/share/xml
Author: gjb Date: Tue Apr 10 14:07:29 2018 New Revision: 332370 URL: https://svnweb.freebsd.org/changeset/base/332370 Log: Document EN-18:03, EN-18:04, SA-18:04, SA-18:05. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/errata.xml stable/10/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/errata.xml == --- stable/11/release/doc/share/xml/errata.xml Tue Apr 10 14:07:02 2018 (r332369) +++ stable/11/release/doc/share/xml/errata.xml Tue Apr 10 14:07:29 2018 (r332370) @@ -56,6 +56,22 @@ 07 March 2018 Stack-based buffer overflow + + + FreeBSD-EN-18:03.tzdata + 04 April 2018 + Update timezone database + information + + + + FreeBSD-EN-18:04.mem + 04 April 2018 + Multiple small kernel memory + disclosures + Modified: stable/11/release/doc/share/xml/security.xml == --- stable/11/release/doc/share/xml/security.xmlTue Apr 10 14:07:02 2018(r332369) +++ stable/11/release/doc/share/xml/security.xmlTue Apr 10 14:07:29 2018(r332370) @@ -91,6 +91,21 @@ + + + FreeBSD-SA-18:04.vt + 04 April 2018 + Fix &man.vt.4; console memory + disclosure + + + + FreeBSD-SA-18:05.ipsec + 04 April 2018 + Fix denial of service + ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332365 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
On Tue, Apr 10, 2018 at 01:56:06PM +, Mark Johnston wrote: > Author: markj > Date: Tue Apr 10 13:56:06 2018 > New Revision: 332365 > URL: https://svnweb.freebsd.org/changeset/base/332365 > > Log: > Set zfs_arc_free_target to v_free_target. > > Page daemon output is now regulated by a PID controller with a setpoint > of v_free_target. Moreover, the page daemon now wakes up regularly > rather than waiting for a wakeup from another thread. This means that > the free page count is unlikely to drop below the old > zfs_arc_free_target value, and as a result the ARC was not readily > freeing pages under memory pressure. Address the immediate problem by > updating zfs_arc_free_target to match the page daemon's new behaviour. Can you explain some more about new page daemon algo (and reclaim zone free memory)? PS: zfs need some more time for free pages from ARC. Also, vanila zfs have broken logic for count used and free ARC's memory. For most correctly count system-wide used and free memory need accounting in-zone free memory. > arc_free_target_init(void *unused __unused) > { > > - zfs_arc_free_target = (vm_cnt.v_free_min / 10) * 11; > + zfs_arc_free_target = vm_cnt.v_free_target; > } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332371 - stable/11/etc
Author: kevans Date: Tue Apr 10 14:13:35 2018 New Revision: 332371 URL: https://svnweb.freebsd.org/changeset/base/332371 Log: MFC r319828, r324625 r319828: rc.subr: Optimize repeated sourcing. When /etc/rc runs all /etc/rc.d scripts, it has already loaded /etc/rc.subr but each /etc/rc.d script sources it again (since /etc/rc.d scripts must also work when started stand-alone). Therefore, if rc.subr is already loaded, return so sh need not parse the rest of the file. A second effect is that there is no longer a compound command around most of rc.subr. This reduces memory usage while sh is loading rc.subr for the first time (but this memory is free()d once rc.subr is loaded). For purposes of porting this to other systems, I do not recommend porting this to systems with shells that do not have the change to the return special builtin like in r255215 (before FreeBSD 10.0-RELEASE). This change ensures that return in the top level of a dot script returns from the dot script, even if the dot script was sourced from a function. A comparison of CPU time on an amd64 bhyve virtual machine from a times command added near the end of /etc/rc, all four values summed: x orig1 + quickreturn +--+ | ++ + xx x| ||__M__A_| |__M___A__| | +--+ N Min MaxMedian AvgStddev x 3 1.704 1.802 1.726 1.744 0.051419841 + 3 1.467 1.559 1.487 1.504 0.048387326 Difference at 95.0% confidence -0.239667 +/- 0.113163 -13.7424% +/- 6.48873% (Student's t, pooled s = 0.0499266) r324625: rc.subr: Remove test that is always true. The code above always sets _pidcmd to a non-empty value. Modified: stable/11/etc/rc.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.subr == --- stable/11/etc/rc.subr Tue Apr 10 14:07:29 2018(r332370) +++ stable/11/etc/rc.subr Tue Apr 10 14:13:35 2018(r332371) @@ -38,7 +38,9 @@ # Operating System dependent/independent variables # -if [ -z "${_rc_subr_loaded}" ]; then +if [ -n "${_rc_subr_loaded}" ]; then + return +fi _rc_subr_loaded="YES" @@ -928,9 +930,7 @@ run_rc_command() else _pidcmd='rc_pid=$(check_process '"$_procname $command_interpreter"')' fi - if [ -n "$_pidcmd" ]; then - _keywords="${_keywords} status poll" - fi + _keywords="${_keywords} status poll" fi if [ -z "$rc_arg" ]; then @@ -2172,7 +2172,3 @@ _echoonce() if kenv -q rc.debug > /dev/null ; then rc_debug=YES fi - -fi # [ -z "${_rc_subr_loaded}" ] - -_rc_subr_loaded=: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332372 - head/usr.bin/tail
Author: kevans Date: Tue Apr 10 14:27:27 2018 New Revision: 332372 URL: https://svnweb.freebsd.org/changeset/base/332372 Log: tail(1): Add some long options Add --blocks, --bytes, and --lines long options for -b, -c, and -n respectively. This improves tail(1)'s compatibility with its GNU counterpart in a straightforward way. Reviewed by: eadler (earlier version) MFC after:3 days Modified: head/usr.bin/tail/tail.1 head/usr.bin/tail/tail.c Modified: head/usr.bin/tail/tail.1 == --- head/usr.bin/tail/tail.1Tue Apr 10 14:13:35 2018(r332371) +++ head/usr.bin/tail/tail.1Tue Apr 10 14:27:27 2018(r332372) @@ -31,7 +31,7 @@ .\"@(#)tail.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd March 16, 2013 +.Dd April 10, 2018 .Dt TAIL 1 .Os .Sh NAME @@ -73,11 +73,11 @@ or the last 10 lines of the input. .Pp The options are as follows: .Bl -tag -width indent -.It Fl b Ar number +.It Fl b Ar number , Fl -blocks Ns = Ns Ar number The location is .Ar number 512-byte blocks. -.It Fl c Ar number +.It Fl c Ar number , Fl -bytes Ns = Ns Ar number The location is .Ar number bytes. @@ -112,7 +112,7 @@ The option is the same as the .Fl f option if reading from standard input rather than a file. -.It Fl n Ar number +.It Fl n Ar number, Fl -lines Ns = Ns Ar number The location is .Ar number lines. Modified: head/usr.bin/tail/tail.c == --- head/usr.bin/tail/tail.cTue Apr 10 14:13:35 2018(r332371) +++ head/usr.bin/tail/tail.cTue Apr 10 14:27:27 2018(r332372) @@ -51,6 +51,7 @@ static const char sccsid[] = "@(#)tail.c 8.1 (Berkeley #include #include +#include #include #include #include @@ -65,6 +66,14 @@ static file_info_t *files; static void obsolete(char **); static void usage(void); +static const struct option long_opts[] = +{ + {"blocks", required_argument, NULL, 'b'}, + {"bytes", required_argument, NULL, 'c'}, + {"lines", required_argument, NULL, 'n'}, + {NULL, no_argument,NULL, 0} +}; + int main(int argc, char *argv[]) { @@ -113,7 +122,8 @@ main(int argc, char *argv[]) obsolete(argv); style = NOTSET; off = 0; - while ((ch = getopt(argc, argv, "Fb:c:fn:qr")) != -1) + while ((ch = getopt_long(argc, argv, "+Fb:c:fn:qr", long_opts, NULL)) != + -1) switch(ch) { case 'F': /* -F is superset of (and implies) -f */ Fflag = fflag = 1; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332372 - head/usr.bin/tail
On Tue, Apr 10, 2018 at 9:27 AM, Kyle Evans wrote: > Author: kevans > Date: Tue Apr 10 14:27:27 2018 > New Revision: 332372 > URL: https://svnweb.freebsd.org/changeset/base/332372 > > Log: > tail(1): Add some long options > > Add --blocks, --bytes, and --lines long options for -b, -c, and -n > respectively. This improves tail(1)'s compatibility with its GNU counterpart > in a straightforward way. > > Reviewed by: eadler (earlier version) > MFC after:3 days > ... Differential revision: https://reviews.freebsd.org/D14140 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332373 - head/usr.bin/tail
Author: kevans Date: Tue Apr 10 14:42:24 2018 New Revision: 332373 URL: https://svnweb.freebsd.org/changeset/base/332373 Log: tail(1): Address mandoc concern (space before punctuation after macro) X-MFC-With: r332372 Modified: head/usr.bin/tail/tail.1 Modified: head/usr.bin/tail/tail.1 == --- head/usr.bin/tail/tail.1Tue Apr 10 14:27:27 2018(r332372) +++ head/usr.bin/tail/tail.1Tue Apr 10 14:42:24 2018(r332373) @@ -112,7 +112,7 @@ The option is the same as the .Fl f option if reading from standard input rather than a file. -.It Fl n Ar number, Fl -lines Ns = Ns Ar number +.It Fl n Ar number , Fl -lines Ns = Ns Ar number The location is .Ar number lines. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332374 - head/usr.bin/head
Author: kevans Date: Tue Apr 10 14:44:07 2018 New Revision: 332374 URL: https://svnweb.freebsd.org/changeset/base/332374 Log: head(1): Provide long options Provide long options --bytes and --lines to match -c and -n respectively. This improves head(1)'s compatibility with its GNU counterpart in a sensible way. Reviewed by: eadler (previous version) MFC after:3 days Differential Revision:https://reviews.freebsd.org/D14139 Modified: head/usr.bin/head/head.1 head/usr.bin/head/head.c Modified: head/usr.bin/head/head.1 == --- head/usr.bin/head/head.1Tue Apr 10 14:42:24 2018(r332373) +++ head/usr.bin/head/head.1Tue Apr 10 14:44:07 2018(r332374) @@ -28,7 +28,7 @@ .\"@(#)head.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd March 16, 2013 +.Dd April 10, 2018 .Dt HEAD 1 .Os .Sh NAME @@ -48,6 +48,18 @@ files are specified. If .Ar count is omitted it defaults to 10. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl c Ar bytes , Fl -bytes Ns = Ns Ar bytes +Print +.Ar bytes +of each of the specified files. +.It Fl n Ar count , Fl -lines Ns = Ns Ar count +Print +.Ar count +lines of each of the specified files. +.El .Pp If more than a single file is specified, each file is preceded by a header consisting of the string Modified: head/usr.bin/head/head.c == --- head/usr.bin/head/head.cTue Apr 10 14:42:24 2018(r332373) +++ head/usr.bin/head/head.cTue Apr 10 14:44:07 2018(r332374) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -64,6 +65,13 @@ static void head_bytes(FILE *, off_t); static void obsolete(char *[]); static void usage(void); +static const struct option long_opts[] = +{ + {"bytes", required_argument, NULL, 'c'}, + {"lines", required_argument, NULL, 'n'}, + {NULL, no_argument,NULL, 0} +}; + int main(int argc, char *argv[]) { @@ -74,7 +82,7 @@ main(int argc, char *argv[]) char *ep; obsolete(argv); - while ((ch = getopt(argc, argv, "n:c:")) != -1) + while ((ch = getopt_long(argc, argv, "+n:c:", long_opts, NULL)) != -1) switch(ch) { case 'c': bytecnt = strtoimax(optarg, &ep, 10); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332041 - svnadmin/conf
[ Charset UTF-8 unsupported, converting... ] > On 5/4/18 2:27 am, Alexander Motin wrote: > > Author: mav > > Date: Wed Apr 4 18:27:18 2018 > > New Revision: 332041 > > URL: https://svnweb.freebsd.org/changeset/base/332041 > > > > Log: > >Restore Sean Eric Fagan (sef) src commit bit. > > !!? Welcome back SEF! Yes, welcome Back Sean! > >I (mav) will be his mentor. -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r331880 - stable/11/etc
> On 04/10/18 04:28, Kyle Evans wrote: > > On Mon, Apr 9, 2018 at 11:59 AM, Warner Losh wrote: > >> > >> > >> On Mon, Apr 9, 2018 at 10:09 AM, Kyle Evans wrote: > >>> > >>> Right- so, back out this MFC (and the subsequent FreeBSD_version bump) > >>> and fix the ports to do the right thing for 12.x while that's still > >>> not a technically supported branch? > >> > >> > >> Don't back out the version bump. Other things may be riding along on it > >> 'for > >> free'. Better to bump it again when you unMFC (if it's been more than a few > >> days since we've had one), and then yet-again when a fixed MFC happens. > >> Unless there's something you can ride along on for free :) > >> > >> Otherwise, that's a great plan. > > > > Ok, I think the result of this thread and discussion with 0mp is the > > following set of actions: > > > > 1.) One (1) commit to stable/11 to revert the MFC and bump > > FreeBSD_Version again for the removal > > 2.) One (1) commit to doc to document the new FreeBSD_Version > > 3.) Fixing ports to use the "new" behavior on 12, both the > > yet-to-be-patched ports and the ports that had already been patched > > under the assumption that it would still land first in 11.1-stable > > 4.) Documenting the original commit? > > > > The hard part of point #3 has already been done by 0mp, who has > > submitted patches for all of the ports using this behavior. His > > patches will just need a bump of the version they're testing to the > > 12.x FreeBSD_Version and a fix-up on the patches that already landed. > > > > For point #4, this seems like the type of breakage we should be > > documenting in release notes or something for the eventual upgrading > > of systems to 12.0. All usage of _limits stuff in custom rc scripts > > need to be audited, and all rc.conf(5)'s need to be scrubbed for > > ${name}_limits usage that doesn't make sense with the new context. I'm > > not sure what the most appropriate action here is, or what we should > > do this far ahead of time for such a thing. > > > > If this sounds like a good path forward, I'll execute #1 and #2 in the > > morning (CST, so ~11 hours from this e-mail being sent). > > > > This still doesn't fix the issue of some early start up scripts > depending on stuff that's not available yet, when for instance /usr is > on a separate FS (which was the normal way to set up a system way back > when). The words "way back when" is become less needed. With the advent of hypervisors, 100GbE and NVMe over fabric the idea of sharing /usr across a whole cluster of VM's is become more desireable. 1 copy of /usr shared from a memory file system via fast network technologies has advantages. > This issue was first noticed more than 2 years ago, so someone did > notice the breakage. It just hasn't been fixed for an entire release cycle. > Regards One thing that is not helping the bit rot is that some reworking of /etc/rc* stuff has caused it to now ignore most errors from my things, and that just causes a message on the console that no one is reading so when something gets broke it a) doesnt get noticed cause thier machine just boots, and b) doesnt get fixed cause few are actually effected by the caused error. If you are willing to help me weed out the failure modes, I am willing to try and mount an effort, along with others, to try and get us back on track. -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332365 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
On Tue, Apr 10, 2018 at 05:09:57PM +0300, Slawa Olhovchenkov wrote: > On Tue, Apr 10, 2018 at 01:56:06PM +, Mark Johnston wrote: > > > Author: markj > > Date: Tue Apr 10 13:56:06 2018 > > New Revision: 332365 > > URL: https://svnweb.freebsd.org/changeset/base/332365 > > > > Log: > > Set zfs_arc_free_target to v_free_target. > > > > Page daemon output is now regulated by a PID controller with a setpoint > > of v_free_target. Moreover, the page daemon now wakes up regularly > > rather than waiting for a wakeup from another thread. This means that > > the free page count is unlikely to drop below the old > > zfs_arc_free_target value, and as a result the ARC was not readily > > freeing pages under memory pressure. Address the immediate problem by > > updating zfs_arc_free_target to match the page daemon's new behaviour. > > Can you explain some more about new page daemon algo (and reclaim zone > free memory)? The old algorithm was pretty simple: there was a free page target and below that, a wakeup threshold. Any time a thread allocated a page and in so doing caused the free page count to drop below the wakeup threshold, that thread would wake up the page daemon, which would scan the inactive queue and free pages until the free target is reached, or the end of the inactive queue was reached. This is simple and easy to reason about, but has some drawbacks. When memory pressure is constant, it leads to bursts of CPU usage and lock contention. The static watermarks may also be insufficient for some demanding workloads. In particular, the wakeup threshold might be too low, thus allowing the free page count to drop to dangerous levels and triggering expensive memory shortage handling (i.e., VM_WAIT). The new algorithm uses a control loop to dynamically compute a target for each scan of the inactive queue. The loop takes as input the magnitude of the page shortage (v_free_target - v_free_count) and keeps track of the rate of change of this difference (i.e., the rate at which free pages are being consumed) and the sum of this difference over time (i.e., a cumulative value for the magnitude of recent page shortages). These factors are used to compute "shortage", the number of pages to reclaim with the goal of maintaining a free page count of v_free_target. The effect of the new algorithm is that the page daemon runs more frequently but for shorter durations, so its CPU usage is more even. It responds dynamically to the demands of the workload, so the shortcomings of a pair of static watermarks are gone. r329882 doesn't really change anything with respect to reclamation of pages from UMA zones. There are some plans to address shortcomings there in the near future though. > PS: zfs need some more time for free pages from ARC. Also, vanila zfs > have broken logic for count used and free ARC's memory. For most > correctly count system-wide used and free memory need accounting > in-zone free memory. Yes, there is a number of problems in this area predating r329882. This commit is really just a bandaid. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332377 - stable/11/usr.bin/truss
Author: kevans Date: Tue Apr 10 15:38:16 2018 New Revision: 332377 URL: https://svnweb.freebsd.org/changeset/base/332377 Log: MFC r328037: Rename 'recv' to 'receive' to appease shadow warnings from GCC. Modified: stable/11/usr.bin/truss/syscalls.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/truss/syscalls.c == --- stable/11/usr.bin/truss/syscalls.c Tue Apr 10 15:19:30 2018 (r332376) +++ stable/11/usr.bin/truss/syscalls.c Tue Apr 10 15:38:16 2018 (r332377) @@ -1291,20 +1291,20 @@ print_sctp_initmsg(FILE *fp, struct sctp_initmsg *init } static void -print_sctp_sndrcvinfo(FILE *fp, bool recv, struct sctp_sndrcvinfo *info) +print_sctp_sndrcvinfo(FILE *fp, bool receive, struct sctp_sndrcvinfo *info) { fprintf(fp, "{sid=%u,", info->sinfo_stream); - if (recv) { + if (receive) { fprintf(fp, "ssn=%u,", info->sinfo_ssn); } fputs("flgs=", fp); sysdecode_sctp_sinfo_flags(fp, info->sinfo_flags); fprintf(fp, ",ppid=%u,", ntohl(info->sinfo_ppid)); - if (!recv) { + if (!receive) { fprintf(fp, "ctx=%u,", info->sinfo_context); fprintf(fp, "ttl=%u,", info->sinfo_timetolive); } - if (recv) { + if (receive) { fprintf(fp, "tsn=%u,", info->sinfo_tsn); fprintf(fp, "cumtsn=%u,", info->sinfo_cumtsn); } @@ -1388,7 +1388,7 @@ print_sctp_ipv6_addr(FILE *fp, struct in6_addr *addr) } static void -print_sctp_cmsg(FILE *fp, bool recv, struct cmsghdr *cmsghdr) +print_sctp_cmsg(FILE *fp, bool receive, struct cmsghdr *cmsghdr) { void *data; socklen_t len; @@ -1404,7 +1404,7 @@ print_sctp_cmsg(FILE *fp, bool recv, struct cmsghdr *c break; case SCTP_SNDRCV: if (len == CMSG_LEN(sizeof(struct sctp_sndrcvinfo))) - print_sctp_sndrcvinfo(fp, recv, + print_sctp_sndrcvinfo(fp, receive, (struct sctp_sndrcvinfo *)data); else print_gen_cmsg(fp, cmsghdr); @@ -1466,7 +1466,7 @@ print_sctp_cmsg(FILE *fp, bool recv, struct cmsghdr *c } static void -print_cmsgs(FILE *fp, pid_t pid, bool recv, struct msghdr *msghdr) +print_cmsgs(FILE *fp, pid_t pid, bool receive, struct msghdr *msghdr) { struct cmsghdr *cmsghdr; char *cmsgbuf; @@ -1507,7 +1507,7 @@ print_cmsgs(FILE *fp, pid_t pid, bool recv, struct msg fputs(",data=", fp); switch (level) { case IPPROTO_SCTP: - print_sctp_cmsg(fp, recv, cmsghdr); + print_sctp_cmsg(fp, receive, cmsghdr); break; default: print_gen_cmsg(fp, cmsghdr); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332378 - head/sys/netinet
Author: jtl Date: Tue Apr 10 15:51:37 2018 New Revision: 332378 URL: https://svnweb.freebsd.org/changeset/base/332378 Log: Clean up some debugging code left in tcp_log_buf.c from r331347. Sponsored by: Netflix, Inc. Modified: head/sys/netinet/tcp_log_buf.c Modified: head/sys/netinet/tcp_log_buf.c == --- head/sys/netinet/tcp_log_buf.c Tue Apr 10 15:38:16 2018 (r332377) +++ head/sys/netinet/tcp_log_buf.c Tue Apr 10 15:51:37 2018 (r332378) @@ -1667,52 +1667,7 @@ tcp_log_logs_to_buf(struct sockopt *sopt, struct tcp_l #ifdef TCPLOG_DEBUG_COUNTERS counter_u64_add(tcp_log_que_copyout, 1); #endif -#if 0 - struct tcp_log_buffer *lb = &log_entry->tlm_buf; - int i; - printf("lb = %p:\n", lb); -#definePRINT(f)printf(#f " = %u\n", (unsigned int)lb->f) - printf("tlb_tv = {%lu, %lu}\n", lb->tlb_tv.tv_sec, lb->tlb_tv.tv_usec); - PRINT(tlb_ticks); - PRINT(tlb_sn); - PRINT(tlb_stackid); - PRINT(tlb_eventid); - PRINT(tlb_eventflags); - PRINT(tlb_errno); - PRINT(tlb_rxbuf.tls_sb_acc); - PRINT(tlb_rxbuf.tls_sb_ccc); - PRINT(tlb_rxbuf.tls_sb_spare); - PRINT(tlb_txbuf.tls_sb_acc); - PRINT(tlb_txbuf.tls_sb_ccc); - PRINT(tlb_txbuf.tls_sb_spare); - PRINT(tlb_state); - PRINT(tlb_flags); - PRINT(tlb_snd_una); - PRINT(tlb_snd_max); - PRINT(tlb_snd_cwnd); - PRINT(tlb_snd_nxt); - PRINT(tlb_snd_recover); - PRINT(tlb_snd_wnd); - PRINT(tlb_snd_ssthresh); - PRINT(tlb_srtt); - PRINT(tlb_rttvar); - PRINT(tlb_rcv_up); - PRINT(tlb_rcv_adv); - PRINT(tlb_rcv_nxt); - PRINT(tlb_sack_newdata); - PRINT(tlb_rcv_wnd); - PRINT(tlb_dupacks); - PRINT(tlb_segqlen); - PRINT(tlb_snd_numholes); - PRINT(tlb_snd_scale); - PRINT(tlb_rcv_scale); - PRINT(tlb_len); - printf("hex dump: "); - for (i = 0; i < sizeof(struct tcp_log_buffer); i++) - printf("%02x", *(((uint8_t *)lb) + i)); -#undef PRINT -#endif /* * Skip copying out the header if it isn't present. * Instead, copy out zeros (to ensure we don't leak info). ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332379 - head/sys/netinet
Author: jtl Date: Tue Apr 10 15:54:29 2018 New Revision: 332379 URL: https://svnweb.freebsd.org/changeset/base/332379 Log: Move the TCP Blackbox Recorder probe in tcp_output.c to be with the other tracing/debugging code. Sponsored by: Netflix, Inc. Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c == --- head/sys/netinet/tcp_output.c Tue Apr 10 15:51:37 2018 (r332378) +++ head/sys/netinet/tcp_output.c Tue Apr 10 15:54:29 2018 (r332379) @@ -1311,10 +1311,6 @@ send: } #endif - /* We're getting ready to send; log now. */ - TCP_LOG_EVENT(tp, th, &so->so_rcv, &so->so_snd, TCP_LOG_OUT, ERRNO_UNK, - len, NULL, false); - /* * Enable TSO and specify the size of the segments. * The TCP pseudo header checksum is always provided. @@ -1362,6 +1358,10 @@ send: } #endif /* TCPDEBUG */ TCP_PROBE3(debug__output, tp, th, m); + + /* We're getting ready to send; log now. */ + TCP_LOG_EVENT(tp, th, &so->so_rcv, &so->so_snd, TCP_LOG_OUT, ERRNO_UNK, + len, NULL, false); /* * Fill in IP length and desired time to live and ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332365 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
On Tue, Apr 10, 2018 at 11:17:33AM -0400, Mark Johnston wrote: > On Tue, Apr 10, 2018 at 05:09:57PM +0300, Slawa Olhovchenkov wrote: > > On Tue, Apr 10, 2018 at 01:56:06PM +, Mark Johnston wrote: > > > > > Author: markj > > > Date: Tue Apr 10 13:56:06 2018 > > > New Revision: 332365 > > > URL: https://svnweb.freebsd.org/changeset/base/332365 > > > > > > Log: > > > Set zfs_arc_free_target to v_free_target. > > > > > > Page daemon output is now regulated by a PID controller with a setpoint > > > of v_free_target. Moreover, the page daemon now wakes up regularly > > > rather than waiting for a wakeup from another thread. This means that > > > the free page count is unlikely to drop below the old > > > zfs_arc_free_target value, and as a result the ARC was not readily > > > freeing pages under memory pressure. Address the immediate problem by > > > updating zfs_arc_free_target to match the page daemon's new behaviour. > > > > Can you explain some more about new page daemon algo (and reclaim zone > > free memory)? > > The old algorithm was pretty simple: there was a free page target and > below that, a wakeup threshold. Any time a thread allocated a page and > in so doing caused the free page count to drop below the wakeup > threshold, that thread would wake up the page daemon, which would scan > the inactive queue and free pages until the free target is reached, or > the end of the inactive queue was reached. > > This is simple and easy to reason about, but has some drawbacks. When > memory pressure is constant, it leads to bursts of CPU usage and lock > contention. The static watermarks may also be insufficient for some > demanding workloads. In particular, the wakeup threshold might be too > low, thus allowing the free page count to drop to dangerous levels and > triggering expensive memory shortage handling (i.e., VM_WAIT). > > The new algorithm uses a control loop to dynamically compute a target > for each scan of the inactive queue. The loop takes as input the > magnitude of the page shortage (v_free_target - v_free_count) and keeps > track of the rate of change of this difference (i.e., the rate at which > free pages are being consumed) and the sum of this difference over time > (i.e., a cumulative value for the magnitude of recent page shortages). > These factors are used to compute "shortage", the number of pages to > reclaim with the goal of maintaining a free page count of v_free_target. > > The effect of the new algorithm is that the page daemon runs more > frequently but for shorter durations, so its CPU usage is more even. It > responds dynamically to the demands of the workload, so the shortcomings > of a pair of static watermarks are gone. > > r329882 doesn't really change anything with respect to reclamation of > pages from UMA zones. There are some plans to address shortcomings there > in the near future though. Thank, very nice explain. IMHO, in this case for ZFS best is old zfs_arc_free_target: too close zfs_arc_free_target to vm_cnt.v_free_min can cause too often run arc_target correction and cause CPU consumption and memory subsystem overuse. ZFS need more correct pressure, ZFS-specific, and I am try it in D7538. > > PS: zfs need some more time for free pages from ARC. Also, vanila zfs > > have broken logic for count used and free ARC's memory. For most > > correctly count system-wide used and free memory need accounting > > in-zone free memory. > > Yes, there is a number of problems in this area predating r329882. This > commit is really just a bandaid. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332380 - stable/11/sys/sparc64/include
Author: emaste Date: Tue Apr 10 16:44:40 2018 New Revision: 332380 URL: https://svnweb.freebsd.org/changeset/base/332380 Log: MFC r318412: fix sparc64 build by restoring 'register' in pcpu.h Modified: stable/11/sys/sparc64/include/pcpu.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sparc64/include/pcpu.h == --- stable/11/sys/sparc64/include/pcpu.hTue Apr 10 15:54:29 2018 (r332379) +++ stable/11/sys/sparc64/include/pcpu.hTue Apr 10 16:44:40 2018 (r332380) @@ -71,8 +71,8 @@ extern void *dpcpu0; struct pcb; struct pcpu; -struct pcb *curpcb __asm__(__XSTRING(PCB_REG)); -struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG)); +register struct pcb *curpcb __asm__(__XSTRING(PCB_REG)); +register struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG)); #definePCPU_GET(member)(pcpup->pc_ ## member) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332381 - head/sys/netinet
Author: jtl Date: Tue Apr 10 16:59:36 2018 New Revision: 332381 URL: https://svnweb.freebsd.org/changeset/base/332381 Log: Modify the net.inet.tcp.function_ids sysctl introduced in r331347. Export additional information which may be helpful to userspace consumers and rename the sysctl to net.inet.tcp.function_info. Sponsored by: Netflix, Inc. Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c == --- head/sys/netinet/tcp_subr.c Tue Apr 10 16:44:40 2018(r332380) +++ head/sys/netinet/tcp_subr.c Tue Apr 10 16:59:36 2018(r332381) @@ -255,6 +255,7 @@ static struct tcp_function_block tcp_def_funcblk = { }; int t_functions_inited = 0; +static int tcp_fb_cnt = 0; struct tcp_funchead t_functions; static struct tcp_function_block *tcp_func_set_ptr = &tcp_def_funcblk; @@ -426,14 +427,14 @@ SYSCTL_PROC(_net_inet_tcp, OID_AUTO, functions_availab "list available TCP Function sets"); /* - * Exports one (struct tcp_function_id) for each non-alias. + * Exports one (struct tcp_function_info) for each alias/name. */ static int -sysctl_net_inet_list_func_ids(SYSCTL_HANDLER_ARGS) +sysctl_net_inet_list_func_info(SYSCTL_HANDLER_ARGS) { - int error, cnt; + int cnt, error; struct tcp_function *f; - struct tcp_function_id tfi; + struct tcp_function_info tfi; /* * We don't allow writes. @@ -452,21 +453,32 @@ sysctl_net_inet_list_func_ids(SYSCTL_HANDLER_ARGS) } /* -* Walk the list, comparing the name of the function entry and -* function block to determine which is an alias. -* If exporting the list, copy out matching entries. Otherwise, -* just record the total length. +* Walk the list and copy out matching entries. If INVARIANTS +* is compiled in, also walk the list to verify the length of +* the list matches what we have recorded. */ - cnt = 0; rw_rlock(&tcp_function_lock); +#ifdef INVARIANTS + cnt = 0; +#else + if (req->oldptr == NULL) { + cnt = tcp_fb_cnt; + goto skip_loop; + } +#endif TAILQ_FOREACH(f, &t_functions, tf_next) { - if (strncmp(f->tf_name, f->tf_fb->tfb_tcp_block_name, - TCP_FUNCTION_NAME_LEN_MAX)) - continue; +#ifdef INVARIANTS + cnt++; +#endif if (req->oldptr != NULL) { + tfi.tfi_refcnt = f->tf_fb->tfb_refcnt; tfi.tfi_id = f->tf_fb->tfb_id; - (void)strncpy(tfi.tfi_name, f->tf_name, + (void)strncpy(tfi.tfi_alias, f->tf_name, TCP_FUNCTION_NAME_LEN_MAX); + tfi.tfi_alias[TCP_FUNCTION_NAME_LEN_MAX - 1] = '\0'; + (void)strncpy(tfi.tfi_name, + f->tf_fb->tfb_tcp_block_name, + TCP_FUNCTION_NAME_LEN_MAX); tfi.tfi_name[TCP_FUNCTION_NAME_LEN_MAX - 1] = '\0'; error = SYSCTL_OUT(req, &tfi, sizeof(tfi)); /* @@ -474,20 +486,24 @@ sysctl_net_inet_list_func_ids(SYSCTL_HANDLER_ARGS) * mechanism we use to accumulate length * information if the buffer was too short. */ - } else - cnt++; + } } + KASSERT(cnt == tcp_fb_cnt, + ("%s: cnt (%d) != tcp_fb_cnt (%d)", __func__, cnt, tcp_fb_cnt)); +#ifndef INVARIANTS +skip_loop: +#endif rw_runlock(&tcp_function_lock); if (req->oldptr == NULL) error = SYSCTL_OUT(req, NULL, - (cnt + 1) * sizeof(struct tcp_function_id)); + (cnt + 1) * sizeof(struct tcp_function_info)); return (error); } -SYSCTL_PROC(_net_inet_tcp, OID_AUTO, function_ids, +SYSCTL_PROC(_net_inet_tcp, OID_AUTO, function_info, CTLTYPE_OPAQUE | CTLFLAG_SKIP | CTLFLAG_RD | CTLFLAG_MPSAFE, - NULL, 0, sysctl_net_inet_list_func_ids, "S,tcp_function_id", + NULL, 0, sysctl_net_inet_list_func_info, "S,tcp_function_info", "List TCP function block name-to-ID mappings"); /* @@ -653,6 +669,7 @@ register_tcp_functions_as_names(struct tcp_function_bl (void)strncpy(n->tf_name, names[i], TCP_FUNCTION_NAME_LEN_MAX); n->tf_name[TCP_FUNCTION_NAME_LEN_MAX - 1] = '\0'; TAILQ_INSERT_TAIL(&t_functions, n, tf_next); + tcp_fb_cnt++; rw_wunlock(&tcp_function_lock); } return(0); @@ -669,6 +686,7 @@ cleanup: if (!strncmp(n->tf_name, names[i], TCP_FUNCTION_NAME_LEN_MAX)) { TAILQ_REMOVE(&t_functions, n
svn commit: r332382 - head/sys/netinet
Author: jtl Date: Tue Apr 10 17:00:37 2018 New Revision: 332382 URL: https://svnweb.freebsd.org/changeset/base/332382 Log: Add missing header change from r332381. Sponsored by: Netflix, Inc. Pointy hat: jtl Modified: head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_var.h == --- head/sys/netinet/tcp_var.h Tue Apr 10 16:59:36 2018(r332381) +++ head/sys/netinet/tcp_var.h Tue Apr 10 17:00:37 2018(r332382) @@ -688,11 +688,14 @@ void tcp_inptoxtp(const struct inpcb *, struct xtcpcb #endif /* - * TCP function name-to-id mapping exported to user-land via sysctl(3). + * TCP function information (name-to-id mapping, aliases, and refcnt) + * exported to user-land via sysctl(3). */ -struct tcp_function_id { +struct tcp_function_info { + uint32_ttfi_refcnt; uint8_t tfi_id; chartfi_name[TCP_FUNCTION_NAME_LEN_MAX]; + chartfi_alias[TCP_FUNCTION_NAME_LEN_MAX]; }; /* ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332383 - head/sys/powerpc/booke
Author: jhibbits Date: Tue Apr 10 17:32:27 2018 New Revision: 332383 URL: https://svnweb.freebsd.org/changeset/base/332383 Log: Call through powerpc_interrupt for all Book-E interrupts Make int_external_input, int_decrementer, and int_performance_counter all now use trap_common, just like on AIM. The effects of this are: * All traps are now properly displayed in ddb. Previously traps from external input, decrementer, and performance counters, would display as just basic stack traces. Now the frame is displayed. * External interrupts are now handled with interrupts enabled, so handling can be preempted. This seems to fix a hang found post-r329882. Modified: head/sys/powerpc/booke/trap_subr.S Modified: head/sys/powerpc/booke/trap_subr.S == --- head/sys/powerpc/booke/trap_subr.S Tue Apr 10 17:00:37 2018 (r332382) +++ head/sys/powerpc/booke/trap_subr.S Tue Apr 10 17:32:27 2018 (r332383) @@ -563,11 +563,7 @@ INTERRUPT(int_instr_storage) INTERRUPT(int_external_input) STANDARD_PROLOG(SPR_SPRG1, PC_TEMPSAVE, SPR_SRR0, SPR_SRR1) FRAME_SETUP(SPR_SPRG1, PC_TEMPSAVE, EXC_EXI) - GET_TOCBASE(%r2) - addi%r3, %r1, CALLSIZE - bl CNAME(powerpc_interrupt) - TOC_RESTORE - b trapexit + b trap_common INTERRUPT(int_alignment) @@ -603,11 +599,7 @@ INTERRUPT(int_syscall) INTERRUPT(int_decrementer) STANDARD_PROLOG(SPR_SPRG1, PC_TEMPSAVE, SPR_SRR0, SPR_SRR1) FRAME_SETUP(SPR_SPRG1, PC_TEMPSAVE, EXC_DECR) - GET_TOCBASE(%r2) - addi%r3, %r1, CALLSIZE - bl CNAME(powerpc_interrupt) - TOC_RESTORE - b trapexit + b trap_common /* @@ -653,11 +645,7 @@ INTERRUPT(int_vecast) INTERRUPT(int_performance_counter) STANDARD_PROLOG(SPR_SPRG3, PC_TEMPSAVE, SPR_SRR0, SPR_SRR1) FRAME_SETUP(SPR_SPRG3, PC_TEMPSAVE, EXC_PERF) - GET_TOCBASE(%r2) - addi%r3, %r1, CALLSIZE - bl CNAME(powerpc_interrupt) - TOC_RESTORE - b trapexit + b trap_common #endif @@ -1002,7 +990,7 @@ trap_common: /* Call C trap dispatcher */ GET_TOCBASE(%r2) addi%r3, %r1, CALLSIZE - bl CNAME(trap) + bl CNAME(powerpc_interrupt) TOC_RESTORE .globl CNAME(trapexit) /* exported for db_backtrace use */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332384 - head/release/arm64
Author: gjb Date: Tue Apr 10 17:40:44 2018 New Revision: 332384 URL: https://svnweb.freebsd.org/changeset/base/332384 Log: Following r331292, many of the files (such as the LICENSE file) have moved from the u-boot-rpi3 share directory to the default rpi-firmware share directory. Remove the files from UBOOT_FILES and append the DTB file to a DTB_FILES list so the correct path is used, fixing a build failure. Sponsored by: The FreeBSD Foundation Modified: head/release/arm64/RPI3.conf Modified: head/release/arm64/RPI3.conf == --- head/release/arm64/RPI3.confTue Apr 10 17:32:27 2018 (r332383) +++ head/release/arm64/RPI3.confTue Apr 10 17:40:44 2018 (r332384) @@ -22,9 +22,10 @@ export BOARDNAME="RPI3" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi3" - UBOOT_FILES="LICENCE.broadcom README armstub8.bin bootcode.bin config.txt \ - fixup.dat fixup_cd.dat fixup_x.dat start.elf start_cd.elf \ - start_x.elf u-boot.bin" + UBOOT_FILES="README u-boot.bin" + DTB_FILES="armstub8.bin bootcode.bin config.txt fixup_cd.dat \ + fixup_db.dat fixup_x.dat fixup.dat LICENCE.broadcom \ + start_cd.elf start_db.elf start_x.elf start.elf ${DTB}" FATMOUNT="${DESTDIR%${KERNEL}}fat" UFSMOUNT="${DESTDIR%${KERNEL}}ufs" chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" @@ -34,7 +35,10 @@ arm_install_uboot() { chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \ ${FATMOUNT}/${_UF} done - chroot ${CHROOTDIR} cp -p ${DTB_DIR}/${DTB} ${FATMOUNT}/${DTB} + for _DF in ${DTB_FILES}; do + chroot ${CHROOTDIR} cp -p ${DTB_DIR}/${_DF} \ + ${FATMOUNT}/${_DF} + done chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/overlays for _OL in ${OVERLAYS}; do chroot ${CHROOTDIR} cp -p ${OL_DIR}/${_OL} \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: New study: the best & worst states at managing debt
Hi there, Just following up because I didn’t hear back from you. Do you have a quick minute to check out our report? Here it is: https://www.credible.com/blog/best-worst-states-managing-debt/ I’m trying to spread the word and would love to share it with your audience. If you're interested, I could even write a personalized introduction to pair with it for you. What do you think of these survey results? Thanks, Neha Community Manager p: 866-540-6005 e: n...@credible.com w: credible.com On Fri, Apr 6, 2018 at 5:45 PM, Neha Chhabdiya wrote: Hi there, Debt is a major issue many Americans face today and we wanted to find out where people are faring the worst. I wanted to share this new analysis from Credible because you’ve touched on debt in the past. Here are a few highlights of the best and worst states at managing debt: On average, people in Michigan have the least debt relative to the income they make Hawaii has the highest average debt-to-income ratio of all states On average, borrowers are paying nearly $1,500 on monthly credit card bills, student loan debt, and housing costs I think it would be really interesting to see how your audience would respond to that. Will you let me know what you think of this piece? :) I can even send you a quick line of code to embed a map on your site if you’re interested. Thanks, Neha Neha Chhabdiya Community Manager p: 866-540-6005 e: n...@credible.com w: credible.comDon't want emails from us anymore? Reply to this email with the word "UNSUBSCRIBE" in the subject line. Credible Labs Inc., 101 Green Street Level 2, San Francisco California, 94111, United States Don't want emails from us anymore? Reply to this email with the word "UNSUBSCRIBE" in the subject line. Credible Labs Inc., 101 Green Street Level 2, San Francisco California, 94111, United States ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332385 - head/sys/dev/hyperv/storvsc
Author: dexuan Date: Tue Apr 10 18:05:02 2018 New Revision: 332385 URL: https://svnweb.freebsd.org/changeset/base/332385 Log: hyperv/storvsc: storvsc_io_done(): do not use CAM_SEL_TIMEOUT CAM_SEL_TIMEOUT was introduced in https://reviews.freebsd.org/D7521 (r304251), which claimed: "VM shall response to CAM layer with CAM_SEL_TIMEOUT to filter those invalid LUNs. Never use CAM_DEV_NOT_THERE which will block LUN scan for LUN number higher than 7." But it turns out this is not correct: I think what really filters the invalid LUNs in r304251 is that: before r304251, we could set the CAM_REQ_CMP without checking vm_srb->srb_status at all: ccb->ccb_h.status |= CAM_REQ_CMP. r304251 checks vm_srb->srb_status and sets ccb->ccb_h.status properly, so the invalid LUNs are filtered. I changed my code version to r304251 but replaced the CAM_SEL_TIMEOUT with CAM_DEV_NOT_THERE, and I confirmed the invalid LUNs can also be filtered, and I successfully hot-added and hot-removed 8 disks to/from the VM without any issue. CAM_SEL_TIMEOUT has an unwanted side effect -- see cam_periph_error(): For a selection timeout, we consider all of the LUNs on the target to be gone. If the status is CAM_DEV_NOT_THERE, then we only get rid of the device(s) specified by the path in the original CCB. This means: for a VM with a valid LUN on 3:0:0:0, when the VM inquires 3:0:0:1 and the host reports 3:0:0:1 doesn't exist and storvsc returns CAM_SEL_TIMEOUT to the CAM layer, CAM will detech 3:0:0:0 as well: this is the bug I reported recently: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226583 PR: 226583 Reviewed by: mav MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D14690 Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c == --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.cTue Apr 10 17:40:44 2018(r332384) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.cTue Apr 10 18:05:02 2018(r332385) @@ -2173,20 +2173,7 @@ storvsc_io_done(struct hv_storvsc_request *reqp) scsi_op_desc(cmd->opcode, NULL)); } } - - /* -* XXX For a selection timeout, all of the LUNs -* on the target will be gone. It works for SCSI -* disks, but does not work for IDE disks. -* -* For CAM_DEV_NOT_THERE, CAM will only get -* rid of the device(s) specified by the path. -*/ - if (storvsc_get_storage_type(sc->hs_dev) == - DRIVER_STORVSC) - ccb->ccb_h.status |= CAM_SEL_TIMEOUT; - else - ccb->ccb_h.status |= CAM_DEV_NOT_THERE; + ccb->ccb_h.status |= CAM_DEV_NOT_THERE; } else { ccb->ccb_h.status |= CAM_REQ_CMP; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332386 - head/share/misc
Author: ram Date: Tue Apr 10 18:39:20 2018 New Revision: 332386 URL: https://svnweb.freebsd.org/changeset/base/332386 Log: Updated mentors information. Approved by: ken, mav Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Tue Apr 10 18:05:02 2018 (r332385) +++ head/share/misc/committers-src.dot Tue Apr 10 18:39:20 2018 (r332386) @@ -76,6 +76,7 @@ nate [label="Nate Willams\nn...@freebsd.org\n1993/06/1 njl [label="Nate Lawson\n...@freebsd.org\n2002/08/07\n2008/02/16"] non [label="Noriaki Mitsnaga\n...@freebsd.org\n2000/06/19\n2007/03/06"] onoe [label="Atsushi Onoe\no...@freebsd.org\n2000/07/21\n2008/11/10"] +ram [label="Ram Kishore Vegesna\n...@freebsd.org\n2018/04/04\n???/??/??"] rafan [label="Rong-En Fan\nra...@freebsd.org\n2007/01/31\n2012/07/23"] randi [label="Randi Harper\nra...@freebsd.org\n2010/04/20\n2012/05/10"] rink [label="Rink Springer\nr...@freebsd.org\n2006/01/16\n2010/11/04"] @@ -629,6 +630,7 @@ kan -> kib ken -> asomers ken -> chuck +ken -> ram ken -> slm kib -> ae @@ -671,6 +673,7 @@ markm -> sheldonh mav -> ae mav -> eugen +mav -> ram mdf -> gleb ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332387 - in head/sys/geom: . bde cache concat eli gate journal label linux_lvm mirror mountver multipath nop part raid3 shsec stripe uzip vinum virstor zero
Author: kevans Date: Tue Apr 10 19:18:16 2018 New Revision: 332387 URL: https://svnweb.freebsd.org/changeset/base/332387 Log: Annotate geom modules with MODULE_VERSION GEOM ELI may double ask the password during boot. Once at loader time, and once at init time. This happens due a module loading bug. By default GEOM ELI caches the password in the kernel, but without the MODULE_VERSION annotation, the kernel loads over the kernel module, even if the GEOM ELI was compiled into the kernel. In this case, the newly loaded module purges/invalidates/overwrites the GEOM ELI's password cache, which causes the double asking. MFC Note: There's a pc98 component to the original submission that is omitted here due to pc98 removal in head. This part will need to be revived upon MFC. Reviewed by: imp Submitted by: op Obtained from:opBSD MFC after:1 week Differential Revision:https://reviews.freebsd.org/D14992 Modified: head/sys/geom/bde/g_bde.c head/sys/geom/cache/g_cache.c head/sys/geom/concat/g_concat.c head/sys/geom/eli/g_eli.c head/sys/geom/gate/g_gate.c head/sys/geom/geom_bsd.c head/sys/geom/geom_ccd.c head/sys/geom/geom_fox.c head/sys/geom/geom_map.c head/sys/geom/geom_mbr.c head/sys/geom/geom_redboot.c head/sys/geom/geom_sunlabel.c head/sys/geom/geom_vol_ffs.c head/sys/geom/journal/g_journal_ufs.c head/sys/geom/label/g_label.c head/sys/geom/linux_lvm/g_linux_lvm.c head/sys/geom/mirror/g_mirror.c head/sys/geom/mountver/g_mountver.c head/sys/geom/multipath/g_multipath.c head/sys/geom/nop/g_nop.c head/sys/geom/part/g_part_apm.c head/sys/geom/part/g_part_bsd.c head/sys/geom/part/g_part_bsd64.c head/sys/geom/part/g_part_ebr.c head/sys/geom/part/g_part_gpt.c head/sys/geom/part/g_part_ldm.c head/sys/geom/part/g_part_mbr.c head/sys/geom/part/g_part_vtoc8.c head/sys/geom/raid3/g_raid3.c head/sys/geom/shsec/g_shsec.c head/sys/geom/stripe/g_stripe.c head/sys/geom/uzip/g_uzip.c head/sys/geom/vinum/geom_vinum.c head/sys/geom/virstor/g_virstor.c head/sys/geom/zero/g_zero.c Modified: head/sys/geom/bde/g_bde.c == --- head/sys/geom/bde/g_bde.c Tue Apr 10 18:39:20 2018(r332386) +++ head/sys/geom/bde/g_bde.c Tue Apr 10 19:18:16 2018(r332387) @@ -292,3 +292,4 @@ static struct g_class g_bde_class = { }; DECLARE_GEOM_CLASS(g_bde_class, g_bde); +MODULE_VERSION(geom_bde, 0); Modified: head/sys/geom/cache/g_cache.c == --- head/sys/geom/cache/g_cache.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/cache/g_cache.c Tue Apr 10 19:18:16 2018 (r332387) @@ -1016,3 +1016,4 @@ g_cache_dumpconf(struct sbuf *sb, const char *indent, } DECLARE_GEOM_CLASS(g_cache_class, g_cache); +MODULE_VERSION(geom_cache, 0); Modified: head/sys/geom/concat/g_concat.c == --- head/sys/geom/concat/g_concat.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/concat/g_concat.c Tue Apr 10 19:18:16 2018 (r332387) @@ -993,3 +993,4 @@ g_concat_dumpconf(struct sbuf *sb, const char *indent, } DECLARE_GEOM_CLASS(g_concat_class, g_concat); +MODULE_VERSION(geom_concat, 0); Modified: head/sys/geom/eli/g_eli.c == --- head/sys/geom/eli/g_eli.c Tue Apr 10 18:39:20 2018(r332386) +++ head/sys/geom/eli/g_eli.c Tue Apr 10 19:18:16 2018(r332387) @@ -1333,3 +1333,4 @@ g_eli_fini(struct g_class *mp) DECLARE_GEOM_CLASS(g_eli_class, g_eli); MODULE_DEPEND(g_eli, crypto, 1, 1, 1); +MODULE_VERSION(geom_eli, 0); Modified: head/sys/geom/gate/g_gate.c == --- head/sys/geom/gate/g_gate.c Tue Apr 10 18:39:20 2018(r332386) +++ head/sys/geom/gate/g_gate.c Tue Apr 10 19:18:16 2018(r332387) @@ -964,3 +964,4 @@ static moduledata_t g_gate_module = { }; DECLARE_MODULE(geom_gate, g_gate_module, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); DECLARE_GEOM_CLASS(g_gate_class, g_gate); +MODULE_VERSION(geom_gate, 0); Modified: head/sys/geom/geom_bsd.c == --- head/sys/geom/geom_bsd.cTue Apr 10 18:39:20 2018(r332386) +++ head/sys/geom/geom_bsd.cTue Apr 10 19:18:16 2018(r332387) @@ -614,3 +614,4 @@ static struct g_class g_bsd_class = { }; DECLARE_GEOM_CLASS(g_bsd_class, g_bsd); +MODULE_VERSION(geom_bsd, 0); Modified: head/sys/geom/geom_ccd.c == --- head/sys/geom/geom_ccd.cTue Apr 10 18:39:20 2018(r332386) +++ head/sys/geom/geom_ccd.cTue Apr 10 19:18:16 2018(r332387) @@ -936,3 +93
Re: svn commit: r332386 - head/share/misc
[ Charset UTF-8 unsupported, converting... ] > Author: ram > Date: Tue Apr 10 18:39:20 2018 > New Revision: 332386 > URL: https://svnweb.freebsd.org/changeset/base/332386 > > Log: > Updated mentors information. > > Approved by: ken, mav > > Modified: > head/share/misc/committers-src.dot > > Modified: head/share/misc/committers-src.dot > == > --- head/share/misc/committers-src.dotTue Apr 10 18:05:02 2018 > (r332385) > +++ head/share/misc/committers-src.dotTue Apr 10 18:39:20 2018 > (r332386) > @@ -76,6 +76,7 @@ nate [label="Nate Willams\nn...@freebsd.org\n1993/06/1 > njl [label="Nate Lawson\n...@freebsd.org\n2002/08/07\n2008/02/16"] > non [label="Noriaki Mitsnaga\n...@freebsd.org\n2000/06/19\n2007/03/06"] > onoe [label="Atsushi Onoe\no...@freebsd.org\n2000/07/21\n2008/11/10"] > +ram [label="Ram Kishore Vegesna\n...@freebsd.org\n2018/04/04\n???/??/??"] ^ That should be removed, you only have a start date. Oh and Welcome ram to the project! > rafan [label="Rong-En Fan\nra...@freebsd.org\n2007/01/31\n2012/07/23"] > randi [label="Randi Harper\nra...@freebsd.org\n2010/04/20\n2012/05/10"] > rink [label="Rink Springer\nr...@freebsd.org\n2006/01/16\n2010/11/04"] > @@ -629,6 +630,7 @@ kan -> kib > > ken -> asomers > ken -> chuck > +ken -> ram > ken -> slm > > kib -> ae > @@ -671,6 +673,7 @@ markm -> sheldonh > > mav -> ae > mav -> eugen > +mav -> ram > > mdf -> gleb > > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332386 - head/share/misc
On Tue, Apr 10, 2018 at 2:22 PM, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] >> Author: ram >> Date: Tue Apr 10 18:39:20 2018 >> New Revision: 332386 >> URL: https://svnweb.freebsd.org/changeset/base/332386 >> >> Log: >> Updated mentors information. >> >> Approved by: ken, mav >> >> Modified: >> head/share/misc/committers-src.dot >> >> Modified: head/share/misc/committers-src.dot >> == >> --- head/share/misc/committers-src.dotTue Apr 10 18:05:02 2018 >> (r332385) >> +++ head/share/misc/committers-src.dotTue Apr 10 18:39:20 2018 >> (r332386) >> @@ -76,6 +76,7 @@ nate [label="Nate Willams\nn...@freebsd.org\n1993/06/1 >> njl [label="Nate Lawson\n...@freebsd.org\n2002/08/07\n2008/02/16"] >> non [label="Noriaki Mitsnaga\n...@freebsd.org\n2000/06/19\n2007/03/06"] >> onoe [label="Atsushi Onoe\no...@freebsd.org\n2000/07/21\n2008/11/10"] >> +ram [label="Ram Kishore Vegesna\n...@freebsd.org\n2018/04/04\n???/??/??"] > ^ > That should be removed, you only have a start date. > Oh and Welcome ram to the project! > The entry is also smack dab in the middle of the alumni section, rather than the later 'active' section. =) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332388 - in head/sys: kern net
Author: shurd Date: Tue Apr 10 19:42:50 2018 New Revision: 332388 URL: https://svnweb.freebsd.org/changeset/base/332388 Log: Make BPF global lock an SX This allows NIC drivers to sleep on polling config operations. Submitted by: Matthew Macy Reviewed by: shurd Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D14982 Modified: head/sys/kern/subr_witness.c head/sys/net/bpf.c head/sys/net/bpfdesc.h Modified: head/sys/kern/subr_witness.c == --- head/sys/kern/subr_witness.cTue Apr 10 19:18:16 2018 (r332387) +++ head/sys/kern/subr_witness.cTue Apr 10 19:42:50 2018 (r332388) @@ -569,7 +569,7 @@ static struct witness_order_list_entry order_lists[] = /* * BPF */ - { "bpf global lock", &lock_class_mtx_sleep }, + { "bpf global lock", &lock_class_sx }, { "bpf interface lock", &lock_class_rw }, { "bpf cdev lock", &lock_class_mtx_sleep }, { NULL, NULL }, Modified: head/sys/net/bpf.c == --- head/sys/net/bpf.c Tue Apr 10 19:18:16 2018(r332387) +++ head/sys/net/bpf.c Tue Apr 10 19:42:50 2018(r332388) @@ -159,6 +159,9 @@ struct bpf_dltlist32 { #defineBIOCSETFNR32_IOW('B', 130, struct bpf_program32) #endif +#define BPF_LOCK()sx_xlock(&bpf_sx) +#define BPF_UNLOCK() sx_xunlock(&bpf_sx) +#define BPF_LOCK_ASSERT() sx_assert(&bpf_sx, SA_XLOCKED) /* * bpf_iflist is a list of BPF interface structures, each corresponding to a * specific DLT. The same network interface might have several BPF interface @@ -166,7 +169,7 @@ struct bpf_dltlist32 { * frames, ethernet frames, etc). */ static LIST_HEAD(, bpf_if) bpf_iflist, bpf_freelist; -static struct mtx bpf_mtx;/* bpf global lock */ +static struct sx bpf_sx; /* bpf global lock */ static int bpf_bpfd_cnt; static voidbpf_attachd(struct bpf_d *, struct bpf_if *); @@ -2821,7 +2824,7 @@ bpf_drvinit(void *unused) { struct cdev *dev; - mtx_init(&bpf_mtx, "bpf global lock", NULL, MTX_DEF); + sx_init(&bpf_sx, "bpf global lock"); LIST_INIT(&bpf_iflist); LIST_INIT(&bpf_freelist); Modified: head/sys/net/bpfdesc.h == --- head/sys/net/bpfdesc.h Tue Apr 10 19:18:16 2018(r332387) +++ head/sys/net/bpfdesc.h Tue Apr 10 19:42:50 2018(r332388) @@ -118,9 +118,6 @@ struct bpf_d { #define BPF_PID_REFRESH(bd, td)(bd)->bd_pid = (td)->td_proc->p_pid #define BPF_PID_REFRESH_CUR(bd)(bd)->bd_pid = curthread->td_proc->p_pid -#define BPF_LOCK() mtx_lock(&bpf_mtx) -#define BPF_UNLOCK() mtx_unlock(&bpf_mtx) -#define BPF_LOCK_ASSERT() mtx_assert(&bpf_mtx, MA_OWNED) /* * External representation of the bpf descriptor */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332389 - head/sys/net
Author: shurd Date: Tue Apr 10 19:48:24 2018 New Revision: 332389 URL: https://svnweb.freebsd.org/changeset/base/332389 Log: Split out flag manipulation from general context manipulation in iflib To avoid blocking on the context lock in the swi thread and risk potential deadlocks, this change protects lighter weight updates that only need to be consistent with each other with their own lock. Submitted by: Matthew Macy Reviewed by: shurd Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D14967 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c == --- head/sys/net/iflib.cTue Apr 10 19:42:50 2018(r332388) +++ head/sys/net/iflib.cTue Apr 10 19:48:24 2018(r332389) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014-2017, Matthew Macy + * Copyright (c) 2014-2018, Matthew Macy * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -163,7 +163,8 @@ struct iflib_ctx { if_shared_ctx_t ifc_sctx; struct if_softc_ctx ifc_softc_ctx; - struct mtx ifc_mtx; + struct mtx ifc_ctx_mtx; + struct mtx ifc_state_mtx; uint16_t ifc_nhwtxqs; uint16_t ifc_nhwrxqs; @@ -318,8 +319,10 @@ typedef struct iflib_sw_tx_desc_array { #defineIFC_INIT_DONE 0x020 #defineIFC_PREFETCH0x040 #defineIFC_DO_RESET0x080 -#defineIFC_CHECK_HUNG 0x100 +#defineIFC_DO_WATCHDOG 0x100 +#defineIFC_CHECK_HUNG 0x200 + #define CSUM_OFFLOAD (CSUM_IP_TSO|CSUM_IP6_TSO|CSUM_IP| \ CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP| \ CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP) @@ -535,13 +538,19 @@ rxd_info_zero(if_rxd_info_t ri) #define CTX_ACTIVE(ctx) ((if_getdrvflags((ctx)->ifc_ifp) & IFF_DRV_RUNNING)) -#define CTX_LOCK_INIT(_sc, _name) mtx_init(&(_sc)->ifc_mtx, _name, "iflib ctx lock", MTX_DEF) +#define CTX_LOCK_INIT(_sc, _name) mtx_init(&(_sc)->ifc_ctx_mtx, _name, "iflib ctx lock", MTX_DEF) +#define CTX_LOCK(ctx) mtx_lock(&(ctx)->ifc_ctx_mtx) +#define CTX_UNLOCK(ctx) mtx_unlock(&(ctx)->ifc_ctx_mtx) +#define CTX_LOCK_DESTROY(ctx) mtx_destroy(&(ctx)->ifc_ctx_mtx) -#define CTX_LOCK(ctx) mtx_lock(&(ctx)->ifc_mtx) -#define CTX_UNLOCK(ctx) mtx_unlock(&(ctx)->ifc_mtx) -#define CTX_LOCK_DESTROY(ctx) mtx_destroy(&(ctx)->ifc_mtx) +#define STATE_LOCK_INIT(_sc, _name) mtx_init(&(_sc)->ifc_state_mtx, _name, "iflib state lock", MTX_DEF) +#define STATE_LOCK(ctx) mtx_lock(&(ctx)->ifc_state_mtx) +#define STATE_UNLOCK(ctx) mtx_unlock(&(ctx)->ifc_state_mtx) +#define STATE_LOCK_DESTROY(ctx) mtx_destroy(&(ctx)->ifc_state_mtx) + + #define CALLOUT_LOCK(txq) mtx_lock(&txq->ift_mtx) #define CALLOUT_UNLOCK(txq)mtx_unlock(&txq->ift_mtx) @@ -2144,18 +2153,14 @@ iflib_timer(void *arg) if (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING) callout_reset_on(&txq->ift_timer, hz/2, iflib_timer, txq, txq->ift_timer.c_cpu); return; -hung: - CTX_LOCK(ctx); - if_setdrvflagbits(ctx->ifc_ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); + hung: device_printf(ctx->ifc_dev, "TX(%d) desc avail = %d, pidx = %d\n", txq->ift_id, TXQ_AVAIL(txq), txq->ift_pidx); - - IFDI_WATCHDOG_RESET(ctx); - ctx->ifc_watchdog_events++; - - ctx->ifc_flags |= IFC_DO_RESET; + STATE_LOCK(ctx); + if_setdrvflagbits(ctx->ifc_ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); + ctx->ifc_flags |= (IFC_DO_WATCHDOG|IFC_DO_RESET); iflib_admin_intr_deferred(ctx); - CTX_UNLOCK(ctx); + STATE_UNLOCK(ctx); } static void @@ -2673,10 +2678,10 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) return true; return (iflib_rxd_avail(ctx, rxq, *cidxp, 1)); err: - CTX_LOCK(ctx); + STATE_LOCK(ctx); ctx->ifc_flags |= IFC_DO_RESET; iflib_admin_intr_deferred(ctx); - CTX_UNLOCK(ctx); + STATE_UNLOCK(ctx); return (false); } @@ -3706,27 +3711,35 @@ _task_fn_admin(void *context) if_softc_ctx_t sctx = &ctx->ifc_softc_ctx; iflib_txq_t txq; int i; + bool oactive, running, do_reset, do_watchdog; - if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING)) { - if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_OACTIVE)) { - return; - } - } + STATE_LOCK(ctx); + running = (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING); + oactive = (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_OACTIVE); + do_reset = (ctx->ifc_flags & IFC_DO_RESET); + do_watchdog = (ctx->ifc_flags & IFC_DO_WATCHDOG); + ctx->ifc_flags &= ~(IFC_DO_RESET|IFC_DO_WATCHDOG); + STATE_UNLOCK(ctx); + if (!runni
svn commit: r332390 - in head/release: amd64 arm64 i386 powerpc
Author: emaste Date: Tue Apr 10 19:49:04 2018 New Revision: 332390 URL: https://svnweb.freebsd.org/changeset/base/332390 Log: make-memstick.sh: put partition args on separate lines This makes it easier to identify the individual partition types and facilitates comparisons across architectures. Reviewed by: gjb MFC after:1 week Sponsored by: The FreeBSD Foundation Modified: head/release/amd64/make-memstick.sh head/release/arm64/make-memstick.sh head/release/i386/make-memstick.sh head/release/powerpc/make-memstick.sh Modified: head/release/amd64/make-memstick.sh == --- head/release/amd64/make-memstick.sh Tue Apr 10 19:48:24 2018 (r332389) +++ head/release/amd64/make-memstick.sh Tue Apr 10 19:49:04 2018 (r332390) @@ -36,6 +36,12 @@ makefs -B little -o label=FreeBSD_Install -o version=2 rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local -mkimg -s gpt -b ${1}/boot/pmbr -p efi:=${1}/boot/boot1.efifat -p freebsd-boot:=${1}/boot/gptboot -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2} +mkimg -s gpt \ +-b ${1}/boot/pmbr \ +-p efi:=${1}/boot/boot1.efifat \ +-p freebsd-boot:=${1}/boot/gptboot \ +-p freebsd-ufs:=${2}.part \ +-p freebsd-swap::1M \ +-o ${2} rm ${2}.part Modified: head/release/arm64/make-memstick.sh == --- head/release/arm64/make-memstick.sh Tue Apr 10 19:48:24 2018 (r332389) +++ head/release/arm64/make-memstick.sh Tue Apr 10 19:49:04 2018 (r332390) @@ -36,6 +36,9 @@ makefs -B little -o label=FreeBSD_Install -o version=2 rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local -mkimg -s gpt -p efi:=${1}/boot/boot1.efifat -p freebsd:=${2}.part -o ${2} +mkimg -s gpt \ +-p efi:=${1}/boot/boot1.efifat \ +-p freebsd:=${2}.part \ +-o ${2} rm ${2}.part Modified: head/release/i386/make-memstick.sh == --- head/release/i386/make-memstick.sh Tue Apr 10 19:48:24 2018 (r332389) +++ head/release/i386/make-memstick.sh Tue Apr 10 19:49:04 2018 (r332390) @@ -36,6 +36,11 @@ makefs -B little -o label=FreeBSD_Install -o version=2 rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local -mkimg -s gpt -b ${1}/boot/pmbr -p freebsd-boot:=${1}/boot/gptboot -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2} +mkimg -s gpt \ +-b ${1}/boot/pmbr \ +-p freebsd-boot:=${1}/boot/gptboot \ +-p freebsd-ufs:=${2}.part \ +-p freebsd-swap::1M \ +-o ${2} rm ${2}.part Modified: head/release/powerpc/make-memstick.sh == --- head/release/powerpc/make-memstick.sh Tue Apr 10 19:48:24 2018 (r332389) +++ head/release/powerpc/make-memstick.sh Tue Apr 10 19:49:04 2018 (r332390) @@ -41,7 +41,10 @@ makefs -B big -o version=2 ${tempfile} ${1} rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local -mkimg -s apm -p freebsd-boot:=${1}/boot/boot1.hfs -p freebsd-ufs/FreeBSD_Install:=${tempfile} -o ${2} +mkimg -s apm \ +-p freebsd-boot:=${1}/boot/boot1.hfs \ +-p freebsd-ufs/FreeBSD_Install:=${tempfile} \ +-o ${2} rm -f ${tempfile} ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332391 - in stable/11/sys: contrib/ck contrib/ck/include contrib/ck/include/gcc contrib/ck/include/gcc/sparcv9 contrib/ck/include/gcc/x86 contrib/ck/include/gcc/x86_64 contrib/ck/inclu...
Author: cognet Date: Tue Apr 10 20:22:36 2018 New Revision: 332391 URL: https://svnweb.freebsd.org/changeset/base/332391 Log: MFC r329388, r331441 and r331898, to bring the -CURRENT ck version. r329388: Define CK_MD_TSO for the relevant arches (i386, amd64 and sparc64). Defaulting to CK_MD_RMO has the unfortunate side effect of generating memory barriers that are useless on those arches, and the even more unfortunate side effect of generating lfence/sfence/mfence on i386, even if older CPUs don't support it. This should fix the panic reported when using IPFW on a Pentium 3. Note that mfence and sfence might still be used in a few case, but that shouldn't happen in FreeBSD right now, and should be fixed upstream first. r331441: In __sync_bool_compare_and_swap(), return true if the returned value is the same as the expected one, not the desired one. r331898: Import CK as of commit b19ed4c6a56ec93215ab567ba18ba61bf1cfbac8 It should fix ck_pr_[load|store]_ptr on mips and riscv, make sure no *fence instructions are used on i386, as older cpus don't support it, and make sure we don't rely on gcc builtins that can lead to calls to libatomic when linked with -O0. Modified: stable/11/sys/contrib/ck/FREEBSD-Xlist stable/11/sys/contrib/ck/include/ck_cc.h stable/11/sys/contrib/ck/include/ck_hs.h stable/11/sys/contrib/ck/include/ck_md.h stable/11/sys/contrib/ck/include/ck_pr.h stable/11/sys/contrib/ck/include/ck_queue.h stable/11/sys/contrib/ck/include/ck_ring.h stable/11/sys/contrib/ck/include/gcc/ck_cc.h stable/11/sys/contrib/ck/include/gcc/ck_pr.h stable/11/sys/contrib/ck/include/gcc/sparcv9/ck_pr.h stable/11/sys/contrib/ck/include/gcc/x86/ck_pr.h stable/11/sys/contrib/ck/include/gcc/x86_64/ck_pr.h stable/11/sys/contrib/ck/include/spinlock/dec.h stable/11/sys/contrib/ck/src/ck_hs.c stable/11/sys/contrib/ck/src/ck_ht.c stable/11/sys/contrib/ck/src/ck_ht_hash.h stable/11/sys/contrib/ck/src/ck_internal.h stable/11/sys/contrib/ck/src/ck_rhs.c stable/11/sys/mips/mips/stdatomic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/ck/FREEBSD-Xlist == --- stable/11/sys/contrib/ck/FREEBSD-Xlist Tue Apr 10 19:49:04 2018 (r332390) +++ stable/11/sys/contrib/ck/FREEBSD-Xlist Tue Apr 10 20:22:36 2018 (r332391) @@ -8,4 +8,5 @@ */regressions */tools */include/ck_md.h.in +*/include/freebsd/ck_md.h.in */src/Makefile.in Modified: stable/11/sys/contrib/ck/include/ck_cc.h == --- stable/11/sys/contrib/ck/include/ck_cc.hTue Apr 10 19:49:04 2018 (r332390) +++ stable/11/sys/contrib/ck/include/ck_cc.hTue Apr 10 20:22:36 2018 (r332391) @@ -104,42 +104,36 @@ #define CK_CC_TYPEOF(X, DEFAULT) (DEFAULT) #endif +#define CK_F_CC_FFS_G(L, T)\ +CK_CC_INLINE static int\ +ck_cc_##L(T v) \ +{ \ + unsigned int i; \ + \ + if (v == 0) \ + return 0; \ + \ + for (i = 1; (v & 1) == 0; i++, v >>= 1);\ + return i; \ +} + #ifndef CK_F_CC_FFS #define CK_F_CC_FFS -CK_CC_INLINE static int -ck_cc_ffs(unsigned int x) -{ - unsigned int i; +CK_F_CC_FFS_G(ffs, unsigned int) +#endif /* CK_F_CC_FFS */ - if (x == 0) - return 0; +#ifndef CK_F_CC_FFSL +#define CK_F_CC_FFSL +CK_F_CC_FFS_G(ffsl, unsigned long) +#endif /* CK_F_CC_FFSL */ - for (i = 1; (x & 1) == 0; i++, x >>= 1); +#ifndef CK_F_CC_FFSLL +#define CK_F_CC_FFSLL +CK_F_CC_FFS_G(ffsll, unsigned long long) +#endif /* CK_F_CC_FFSLL */ - return i; -} -#endif +#undef CK_F_CC_FFS_G -#ifndef CK_F_CC_CLZ -#define CK_F_CC_CLZ -#include - -CK_CC_INLINE static int -ck_cc_clz(unsigned int x) -{ - unsigned int count, i; - - for (count = 0, i = sizeof(unsigned int) * CHAR_BIT; i > 0; count++) { - unsigned int bit = 1U << --i; - - if (x & bit) - break; - } - - return count; -} -#endif - #ifndef CK_F_CC_CTZ #define CK_F_CC_CTZ CK_CC_INLINE static int @@ -151,7 +145,6 @@ ck_cc_ctz(unsigned int x) return 0; for (i = 0; (x & 1) == 0; i++, x >>= 1); - return i; } #endif Modified: stable/11/sys/contrib/ck/include/ck_hs.h == --- stable/11/sys/contrib/ck/include/ck_hs.hTue Apr 10 19:49:04 2018 (r332390) +++ stable/11/sys/contr
svn commit: r332392 - head/sys/arm/broadcom/bcm2835
Author: gonzo Date: Tue Apr 10 20:31:25 2018 New Revision: 332392 URL: https://svnweb.freebsd.org/changeset/base/332392 Log: [pi] Do not attach bcm2835_pwm if DTB node is not enabled Switch to standard FDT-base driver behavior and don't attach if node "status" property value nn DTS is not set to "okay" On RPi PWM by default is disabled, to enable it pwm.dtbo from official repo[1] should be copied to overlays directory on SD card FAT partition and "dtoverlay=pwm" line added to config.txt. For more details see pwm overlay documentation[2] sysutils/rpi-firmware port now includes overlays, so they can be installed as a part of release image build. [1] https://github.com/raspberrypi/firmware/tree/master/boot [2] https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README No objections from: phk@ Modified: head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c == --- head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c Tue Apr 10 20:22:36 2018 (r332391) +++ head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c Tue Apr 10 20:31:25 2018 (r332392) @@ -276,12 +276,8 @@ static int bcm_pwm_probe(device_t dev) { -#if 0 - // XXX: default state is disabled in RPI3 DTB, assume for now - // XXX: that people want the PWM to work if the KLD this module. if (!ofw_bus_status_okay(dev)) return (ENXIO); -#endif if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332393 - head/sys/powerpc/powerpc
Author: jhibbits Date: Tue Apr 10 21:14:54 2018 New Revision: 332393 URL: https://svnweb.freebsd.org/changeset/base/332393 Log: Reenter KDB on fault on powerpc, instead of panicking Most other architectures already re-enter KDB on faults, powerpc and mips are the only outliers. Correct this for powerpc, so that now bad addresses can be handled gracefully instead of panicking. Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c == --- head/sys/powerpc/powerpc/trap.c Tue Apr 10 20:31:25 2018 (r332392) +++ head/sys/powerpc/powerpc/trap.c Tue Apr 10 21:14:54 2018 (r332393) @@ -208,6 +208,13 @@ trap(struct trapframe *frame) VM_CNT_INC(v_trap); +#ifdef KDB + if (kdb_active) { + kdb_reenter(); + return; + } +#endif + td = curthread; p = td->td_proc; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332394 - head/sys/kern
Author: mjg Date: Tue Apr 10 22:32:31 2018 New Revision: 332394 URL: https://svnweb.freebsd.org/changeset/base/332394 Log: rw: whack avoidable re-reads in try_upgrade Modified: head/sys/kern/kern_rwlock.c Modified: head/sys/kern/kern_rwlock.c == --- head/sys/kern/kern_rwlock.c Tue Apr 10 21:14:54 2018(r332393) +++ head/sys/kern/kern_rwlock.c Tue Apr 10 22:32:31 2018(r332394) @@ -1204,7 +1204,7 @@ __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t v L int __rw_try_upgrade_int(struct rwlock *rw LOCK_FILE_LINE_ARG_DEF) { - uintptr_t v, x, tid; + uintptr_t v, setv, tid; struct turnstile *ts; int success; @@ -1224,12 +1224,12 @@ __rw_try_upgrade_int(struct rwlock *rw LOCK_FILE_LINE_ */ tid = (uintptr_t)curthread; success = 0; + v = RW_READ_VALUE(rw); for (;;) { - v = rw->rw_lock; if (RW_READERS(v) > 1) break; if (!(v & RW_LOCK_WAITERS)) { - success = atomic_cmpset_acq_ptr(&rw->rw_lock, v, tid); + success = atomic_fcmpset_acq_ptr(&rw->rw_lock, &v, tid); if (!success) continue; break; @@ -1239,7 +1239,8 @@ __rw_try_upgrade_int(struct rwlock *rw LOCK_FILE_LINE_ * Ok, we think we have waiters, so lock the turnstile. */ ts = turnstile_trywait(&rw->lock_object); - v = rw->rw_lock; + v = RW_READ_VALUE(rw); +retry_ts: if (RW_READERS(v) > 1) { turnstile_cancel(ts); break; @@ -1250,16 +1251,16 @@ __rw_try_upgrade_int(struct rwlock *rw LOCK_FILE_LINE_ * If we obtain the lock with the flags set, then claim * ownership of the turnstile. */ - x = rw->rw_lock & RW_LOCK_WAITERS; - success = atomic_cmpset_ptr(&rw->rw_lock, v, tid | x); + setv = tid | (v & RW_LOCK_WAITERS); + success = atomic_fcmpset_ptr(&rw->rw_lock, &v, setv); if (success) { - if (x) + if (v & RW_LOCK_WAITERS) turnstile_claim(ts); else turnstile_cancel(ts); break; } - turnstile_cancel(ts); + goto retry_ts; } LOCK_LOG_TRY("WUPGRADE", &rw->lock_object, 0, success, file, line); if (success) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332395 - head/sys/kern
Author: ian Date: Tue Apr 10 22:57:56 2018 New Revision: 332395 URL: https://svnweb.freebsd.org/changeset/base/332395 Log: Use explicit_bzero() when cleaning values out of the kernel environment. Sometimes the values contain geli passphrases being communicated from loader(8) to the kernel, and some day the compiler may decide to start eliding calls to memset() for a pointer which is not dereferenced again before being passed to free(). Modified: head/sys/kern/kern_environment.c Modified: head/sys/kern/kern_environment.c == --- head/sys/kern/kern_environment.cTue Apr 10 22:32:31 2018 (r332394) +++ head/sys/kern/kern_environment.cTue Apr 10 22:57:56 2018 (r332395) @@ -289,7 +289,7 @@ init_dynamic_kenv(void *data __unused) if (i < KENV_SIZE) { kenvp[i] = malloc(len, M_KENV, M_WAITOK); strcpy(kenvp[i++], cp); - memset(cp, 0, strlen(cp)); + explicit_bzero(cp, strlen(cp)); } else printf( "WARNING: too many kenv strings, ignoring %s\n", @@ -308,7 +308,7 @@ freeenv(char *env) { if (dynamic_kenv && env != NULL) { - memset(env, 0, strlen(env)); + explicit_bzero(env, strlen(env)); free(env, M_KENV); } } @@ -486,7 +486,7 @@ kern_unsetenv(const char *name) kenvp[i++] = kenvp[j]; kenvp[i] = NULL; mtx_unlock(&kenv_lock); - memset(oldenv, 0, strlen(oldenv)); + explicit_bzero(oldenv, strlen(oldenv)); free(oldenv, M_KENV); return (0); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332396 - head/bin/setfacl
Author: emaste Date: Tue Apr 10 23:29:57 2018 New Revision: 332396 URL: https://svnweb.freebsd.org/changeset/base/332396 Log: setfacl: add recursive functionality Add a -R option to setfacl to operate recursively on directories, along with the accompanying flags -H, -L, and -P (whose behaviour mimics chmod). A patch was submitted with PR 155163, but this is a new implementation based on comments raised in the Phabricator review for that patch (review D9096). PR: 155163 Submitted by: Mitchell Horne Reviewed by: jilles MFC after:2 weeks Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D14934 Modified: head/bin/setfacl/setfacl.1 head/bin/setfacl/setfacl.c head/bin/setfacl/setfacl.h head/bin/setfacl/util.c Modified: head/bin/setfacl/setfacl.1 == --- head/bin/setfacl/setfacl.1 Tue Apr 10 22:57:56 2018(r332395) +++ head/bin/setfacl/setfacl.1 Tue Apr 10 23:29:57 2018(r332396) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 23, 2016 +.Dd April 10, 2018 .Dt SETFACL 1 .Os .Sh NAME @@ -34,6 +34,7 @@ .Nd set ACL information .Sh SYNOPSIS .Nm +.Op Fl R Op Fl H | L | P .Op Fl bdhkn .Op Fl a Ar position entries .Op Fl m Ar entries @@ -83,6 +84,12 @@ default ACL's. This option is not applicable to NFSv4 .It Fl h If the target of the operation is a symbolic link, perform the operation on the symbolic link itself, rather than following the link. +.It Fl H +If the +.Fl R +option is specified, symbolic links on the command line are followed +and hence unaffected by the command. +(Symbolic links encountered during tree traversal are not followed.) .It Fl k Delete any default ACL entries on the specified files. It @@ -91,6 +98,10 @@ any default ACL entries. An error will be reported if any of the specified files cannot have a default entry (i.e.\& non-directories). This option is not applicable to NFSv4 ACLs. +.It Fl L +If the +.Fl R +option is specified, all symbolic links are followed. .It Fl m Ar entries Modify the ACL on the specified file. New entries will be added, and existing entries will be modified @@ -116,6 +127,13 @@ the input is taken from stdin. Do not recalculate the permissions associated with the ACL mask entry. This option is not applicable to NFSv4 ACLs. +.It Fl P +If the +.Fl R +option is specified, no symbolic links are followed. +This is the default. +.It Fl R +Perform the action recursively on any specified directories. .It Fl x Ar entries | position If .Ar entries Modified: head/bin/setfacl/setfacl.c == --- head/bin/setfacl/setfacl.c Tue Apr 10 22:57:56 2018(r332395) +++ head/bin/setfacl/setfacl.c Tue Apr 10 23:29:57 2018(r332396) @@ -35,6 +35,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include #include #include #include @@ -59,41 +62,20 @@ struct sf_entry { }; static TAILQ_HEAD(, sf_entry) entrylist; -/* TAILQ entry for files */ -struct sf_file { - const char *filename; - TAILQ_ENTRY(sf_file) next; -}; -static TAILQ_HEAD(, sf_file) filelist; - uint have_mask; uint need_mask; uint have_stdin; uint n_flag; -static voidadd_filename(const char *filename); static voidusage(void); static void -add_filename(const char *filename) -{ - struct sf_file *file; - - if (strlen(filename) > PATH_MAX - 1) { - warn("illegal filename"); - return; - } - file = zmalloc(sizeof(struct sf_file)); - file->filename = filename; - TAILQ_INSERT_TAIL(&filelist, file, next); -} - -static void usage(void) { - fprintf(stderr, "usage: setfacl [-bdhkn] [-a position entries] " - "[-m entries] [-M file] [-x entries] [-X file] [file ...]\n"); + fprintf(stderr, "usage: setfacl [-R [-H | -L | -P]] [-bdhkn] " + "[-a position entries] [-m entries] [-M file] " + "[-x entries] [-X file] [file ...]\n"); exit(1); } @@ -104,23 +86,32 @@ main(int argc, char *argv[]) acl_type_t acl_type; acl_entry_t unused_entry; char filename[PATH_MAX]; - int local_error, carried_error, ch, i, entry_number, ret; - int h_flag; - struct sf_file *file; + int local_error, carried_error, ch, entry_number, ret, fts_options; + bool h_flag, H_flag, L_flag, R_flag, follow_symlink; + size_t fl_count, i; + FTS *ftsp; + FTSENT *file; + char **files_list; struct sf_entry *entry; - const char *fn_dup; char *end; - struct stat sb; acl_type = ACL_TYPE_ACCESS; - carried_error = local_error = 0; - h_flag = have_mask = have_stdin = n_flag = need_mask = 0; + carried_error = local_error = fts_options = 0; + have_m
svn commit: r332397 - stable/11/contrib/bsnmp/lib
Author: emaste Date: Tue Apr 10 23:38:31 2018 New Revision: 332397 URL: https://svnweb.freebsd.org/changeset/base/332397 Log: MFC r308490 by syrinx: Reply to a snmpEngineID discovery PDU with a Report PDU as per the requirements of RFC 3414 section 4. PR: 174974 Submitted by: pgu...@kallisys.net Modified: stable/11/contrib/bsnmp/lib/snmpagent.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/bsnmp/lib/snmpagent.c == --- stable/11/contrib/bsnmp/lib/snmpagent.c Tue Apr 10 23:29:57 2018 (r332396) +++ stable/11/contrib/bsnmp/lib/snmpagent.c Tue Apr 10 23:38:31 2018 (r332397) @@ -171,7 +171,10 @@ snmp_pdu_create_response(const struct snmp_pdu *pdu, s memset(resp, 0, sizeof(*resp)); strcpy(resp->community, pdu->community); resp->version = pdu->version; - resp->type = SNMP_PDU_RESPONSE; + if (pdu->flags & SNMP_MSG_AUTODISCOVER) + resp->type = SNMP_PDU_REPORT; /* RFC 3414.4 */ + else + resp->type = SNMP_PDU_RESPONSE; resp->request_id = pdu->request_id; resp->version = pdu->version; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r332398 - head/sys/kern
Author: mjg Date: Wed Apr 11 01:43:29 2018 New Revision: 332398 URL: https://svnweb.freebsd.org/changeset/base/332398 Log: locks: extend speculative spin waiting for readers to drain Now that 10 years have passed since the original limit of 1 was committed, bump it a little bit. Spinning waiting for writers is semi-informed in the sense that we always know if the owner is running and base the decision to spin on that. However, no such information is provided for read-locking. In particular this means that it is possible for a write-spinner to completely waste cpu time waiting for the lock to be released, while the reader holding it was preempted and is now waiting for the spinner to go off cpu. Nonetheless, in majority of cases it is an improvement to spin instead of instantly giving up and going to sleep. The current approach is pretty simple: snatch the number of current readers and performs that many pauses before checking again. The total number of pauses to execute is limited to 10k. If the lock is still not free by that time, go to sleep. Given the previously noted problem of not knowing whether spinning makes any sense to begin with the new limit has to remain rather conservative. But at the very least it should also be related to the machine. Waiting for writers uses parameters selected based on the number of activated hardware threads. The upper limit of pause instructions to be executed in-between re-reads of the lock is typically 16384 or 32678. It was selected as the limit of total spins. The lower bound is set to already present 1 as to not change it for smaller machines. Bumping the limit reduces system time by few % during benchmarks like buildworld, buildkernel and others. Tested on 2 and 4 socket machines (Broadwell, Skylake). Figuring out how to make a more informed decision while not pessimizing the fast path is left as an exercise for the reader. Modified: head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_rwlock.c == --- head/sys/kern/kern_rwlock.c Tue Apr 10 23:38:31 2018(r332397) +++ head/sys/kern/kern_rwlock.c Wed Apr 11 01:43:29 2018(r332398) @@ -95,8 +95,8 @@ struct lock_class lock_class_rw = { }; #ifdef ADAPTIVE_RWLOCKS -static int __read_frequently rowner_retries = 10; -static int __read_frequently rowner_loops = 1; +static int __read_frequently rowner_retries; +static int __read_frequently rowner_loops; static SYSCTL_NODE(_debug, OID_AUTO, rwlock, CTLFLAG_RD, NULL, "rwlock debugging"); SYSCTL_INT(_debug_rwlock, OID_AUTO, retry, CTLFLAG_RW, &rowner_retries, 0, ""); @@ -109,7 +109,15 @@ SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_base, CTLFLA SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_max, CTLFLAG_RW, &rw_delay.max, 0, ""); -LOCK_DELAY_SYSINIT_DEFAULT(rw_delay); +static void +rw_lock_delay_init(void *arg __unused) +{ + + lock_delay_default_init(&rw_delay); + rowner_retries = 10; + rowner_loops = max(1, rw_delay.max); +} +LOCK_DELAY_SYSINIT(rw_lock_delay_init); #endif /* Modified: head/sys/kern/kern_sx.c == --- head/sys/kern/kern_sx.c Tue Apr 10 23:38:31 2018(r332397) +++ head/sys/kern/kern_sx.c Wed Apr 11 01:43:29 2018(r332398) @@ -145,8 +145,8 @@ struct lock_class lock_class_sx = { #endif #ifdef ADAPTIVE_SX -static __read_frequently u_int asx_retries = 10; -static __read_frequently u_int asx_loops = 1; +static __read_frequently u_int asx_retries; +static __read_frequently u_int asx_loops; static SYSCTL_NODE(_debug, OID_AUTO, sx, CTLFLAG_RD, NULL, "sxlock debugging"); SYSCTL_UINT(_debug_sx, OID_AUTO, retries, CTLFLAG_RW, &asx_retries, 0, ""); SYSCTL_UINT(_debug_sx, OID_AUTO, loops, CTLFLAG_RW, &asx_loops, 0, ""); @@ -158,7 +158,15 @@ SYSCTL_INT(_debug_sx, OID_AUTO, delay_base, CTLFLAG_RW SYSCTL_INT(_debug_sx, OID_AUTO, delay_max, CTLFLAG_RW, &sx_delay.max, 0, ""); -LOCK_DELAY_SYSINIT_DEFAULT(sx_delay); +static void +sx_lock_delay_init(void *arg __unused) +{ + + lock_delay_default_init(&sx_delay); + asx_retries = 10; + asx_loops = max(1, sx_delay.max); +} +LOCK_DELAY_SYSINIT(sx_lock_delay_init); #endif void ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r332365 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
On 2018-04-10 09:56, Mark Johnston wrote: > Author: markj > Date: Tue Apr 10 13:56:06 2018 > New Revision: 332365 > URL: https://svnweb.freebsd.org/changeset/base/332365 > > Log: > Set zfs_arc_free_target to v_free_target. > > Page daemon output is now regulated by a PID controller with a setpoint > of v_free_target. Moreover, the page daemon now wakes up regularly > rather than waiting for a wakeup from another thread. This means that > the free page count is unlikely to drop below the old > zfs_arc_free_target value, and as a result the ARC was not readily > freeing pages under memory pressure. Address the immediate problem by > updating zfs_arc_free_target to match the page daemon's new behaviour. > > Reported and tested by: truckman > Discussed with: jeff > X-MFC with: r329882 > Differential Revision: https://reviews.freebsd.org/D14994 > On a somewhat unrelated note, can we rename this sysctl and change to be counted in bytes? When users are tuning ZFS, every other ZFS value is in bytes, not pages. Maybe keep the currently variable as it is, in pages, and adjust it by dividing the user set value by the page size. The current name is great, but I wouldn't want anyone to end up setting it to 4096x the value they actually want if we just changed it out from under them. -- Allan Jude signature.asc Description: OpenPGP digital signature
Re: svn commit: r315449 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
On 2018-02-25 22:56, Allan Jude wrote: > On 2017-03-17 08:34, Steven Hartland wrote: >> Author: smh >> Date: Fri Mar 17 12:34:57 2017 >> New Revision: 315449 >> URL: https://svnweb.freebsd.org/changeset/base/315449 >> >> Log: >> Reduce ARC fragmentation threshold >> >> As ZFS can request up to SPA_MAXBLOCKSIZE memory block e.g. during zfs >> recv, >> update the threshold at which we start agressive reclamation to use >> SPA_MAXBLOCKSIZE (16M) instead of the lower zfs_max_recordsize which >> defaults to 1M. >> >> PR:194513 >> Reviewed by: avg, mav >> MFC after: 1 month >> Sponsored by: Multiplay >> Differential Revision: https://reviews.freebsd.org/D10012 >> >> Modified: >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >> == >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.cFri Mar >> 17 12:34:56 2017(r315448) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.cFri Mar >> 17 12:34:57 2017(r315449) >> @@ -3978,7 +3978,7 @@ arc_available_memory(void) >> * Start aggressive reclamation if too little sequential KVA left. >> */ >> if (lowest > 0) { >> -n = (vmem_size(heap_arena, VMEM_MAXFREE) < zfs_max_recordsize) ? >> +n = (vmem_size(heap_arena, VMEM_MAXFREE) < SPA_MAXBLOCKSIZE) ? >> -((int64_t)vmem_size(heap_arena, VMEM_ALLOC) >> 4) : >> INT64_MAX; >> if (n < lowest) { >> > > I have some users reporting excessive ARC shrinking in 11.1 vs 11.0 due > to this change. > > Memory seems quite fragmented, and this change makes it much more > sensitive to that, but the problem seems to be that is can get to > aggressive. > > The most recent case, the machine has 128GB of ram, and no other major > processes running, just ZFS zvols being served over iSCIS by ctld. > > arc_max set to 85GB, rather conservative. After running for a few days, > fragmentation seems to trip this line, when there are no 16mb contiguous > blocks, and it shrinks the ARC by 1/16th of memory, but this does not > result in a 16mb contiguous chunk, so it shrinks the ARC by another > 1/16th, and again until it hits arc_min. Apparently eventually the ARC > does regrow, but then crashes again later. > > You can see the ARC oscillating between arc_max and arc_min, with some > long periods pinned at arc_min: https://imgur.com/a/emztF > > > [root@ZFS-AF ~]# vmstat -z | tail +3 | awk -F '[:,] *' 'BEGIN { total=0; > cache=0; used=0 } {u = $2 * $4; c = $2 * $5; t = u + c; cache += c; used > += u; total += t; name=$1; gsub(" ", "_", name); print t, name, u, c} > END { print total, "TOTAL", used, cache } ' | sort -n | perl -a -p -e > 'while (($j, $_) = each(@F)) { 1 while s/^(-?\d+)(\d{3})/$1,$2/; print > $_, " "} print "\n"' | column -t | tail TOTAL NAME USED Cache > 1,723,367,424zio_data_buf_49152 1,722,875,904491,520 > 1,827,057,664zio_buf_4096 1,826,848,768208,896 > 2,289,459,200zio_data_buf_40960 2,289,090,560368,640 > 3,642,736,640zio_data_buf_81920 3,642,408,960327,680 > 6,713,180,160zio_data_buf_98304 6,712,688,640491,520 > 9,388,195,840zio_buf_8192 9,388,064,768131,072 > 11,170,152,448 zio_data_buf_11468811,168,890,880 1,261,568 > 29,607,329,792 zio_data_buf_13107229,606,674,432 655,360 > 32,944,750,592 zio_buf_65536 32,943,833,088 917,504 > 114,235,296,752 TOTAL 111,787,212,900 2,448,083,852 > > > [root@ZFS-AF ~]# vmstat -z | tail +3 | awk -F '[:,] *' 'BEGIN { total=0; > cache=0; used=0 } {u = $2 * $4; c = $2 * $5; t = u + c; cache += c; used > += u; total += t; name=$1; gsub(" ", "_", name); print t, name, u, c} > END { print total, "TOTAL", used, cache } ' | sort -n +3 | perl -a -p -e > 'while (($j, $_) = each(@F)) { 1 while s/^(-?\d+)(\d{3})/$1,$2/; print > $_, " "} print "\n"' | column -t | tail Sorted by cache (waste) TOTAL NAME USED Cache > 71,565,312 cblk15 071,565,312 > 72,220,672 cblk16 072,220,672 > 72,351,744 cblk18 131,072 72,220,672 > 72,744,960 cblk3 072,744,960 > 75,497,472 cblk8 075,497,472 > 76,283,904 cblk22 076,283,904 > 403,696,384 128286,225,792 117,470,592 > 229,519,360 mbuf_jumbo_page67,043,328 162,476,032 > 1,196,795,160arc_buf_hdr_t_l2only 601,620,624 595,174,536 > 114,220,354,544 TOTAL 111,778,349,508 2,442,005,036 > > > Maybe the right