Re: svn commit: r339565 - in head: share/man/man4 share/man/man4/man4.i386 sys/conf sys/dev/aha sys/kern sys/modules sys/modules/aha sys/sparc64/conf
Op ma 22 okt. 2018 om 05:00 schreef Benjamin Kaduk : > On Sun, Oct 21, 2018 at 9:53 PM Warner Losh wrote: > > > > > > > On Sun, Oct 21, 2018 at 8:47 PM Benjamin Kaduk > wrote: > > > >> On Sun, Oct 21, 2018 at 9:35 PM Warner Losh wrote: > >> > >>> Author: imp > >>> Date: Mon Oct 22 02:34:25 2018 > >>> New Revision: 339565 > >>> URL: https://svnweb.freebsd.org/changeset/base/339565 > >>> > >>> Log: > >>> Remove aha(4) from the tree. > >>> > >>> > >> The documentation build is now failing, as there's an entity reference > to > >> the autogenerated > >> hardware list, which does not exist anymore. Will you be able to look > at > >> those as part of your > >> removals or does someone from the doc team need to handle it? > >> > > > > I'll take a look. What exactly is failing? The only place I see aha.4 is > > in doc/head/share/xml/man-refs.ent but there's several other drivers that > > have been removed that are in there... So I'm confused and need some > > additional guidance. > > > > The build log is mailed out at (e.g.) > https://lists.freebsd.org/pipermail/freebsd-doc/2018-October/031621.html > Though looking slightly more closely, it seems to be complaining about the > 12.0 release notes (!), which might both (1) be awkward to solve, and (2) > be in re@'s territory. > The website build (in doc/head/en_US.ISO8859-1/htdocs) does a partial CURRENT checkout: /usr/local/bin/svn co svn://svn.freebsd.org/base/head/share/man/man4 /usr/freebsd/doc/head/en_US.ISO8859-1/htdocs/releases/12.0R/hardware/svn.N0lzOSqR so it is not specific for the 12.0-RELEASE notes, they are just part of the doc build. I guess the doc repository refers to now deleted man(4) entries. René ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339581 - head/sys/dev/sound/midi
Author: hselasky Date: Mon Oct 22 08:55:58 2018 New Revision: 339581 URL: https://svnweb.freebsd.org/changeset/base/339581 Log: Fix off-by-one which can lead to panics. Found by: Peter Holm MFC after:3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/midi/sequencer.c Modified: head/sys/dev/sound/midi/sequencer.c == --- head/sys/dev/sound/midi/sequencer.c Mon Oct 22 07:04:44 2018 (r339580) +++ head/sys/dev/sound/midi/sequencer.c Mon Oct 22 08:55:58 2018 (r339581) @@ -730,7 +730,7 @@ static int seq_fetch_mid(struct seq_softc *scp, int unit, kobj_t *md) { - if (unit > scp->midi_number || unit < 0) + if (unit >= scp->midi_number || unit < 0) return EINVAL; *md = scp->midis[unit]; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339582 - head/sys/dev/sound/midi
Author: hselasky Date: Mon Oct 22 08:58:27 2018 New Revision: 339582 URL: https://svnweb.freebsd.org/changeset/base/339582 Log: Drop sequencer mutex around uiomove() and make sure we don't move more bytes than is available, else a panic might happen. Found by: Peter Holm MFC after:3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/midi/sequencer.c Modified: head/sys/dev/sound/midi/sequencer.c == --- head/sys/dev/sound/midi/sequencer.c Mon Oct 22 08:55:58 2018 (r339581) +++ head/sys/dev/sound/midi/sequencer.c Mon Oct 22 08:58:27 2018 (r339582) @@ -921,7 +921,9 @@ mseq_read(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(8, printf("midiread: uiomove cc=%d\n", used)); MIDIQ_DEQ(scp->in_q, buf, used); + mtx_unlock(&scp->seq_lock); retval = uiomove(buf, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err1; } @@ -996,7 +998,9 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io retval = ENXIO; goto err0; } + mtx_unlock(&scp->seq_lock); retval = uiomove(event, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1034,7 +1038,9 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io SEQ_DEBUG(2, printf("seq_write: SEQ_FULLSIZE flusing buffer.\n")); while (uio->uio_resid > 0) { - retval = uiomove(event, EV_SZ, uio); + mtx_unlock(&scp->seq_lock); + retval = uiomove(event, MIN(EV_SZ, uio->uio_resid), uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1045,6 +1051,7 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io } retval = EINVAL; if (ev_code >= 128) { + int error; /* * Some sort of an extended event. The size is eight @@ -1054,7 +1061,13 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io SEQ_DEBUG(2, printf("seq_write: invalid level two event %x.\n", ev_code)); goto err0; } - if (uiomove((caddr_t)&event[4], 4, uio)) { + mtx_unlock(&scp->seq_lock); + if (uio->uio_resid < 4) + error = EINVAL; + else + error = uiomove((caddr_t)&event[4], 4, uio); + mtx_lock(&scp->seq_lock); + if (error) { SEQ_DEBUG(2, printf("seq_write: user memory mangled?\n")); goto err0; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339583 - head/sys/dev/sound/midi
Author: hselasky Date: Mon Oct 22 08:59:20 2018 New Revision: 339583 URL: https://svnweb.freebsd.org/changeset/base/339583 Log: The event bytes should be unsigned char. Found by: Peter Holm MFC after:3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/midi/sequencer.c Modified: head/sys/dev/sound/midi/sequencer.c == --- head/sys/dev/sound/midi/sequencer.c Mon Oct 22 08:58:27 2018 (r339582) +++ head/sys/dev/sound/midi/sequencer.c Mon Oct 22 08:59:20 2018 (r339583) @@ -434,7 +434,7 @@ static void seq_eventthread(void *arg) { struct seq_softc *scp = arg; - char event[EV_SZ]; + u_char event[EV_SZ]; mtx_lock(&scp->seq_lock); SEQ_DEBUG(2, printf("seq_eventthread started\n")); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339582 - head/sys/dev/sound/midi
On Mon, Oct 22, 2018 at 08:58:28AM +, Hans Petter Selasky wrote: > Author: hselasky > Date: Mon Oct 22 08:58:27 2018 > New Revision: 339582 > URL: https://svnweb.freebsd.org/changeset/base/339582 > > Log: > Drop sequencer mutex around uiomove() and make sure we don't move more bytes > than is available, else a panic might happen. And why it is safe to drop the mutex ? If it is safe to drop, why do you need the mutex at all ? ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339565 - in head: share/man/man4 share/man/man4/man4.i386 sys/conf sys/dev/aha sys/kern sys/modules sys/modules/aha sys/sparc64/conf
Op ma 22 okt. 2018 om 10:29 schreef René Ladan : > Op ma 22 okt. 2018 om 05:00 schreef Benjamin Kaduk : > >> On Sun, Oct 21, 2018 at 9:53 PM Warner Losh wrote: >> >> > >> > >> > On Sun, Oct 21, 2018 at 8:47 PM Benjamin Kaduk >> wrote: >> > >> >> On Sun, Oct 21, 2018 at 9:35 PM Warner Losh wrote: >> >> >> >>> Author: imp >> >>> Date: Mon Oct 22 02:34:25 2018 >> >>> New Revision: 339565 >> >>> URL: https://svnweb.freebsd.org/changeset/base/339565 >> >>> >> >>> Log: >> >>> Remove aha(4) from the tree. >> >>> >> >>> >> >> The documentation build is now failing, as there's an entity reference >> to >> >> the autogenerated >> >> hardware list, which does not exist anymore. Will you be able to look >> at >> >> those as part of your >> >> removals or does someone from the doc team need to handle it? >> >> >> > >> > I'll take a look. What exactly is failing? The only place I see aha.4 is >> > in doc/head/share/xml/man-refs.ent but there's several other drivers >> that >> > have been removed that are in there... So I'm confused and need some >> > additional guidance. >> > >> >> The build log is mailed out at (e.g.) >> https://lists.freebsd.org/pipermail/freebsd-doc/2018-October/031621.html >> Though looking slightly more closely, it seems to be complaining about the >> 12.0 release notes (!), which might both (1) be awkward to solve, and (2) >> be in re@'s territory. >> > > The website build (in doc/head/en_US.ISO8859-1/htdocs) does a partial > CURRENT checkout: > > /usr/local/bin/svn co svn://svn.freebsd.org/base/head/share/man/man4 > /usr/freebsd/doc/head/en_US.ISO8859-1/htdocs/releases/12.0R/hardware/svn.N0lzOSqR > > so it is not specific for the 12.0-RELEASE notes, they are just part of > the doc build. I guess the doc repository refers to now deleted man(4) > entries. > > The full list seems to be: /usr/freebsd/doc/head/en_US.ISO8859-1/htdocs/releases/12.0R/hardware/hardware.xml:642: parser error : Entity 'hwlist.adv' not defined &hwlist.adv; ^ /usr/freebsd/doc/head/en_US.ISO8859-1/htdocs/releases/12.0R/hardware/hardware.xml:644: parser error : Entity 'hwlist.adw' not defined &hwlist.adw; ^ /usr/freebsd/doc/head/en_US.ISO8859-1/htdocs/releases/12.0R/hardware/hardware.xml:646: parser error : Entity 'hwlist.aha' not defined &hwlist.aha; ^ /usr/freebsd/doc/head/en_US.ISO8859-1/htdocs/releases/12.0R/hardware/hardware.xml:654: parser error : Entity 'hwlist.aic' not defined &hwlist.aic; ^ /usr/freebsd/doc/head/en_US.ISO8859-1/htdocs/releases/12.0R/hardware/hardware.xml:664: parser error : Entity 'hwlist.dpt' not defined &hwlist.dpt; ^ /usr/freebsd/doc/head/en_US.ISO8859-1/htdocs/releases/12.0R/hardware/hardware.xml:714: parser error : Entity 'hwlist.ncr' not defined &hwlist.ncr; ^ /usr/freebsd/doc/head/en_US.ISO8859-1/htdocs/releases/12.0R/hardware/hardware.xml:716: parser error : Entity 'hwlist.ncv' not defined &hwlist.ncv; ^ /usr/freebsd/doc/head/en_US.ISO8859-1/htdocs/releases/12.0R/hardware/hardware.xml:718: parser error : Entity 'hwlist.nsp' not defined &hwlist.nsp; ^ /usr/freebsd/doc/head/en_US.ISO8859-1/htdocs/releases/12.0R/hardware/hardware.xml:726: parser error : Entity 'hwlist.stg' not defined &hwlist.stg; ^ René ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339582 - head/sys/dev/sound/midi
On 10/22/18 11:51 AM, Konstantin Belousov wrote: On Mon, Oct 22, 2018 at 08:58:28AM +, Hans Petter Selasky wrote: Author: hselasky Date: Mon Oct 22 08:58:27 2018 New Revision: 339582 URL: https://svnweb.freebsd.org/changeset/base/339582 Log: Drop sequencer mutex around uiomove() and make sure we don't move more bytes than is available, else a panic might happen. And why it is safe to drop the mutex ? If it is safe to drop, why do you need the mutex at all ? The seq mutex protects the queue state, which is entirely computed prior or after uiomove(). --HPS ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339582 - head/sys/dev/sound/midi
On Mon, Oct 22, 2018 at 12:09:54PM +0200, Hans Petter Selasky wrote: > On 10/22/18 11:51 AM, Konstantin Belousov wrote: > > On Mon, Oct 22, 2018 at 08:58:28AM +, Hans Petter Selasky wrote: > >> Author: hselasky > >> Date: Mon Oct 22 08:58:27 2018 > >> New Revision: 339582 > >> URL: https://svnweb.freebsd.org/changeset/base/339582 > >> > >> Log: > >>Drop sequencer mutex around uiomove() and make sure we don't move more > >> bytes > >>than is available, else a panic might happen. > > And why it is safe to drop the mutex ? > > If it is safe to drop, why do you need the mutex at all ? > > > > The seq mutex protects the queue state, which is entirely computed prior > or after uiomove(). Then why do you need to re-acquire the mutex after uiomove ? ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339582 - head/sys/dev/sound/midi
On 10/22/18 12:20 PM, Konstantin Belousov wrote: Then why do you need to re-acquire the mutex after uiomove ? Hi, Because the code is factored this way: mtx_lock(); while (uio->uio_resid > 0) { do state checks() mtx_unlock(); retval = uiomove(); mtx_lock(); } mtx_unlock(); Yes, you're right the last mtx_lock() can be optimised away. I'm leaving that to somebody else. This code typically is processing MIDI events at very slow rates like 8KBytes/s and does not need to be very fast. --HPS ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339584 - in head/sys/dev/mlx5: . mlx5_core
Author: slavash Date: Mon Oct 22 10:38:38 2018 New Revision: 339584 URL: https://svnweb.freebsd.org/changeset/base/339584 Log: mlx5: Notify user that the ConnectX-6 shutdown its port due to power limitation If power exceed the slot limit, or slot limit is unknown the ConnectX-6 firmware will shutdown its port. Inform the user via debug message. MFC after: 3 days Approved by:hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/device.h head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Modified: head/sys/dev/mlx5/device.h == --- head/sys/dev/mlx5/device.h Mon Oct 22 08:59:20 2018(r339583) +++ head/sys/dev/mlx5/device.h Mon Oct 22 10:38:38 2018(r339584) @@ -549,6 +549,7 @@ enum { MLX5_MODULE_EVENT_ERROR_UNSUPPORTED_CABLE = 0x5, MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE = 0x6, MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED = 0x7, + MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED = 0xc, }; struct mlx5_eqe_port_module_event { Modified: head/sys/dev/mlx5/mlx5_core/mlx5_eq.c == --- head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Mon Oct 22 08:59:20 2018 (r339583) +++ head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Mon Oct 22 10:38:38 2018 (r339584) @@ -615,6 +615,12 @@ static const char *mlx5_port_module_event_error_type_t return "High Temperature"; case MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED: return "Cable is shorted"; + case MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED: + return "One or more network ports have been powered " + "down due to insufficient/unadvertised power on " + "the PCIe slot. Please refer to the card's user " + "manual for power specifications or contact " + "Mellanox support."; default: return "Unknown error type"; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339585 - head/sys/dev/hyperv/netvsc
Author: whu Date: Mon Oct 22 11:23:51 2018 New Revision: 339585 URL: https://svnweb.freebsd.org/changeset/base/339585 Log: Do not trop UDP traffic when TXCSUM_IPV6 flag is on PR: 231797 Submitted by: whu Reviewed by: dexuan Obtained from:Kevin Morse MFC after:3 days Sponsored by: Microsoft Differential Revision: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=198333&action=diff Modified: head/sys/dev/hyperv/netvsc/if_hn.c Modified: head/sys/dev/hyperv/netvsc/if_hn.c == --- head/sys/dev/hyperv/netvsc/if_hn.c Mon Oct 22 10:38:38 2018 (r339584) +++ head/sys/dev/hyperv/netvsc/if_hn.c Mon Oct 22 11:23:51 2018 (r339585) @@ -861,7 +861,8 @@ hn_set_hlen(struct mbuf *m_head) PULLUP_HDR(m_head, ehlen + sizeof(*ip6)); ip6 = mtodo(m_head, ehlen); - if (ip6->ip6_nxt != IPPROTO_TCP) { + if (ip6->ip6_nxt != IPPROTO_TCP && + ip6->ip6_nxt != IPPROTO_UDP) { m_freem(m_head); return (NULL); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339586 - head/usr.sbin/bhyve
Author: bz Date: Mon Oct 22 11:43:43 2018 New Revision: 339586 URL: https://svnweb.freebsd.org/changeset/base/339586 Log: In bhyve's fbuf emulation improve the overall "usage" message and for the vga option, rather than printing the entire option string, only print vga (as we do for everything else). MFC after:3 days Modified: head/usr.sbin/bhyve/pci_fbuf.c Modified: head/usr.sbin/bhyve/pci_fbuf.c == --- head/usr.sbin/bhyve/pci_fbuf.c Mon Oct 22 11:23:51 2018 (r339585) +++ head/usr.sbin/bhyve/pci_fbuf.c Mon Oct 22 11:43:43 2018 (r339586) @@ -117,8 +117,9 @@ static void pci_fbuf_usage(char *opt) { - fprintf(stderr, "Invalid fbuf emulation \"%s\"\r\n", opt); - fprintf(stderr, "fbuf: {wait,}{vga=on|io|off,}rfb=:port\r\n"); + fprintf(stderr, "Invalid fbuf emulation option \"%s\"\r\n", opt); + fprintf(stderr, "fbuf: {wait,}{vga=on|io|off,}rfb=:port" + "{,w=width}{,h=height}\r\n"); } static void @@ -268,7 +269,7 @@ pci_fbuf_parse_opts(struct pci_fbuf_softc *sc, char *o sc->vga_enabled = 1; sc->vga_full = 1; } else { - pci_fbuf_usage(opts); + pci_fbuf_usage(xopts); ret = -1; goto done; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339587 - head/sys/dev/usb/serial
Author: hselasky Date: Mon Oct 22 11:58:30 2018 New Revision: 339587 URL: https://svnweb.freebsd.org/changeset/base/339587 Log: Added support for formula-based arbitrary baud rates, in contrast to the current fixed values, which enables use of rates above 1 Mbps. Improved the detection of HXD chips, and the status flag handling as well. Submitted by: Gabor Simon PR: 225932 Differential revision:https://reviews.freebsd.org/D16639 MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/serial/uplcom.c Modified: head/sys/dev/usb/serial/uplcom.c == --- head/sys/dev/usb/serial/uplcom.cMon Oct 22 11:43:43 2018 (r339586) +++ head/sys/dev/usb/serial/uplcom.cMon Oct 22 11:58:30 2018 (r339587) @@ -134,12 +134,20 @@ SYSCTL_INT(_hw_usb_uplcom, OID_AUTO, debug, CTLFLAG_RW #defineUPLCOM_SET_CRTSCTS 0x41 #defineUPLCOM_SET_CRTSCTS_PL2303X 0x61 #defineRSAQ_STATUS_CTS 0x80 +#defineRSAQ_STATUS_OVERRUN_ERROR 0x40 +#defineRSAQ_STATUS_PARITY_ERROR0x20 +#defineRSAQ_STATUS_FRAME_ERROR 0x10 +#defineRSAQ_STATUS_RING0x08 +#defineRSAQ_STATUS_BREAK_ERROR 0x04 #defineRSAQ_STATUS_DSR 0x02 #defineRSAQ_STATUS_DCD 0x01 #defineTYPE_PL2303 0 #defineTYPE_PL2303HX 1 +#defineTYPE_PL2303HXD 2 +#defineUPLCOM_STATE_INDEX 8 + enum { UPLCOM_BULK_DT_WR, UPLCOM_BULK_DT_RD, @@ -369,18 +377,49 @@ uplcom_attach(device_t dev) sc->sc_udev = uaa->device; - /* Determine the chip type. This algorithm is taken from Linux. */ dd = usbd_get_device_descriptor(sc->sc_udev); - if (dd->bDeviceClass == 0x02) - sc->sc_chiptype = TYPE_PL2303; - else if (dd->bMaxPacketSize == 0x40) + + switch (UGETW(dd->bcdDevice)) { + case 0x0300: sc->sc_chiptype = TYPE_PL2303HX; - else - sc->sc_chiptype = TYPE_PL2303; + /* or TA, that is HX with external crystal */ + break; + case 0x0400: + sc->sc_chiptype = TYPE_PL2303HXD; + /* or EA, that is HXD with ESD protection */ + /* or RA, that has internal voltage level converter that works only up to 1Mbaud (!) */ + break; + case 0x0500: + sc->sc_chiptype = TYPE_PL2303HXD; + /* in fact it's TB, that is HXD with external crystal */ + break; + default: + /* NOTE: I have no info about the bcdDevice for the base PL2303 (up to 1.2Mbaud, + only fixed rates) and for PL2303SA (8-pin chip, up to 115200 baud */ + /* Determine the chip type. This algorithm is taken from Linux. */ + if (dd->bDeviceClass == 0x02) + sc->sc_chiptype = TYPE_PL2303; + else if (dd->bMaxPacketSize == 0x40) + sc->sc_chiptype = TYPE_PL2303HX; + else + sc->sc_chiptype = TYPE_PL2303; + break; + } - DPRINTF("chiptype: %s\n", - (sc->sc_chiptype == TYPE_PL2303HX) ? - "2303X" : "2303"); + switch (sc->sc_chiptype) { + case TYPE_PL2303: + DPRINTF("chiptype: 2303\n"); + break; + case TYPE_PL2303HX: + DPRINTF("chiptype: 2303HX/TA\n"); + break; + case TYPE_PL2303HXD: + DPRINTF("chiptype: 2303HXD/TB/RA/EA\n"); + break; + default: + DPRINTF("chiptype: unknown %d\n", sc->sc_chiptype); + break; + } /* * USB-RSAQ1 has two interface @@ -429,13 +468,14 @@ uplcom_attach(device_t dev) goto detach; } - if (sc->sc_chiptype != TYPE_PL2303HX) { + if (sc->sc_chiptype == TYPE_PL2303) { /* HX variants seem to lock up after a clear stall request. */ mtx_lock(&sc->sc_mtx); usbd_xfer_set_stall(sc->sc_xfer[UPLCOM_BULK_DT_WR]); usbd_xfer_set_stall(sc->sc_xfer[UPLCOM_BULK_DT_RD]); mtx_unlock(&sc->sc_mtx); } else { + /* reset upstream data pipes */ if (uplcom_pl2303_do(sc->sc_udev, UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 8, 0, 0) || uplcom_pl2303_do(sc->sc_udev, UT_WRITE_VENDOR_DEVICE, @@ -554,7 +594,7 @@ uplcom_pl2303_init(struct usb_device *udev, uint8_t ch || uplcom_pl2303_do(udev, UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 1, 0, 0)) return (EIO); - if (chiptype == TYP
svn commit: r339588 - head/sys/net
Author: hselasky Date: Mon Oct 22 13:25:26 2018 New Revision: 339588 URL: https://svnweb.freebsd.org/changeset/base/339588 Log: Resolve deadlock between epoch(9) and various network interface SX-locks, during if_purgeaddrs(), by not allowing to hold the epoch read lock over typical network IOCTL code paths. This is a regression issue after r334305. Reviewed by: ae (network) Differential revision:https://reviews.freebsd.org/D17647 MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/net/if.c Modified: head/sys/net/if.c == --- head/sys/net/if.c Mon Oct 22 11:58:30 2018(r339587) +++ head/sys/net/if.c Mon Oct 22 13:25:26 2018(r339588) @@ -964,12 +964,18 @@ if_attachdomain1(struct ifnet *ifp) void if_purgeaddrs(struct ifnet *ifp) { - struct ifaddr *ifa, *next; + struct ifaddr *ifa; - NET_EPOCH_ENTER(); - CK_STAILQ_FOREACH_SAFE(ifa, &ifp->if_addrhead, ifa_link, next) { - if (ifa->ifa_addr->sa_family == AF_LINK) - continue; + while (1) { + NET_EPOCH_ENTER(); + CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + if (ifa->ifa_addr->sa_family != AF_LINK) + break; + } + NET_EPOCH_EXIT(); + + if (ifa == NULL) + break; #ifdef INET /* XXX: Ugly!! ad hoc just for INET */ if (ifa->ifa_addr->sa_family == AF_INET) { @@ -996,7 +1002,6 @@ if_purgeaddrs(struct ifnet *ifp) IF_ADDR_WUNLOCK(ifp); ifa_free(ifa); } - NET_EPOCH_EXIT(); } /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339589 - head/sys/powerpc/powernv
Author: luporl Date: Mon Oct 22 13:40:50 2018 New Revision: 339589 URL: https://svnweb.freebsd.org/changeset/base/339589 Log: ppc64: limited 32-bit DMA address range Further investigation of issues with 32-bit DMA on PowerNV revealed that its window is hardcoded by OPAL (at least in skiboot version 5.4.9) and cannot be changed by the OS. Thus, now jhb suggestion of limiting the range in PCI DMA tag seems the best way to deal with it. Reviewed by: jhibbits, nwhitehorn, sbruno Approved by: jhibbits(mentor) Differential Revision:https://reviews.freebsd.org/D17601 Modified: head/sys/powerpc/powernv/opal_pci.c Modified: head/sys/powerpc/powernv/opal_pci.c == --- head/sys/powerpc/powernv/opal_pci.c Mon Oct 22 13:25:26 2018 (r339588) +++ head/sys/powerpc/powernv/opal_pci.c Mon Oct 22 13:40:50 2018 (r339589) @@ -96,6 +96,9 @@ static int opalpci_route_interrupt(device_t bus, devic static void opalpic_pic_enable(device_t dev, u_int irq, u_int vector); static void opalpic_pic_eoi(device_t dev, u_int irq); +/* Bus interface */ +static bus_dma_tag_t opalpci_get_dma_tag(device_t dev, device_t child); + /* * Commands */ @@ -119,6 +122,8 @@ static void opalpic_pic_eoi(device_t dev, u_int irq); */ #define OPAL_PCI_DEFAULT_PE1 +#define OPAL_PCI_BUS_SPACE_LOWADDR_32BIT 0x7FFFUL + /* * Driver methods. */ @@ -142,6 +147,9 @@ static device_method_t opalpci_methods[] = { DEVMETHOD(pic_enable, opalpic_pic_enable), DEVMETHOD(pic_eoi, opalpic_pic_eoi), + /* Bus interface */ + DEVMETHOD(bus_get_dma_tag, opalpci_get_dma_tag), + DEVMETHOD_END }; @@ -424,6 +432,23 @@ opalpci_attach(device_t dev) msi_ranges[1], msi_ranges[0]); } + /* Create the parent DMA tag */ + err = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ + 1, 0, /* alignment, bounds */ + OPAL_PCI_BUS_SPACE_LOWADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR_32BIT,/* highaddr */ + NULL, NULL, /* filter, filterarg */ + BUS_SPACE_MAXSIZE, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->ofw_sc.sc_dmat); + if (err != 0) { + device_printf(dev, "Failed to create DMA tag\n"); + return (err); + } + /* * General OFW PCI attach */ @@ -660,4 +685,13 @@ static void opalpic_pic_eoi(device_t dev, u_int irq) opal_call(OPAL_PCI_MSI_EOI, sc->phb_id, irq); PIC_EOI(root_pic, irq); +} + +static bus_dma_tag_t +opalpci_get_dma_tag(device_t dev, device_t child) +{ + struct opalpci_softc *sc; + + sc = device_get_softc(dev); + return (sc->ofw_sc.sc_dmat); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339590 - head/share/misc
Author: skozlov (ports committer) Date: Mon Oct 22 14:01:34 2018 New Revision: 339590 URL: https://svnweb.freebsd.org/changeset/base/339590 Log: Add myself to mentees with sbruno as mentor Approved by: sbruno (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot == --- head/share/misc/committers-ports.dotMon Oct 22 13:40:50 2018 (r339589) +++ head/share/misc/committers-ports.dotMon Oct 22 14:01:34 2018 (r339590) @@ -238,6 +238,7 @@ sergei [label="Sergei Kolobov\nser...@freebsd.org\n200 shaun [label="Shaun Amott\nsh...@freebsd.org\n2006/06/19"] shurd [label="Stephen Hurd\nsh...@freebsd.org\n2014/06/14"] simon [label="Simon L. Nielsen\nsi...@freebsd.org\n2005/01/08"] +skozlov [label="Sergey Kozlov\nskoz...@freebsd.org\n2018/09/21"] skreuzer [label="Steven Kreuzer\nskreu...@freebsd.org\n2009/03/25"] sobomax[label="Maxim Sobolev\nsobo...@freebsd.org\n2000/05/17"] sperber[label="Armin Pirkovitsch\nsper...@freebsd.org\n2012/04/15"] @@ -652,6 +653,8 @@ sahil -> culot sahil -> eadler sat -> beech + +sbruno -> skozlov sem -> az sem -> anray ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339591 - head/sys/dev/ichwd
Author: avg Date: Mon Oct 22 14:44:44 2018 New Revision: 339591 URL: https://svnweb.freebsd.org/changeset/base/339591 Log: ichwd: add support for TCO watchdog timer in Lewisburg PCH (C620) The change is based on public documents listed below as well as Linux changes and the code developed by Kostik. The documents: - Intel® C620 Series Chipset Platform Controller Hub Datasheet - Intel® 100 Series and Intel® C230 Series Chipset Family Platform Controller Hub (PCH) Datasheet - Volume 2 of 2 Interesting Linux commits: - https://github.com/torvalds/linux/commit/9424693035a57961a8eb09e96aab315a7096535d - https://github.com/torvalds/linux/commit/2a7a0e9bf7b32e838d873226808ab8a6c00148f7 The peculiarity of the new chipsets is that the watchdog resources are configured in PCI registers of SMBus controller and Power Management function as opposed to the LPC bridge. I took a simplistic approach of querying the resources from the respective PCI devices. ichwd is still a device on isa bus. The PCI devices are found by their slot and function defined in the datasheets as siblings of the upstream LPC bridge. There are some shortcuts and missing features. First of all, I have not implemented the functionality required to clear the no-reboot bit. That would require writing to a special PCI configuration register of a hidden / invisible PCI device after which the device would start responding to accesses to other registers. The no-reboot bit was not set on my test hardware, so I decided to leave its handling for the later time. Also, I did not try to handle the case where the watchdog resources are not configured by the hardware as well as the case where ACPI defined operational region conflicts with the watchdog resources. My test system did not have either of those problem, so, again, I decided to leave those cases until later. See this Linux commit for some details of the ACPI problem: https://github.com/torvalds/linux/commit/a7ae81952cdab56a1277bd2f9ed7284c0f575120 Finally, I have added only the PCI ID found on my test system. I think that more IDs can be added as the change gets tested. Tested on Dell PowerEdge R740. PR: 222079 Reviewed by: mav, kib MFC after:3 weeks Relnotes: maybe Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D17585 Modified: head/sys/dev/ichwd/ichwd.c head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.c == --- head/sys/dev/ichwd/ichwd.c Mon Oct 22 14:01:34 2018(r339590) +++ head/sys/dev/ichwd/ichwd.c Mon Oct 22 14:44:44 2018(r339591) @@ -289,6 +289,11 @@ static struct ichwd_device ichwd_devices[] = { { 0, NULL, 0, 0 }, }; +static struct ichwd_device ichwd_smb_devices[] = { + { DEVICEID_LEWISBURG_SMB, "Lewisburg watchdog timer", 10, 4 }, + { 0, NULL, 0, 0 }, +}; + static devclass_t ichwd_devclass; #define ichwd_read_tco_1(sc, off) \ @@ -374,7 +379,8 @@ ichwd_sts_reset(struct ichwd_softc *sc) * be done in two separate operations. */ ichwd_write_tco_2(sc, TCO2_STS, TCO_SECOND_TO_STS); - ichwd_write_tco_2(sc, TCO2_STS, TCO_BOOT_STS); + if (sc->tco_version < 4) + ichwd_write_tco_2(sc, TCO2_STS, TCO_BOOT_STS); } /* @@ -488,6 +494,11 @@ ichwd_clear_noreboot(struct ichwd_softc *sc) if (status & ICH_PMC_NO_REBOOT) rc = EIO; break; + case 4: + /* +* TODO. This needs access to a hidden PCI device at 31:1. +*/ + break; default: ichwd_verbose_printf(sc->device, "Unknown TCO Version: %d, can't set NO_REBOOT.\n", @@ -560,6 +571,36 @@ ichwd_find_ich_lpc_bridge(device_t isa, struct ichwd_d return (NULL); } +static device_t +ichwd_find_smb_dev(device_t isa, struct ichwd_device **id_p) +{ + struct ichwd_device *id; + device_t isab, smb; + uint16_t devid; + + /* +* Check if SMBus controller provides TCO configuration. +* The controller's device and function are fixed and we expect +* it to be on the same bus as ISA bridge. +*/ + isab = device_get_parent(isa); + smb = pci_find_dbsf(pci_get_domain(isab), pci_get_bus(isab), 31, 4); + if (smb == NULL) + return (NULL); + if (pci_get_vendor(smb) != VENDORID_INTEL) + return (NULL); + devid = pci_get_device(smb); + for (id = ichwd_smb_devices; id->desc != NULL; ++id) { + if (devid == id->device) { + if (id_p != NULL) + *id_p = id; + return (smb); + } + } + + return (NULL); +} + /* * Look for an ICH LPC in
svn commit: r339592 - in head/sys/arm64: arm64 include
Author: andrew Date: Mon Oct 22 14:58:59 2018 New Revision: 339592 URL: https://svnweb.freebsd.org/changeset/base/339592 Log: Correctly set the DAIF bits in new threads We should only unmask interrupts when creating a new thread and leave the other exceptions in teh same state as before creating the thread. Reported by: jhibbits Reviewed by: jhibbits MFC after:1 month Sponsored by: https://reviews.freebsd.org/D17497 Modified: head/sys/arm64/arm64/vm_machdep.c head/sys/arm64/include/armreg.h Modified: head/sys/arm64/arm64/vm_machdep.c == --- head/sys/arm64/arm64/vm_machdep.c Mon Oct 22 14:44:44 2018 (r339591) +++ head/sys/arm64/arm64/vm_machdep.c Mon Oct 22 14:58:59 2018 (r339592) @@ -111,7 +111,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct t /* Setup to release spin count in fork_exit(). */ td2->td_md.md_spinlock_count = 1; - td2->td_md.md_saved_daif = 0; + td2->td_md.md_saved_daif = td1->td_md.md_saved_daif & ~DAIF_I_MASKED; } void @@ -182,7 +182,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) /* Setup to release spin count in fork_exit(). */ td->td_md.md_spinlock_count = 1; - td->td_md.md_saved_daif = 0; + td->td_md.md_saved_daif = td0->td_md.md_saved_daif & ~DAIF_I_MASKED; } /* Modified: head/sys/arm64/include/armreg.h == --- head/sys/arm64/include/armreg.h Mon Oct 22 14:44:44 2018 (r339591) +++ head/sys/arm64/include/armreg.h Mon Oct 22 14:58:59 2018 (r339592) @@ -66,6 +66,12 @@ #defineCTR_ILINE_MASK (0xf << CTR_ILINE_SHIFT) #defineCTR_ILINE_SIZE(reg) (((reg) & CTR_ILINE_MASK) >> CTR_ILINE_SHIFT) +/* DAIF - Interrupt Mask Bits */ +#defineDAIF_D_MASKED (1 << 9) +#defineDAIF_A_MASKED (1 << 8) +#defineDAIF_I_MASKED (1 << 7) +#defineDAIF_F_MASKED (1 << 6) + /* DCZID_EL0 - Data Cache Zero ID register */ #define DCZID_DZP (1 << 4) /* DC ZVA prohibited if non-0 */ #define DCZID_BS_SHIFT 0 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339593 - head/sys/arm64/include
Author: andrew Date: Mon Oct 22 15:06:14 2018 New Revision: 339593 URL: https://svnweb.freebsd.org/changeset/base/339593 Log: Fix the ID_AA64ISAR0_EL1 dot product field shift. It's 44 in the documentation, use this correct value. MFC after:3 days Modified: head/sys/arm64/include/armreg.h Modified: head/sys/arm64/include/armreg.h == --- head/sys/arm64/include/armreg.h Mon Oct 22 14:58:59 2018 (r339592) +++ head/sys/arm64/include/armreg.h Mon Oct 22 15:06:14 2018 (r339593) @@ -260,7 +260,7 @@ #defineID_AA64ISAR0_SM4(x) ((x) & ID_AA64ISAR0_SM4_MASK) #define ID_AA64ISAR0_SM4_NONE (0x0ul << ID_AA64ISAR0_SM4_SHIFT) #define ID_AA64ISAR0_SM4_IMPL (0x1ul << ID_AA64ISAR0_SM4_SHIFT) -#defineID_AA64ISAR0_DP_SHIFT 48 +#defineID_AA64ISAR0_DP_SHIFT 44 #defineID_AA64ISAR0_DP_MASK(0xful << ID_AA64ISAR0_DP_SHIFT) #defineID_AA64ISAR0_DP(x) ((x) & ID_AA64ISAR0_DP_MASK) #define ID_AA64ISAR0_DP_NONE (0x0ul << ID_AA64ISAR0_DP_SHIFT) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339594 - head/sys/arm64/arm64
Author: andrew Date: Mon Oct 22 15:18:49 2018 New Revision: 339594 URL: https://svnweb.freebsd.org/changeset/base/339594 Log: Stop advertising ARMv8.3 Pointer Authentication This needs firmware and kernel support before userspace can use it. Until then don't advertise it's available. MFC after:3 days Modified: head/sys/arm64/arm64/identcpu.c Modified: head/sys/arm64/arm64/identcpu.c == --- head/sys/arm64/arm64/identcpu.c Mon Oct 22 15:06:14 2018 (r339593) +++ head/sys/arm64/arm64/identcpu.c Mon Oct 22 15:18:49 2018 (r339594) @@ -201,13 +201,13 @@ static struct mrs_field id_aa64isar0_fields[] = { }; static struct mrs_field id_aa64isar1_fields[] = { - MRS_FIELD(false, MRS_LOWER, ID_AA64ISAR1_GPI_SHIFT), - MRS_FIELD(false, MRS_LOWER, ID_AA64ISAR1_GPA_SHIFT), + MRS_FIELD(false, MRS_EXACT, ID_AA64ISAR1_GPI_SHIFT), + MRS_FIELD(false, MRS_EXACT, ID_AA64ISAR1_GPA_SHIFT), MRS_FIELD(false, MRS_LOWER, ID_AA64ISAR1_LRCPC_SHIFT), MRS_FIELD(false, MRS_LOWER, ID_AA64ISAR1_FCMA_SHIFT), MRS_FIELD(false, MRS_LOWER, ID_AA64ISAR1_JSCVT_SHIFT), - MRS_FIELD(false, MRS_LOWER, ID_AA64ISAR1_API_SHIFT), - MRS_FIELD(false, MRS_LOWER, ID_AA64ISAR1_APA_SHIFT), + MRS_FIELD(false, MRS_EXACT, ID_AA64ISAR1_API_SHIFT), + MRS_FIELD(false, MRS_EXACT, ID_AA64ISAR1_APA_SHIFT), MRS_FIELD(false, MRS_LOWER, ID_AA64ISAR1_DPB_SHIFT), MRS_FIELD_END, }; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339543 - head/sys/conf
[ Charset UTF-8 unsupported, converting... ] > Author: imp > Date: Sun Oct 21 16:29:32 2018 > New Revision: 339543 > URL: https://svnweb.freebsd.org/changeset/base/339543 > > Log: > Remove stray fatm reference. With Modified: > head/sys/conf/WITHOUT_SOURCELESS_UCODE > > Modified: head/sys/conf/WITHOUT_SOURCELESS_UCODE > == > --- head/sys/conf/WITHOUT_SOURCELESS_UCODESun Oct 21 16:29:12 2018 > (r339542) > +++ head/sys/conf/WITHOUT_SOURCELESS_UCODESun Oct 21 16:29:32 2018 > (r339543) > @@ -6,7 +6,6 @@ > > nodevice adw > nodevice bce > -nodevice fatm > nodevice fxp > nodevice ispfw > nodevice mwlfw > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339546 - head/sys/kern
[ Charset UTF-8 unsupported, converting... ] > Author: imp > Date: Sun Oct 21 16:49:49 2018 > New Revision: 339546 > URL: https://svnweb.freebsd.org/changeset/base/339546 > > Log: > Remove stray refernce to pdq. Like the infamous twenty first of Johan > Sebastian Bach's twenty children, it hasn't been seen in many years. With Modified: > head/sys/kern/Make.tags.inc > > Modified: head/sys/kern/Make.tags.inc > == > --- head/sys/kern/Make.tags.inc Sun Oct 21 16:44:57 2018 > (r339545) > +++ head/sys/kern/Make.tags.inc Sun Oct 21 16:49:49 2018 > (r339546) > @@ -19,7 +19,6 @@ COMM= ${SYS}/dev/advansys/*.[ch] \ > ${SYS}/dev/en/*.[ch] \ > ${SYS}/dev/iicbus/*.[ch] \ > ${SYS}/dev/isp/*.[ch] \ > - ${SYS}/dev/pdq/*.[ch] \ > ${SYS}/dev/ppbus/*.[ch] \ > ${SYS}/dev/smbus/*.[ch] \ > ${SYS}/dev/vx/*.[ch] \ > @@ -78,7 +77,6 @@ COMMDIR2= ${SYS}/dev/advansys \ > ${SYS}/dev/iicbus \ > ${SYS}/dev/isp \ > ${SYS}/dev/md \ > - ${SYS}/dev/pdq \ > ${SYS}/dev/ppbus \ > ${SYS}/dev/smbus \ > ${SYS}/dev/vx \ > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339595 - head/sys/fs/nfsserver
Author: avg Date: Mon Oct 22 15:33:05 2018 New Revision: 339595 URL: https://svnweb.freebsd.org/changeset/base/339595 Log: nfsrvd_readdirplus: for some errors, do not fail the entire request Instead, a failing entry is skipped. This change consist of two logical changes. A failure to vget or lookup an entry is considered to be a result of a concurrent removal, which is the only reasonable explanation given that the filesystem is busied. So, the entry would be silently skipped. In the case of a failure to get attributes of an entry for an NFSv3 request, the entry would be silently skipped. There can be legitimate reasons for the failure, but NFSv3 does not provide any means to report the error, so we have two options: either fail the whole request or ignore the failed entry. Traditionally, the old NFS server used the latter option, so the code is reverted to it. Making the whole directory unreadable because of a single entry seems to be unpractical. Additionally, some bits of code are slightly re-arranged to account for the new control flow and to honor style(9). Reviewed by: rmacklem Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D15424 Modified: head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c == --- head/sys/fs/nfsserver/nfs_nfsdport.cMon Oct 22 15:18:49 2018 (r339594) +++ head/sys/fs/nfsserver/nfs_nfsdport.cMon Oct 22 15:33:05 2018 (r339595) @@ -2416,10 +2416,22 @@ again: } } } - if (!r) { - if (refp == NULL && - ((nd->nd_flag & ND_NFSV3) || -NFSNONZERO_ATTRBIT(&attrbits))) { + + /* +* If we failed to look up the entry, then it +* has become invalid, most likely removed. +*/ + if (r != 0) { + if (needs_unbusy) + vfs_unbusy(new_mp); + goto invalid; + } + KASSERT(refp != NULL || nvp != NULL, + ("%s: undetected lookup error", __func__)); + + if (refp == NULL && + ((nd->nd_flag & ND_NFSV3) || +NFSNONZERO_ATTRBIT(&attrbits))) { r = nfsvno_getfh(nvp, &nfh, p); if (!r) r = nfsvno_getattr(nvp, nvap, nd, p, @@ -2440,17 +2452,25 @@ again: if (new_mp == mp) new_mp = nvp->v_mount; } - } - } else { - nvp = NULL; } - if (r) { + + /* +* If we failed to get attributes of the entry, +* then just skip it for NFSv3 (the traditional +* behavior in the old NFS server). +* For NFSv4 the behavior is controlled by +* RDATTRERROR: we either ignore the error or +* fail the request. +* Note that RDATTRERROR is never set for NFSv3. +*/ + if (r != 0) { if (!NFSISSET_ATTRBIT(&attrbits, NFSATTRBIT_RDATTRERROR)) { - if (nvp != NULL) - vput(nvp); + vput(nvp); if (needs_unbusy != 0) vfs_unbusy(new_mp); + if ((nd->nd_flag & ND_NFSV3)) + goto invalid; nd->nd_repstat = r; break; } @@ -2519,6 +2539,7 @@ again: if (dirlen <= cnt) entrycnt++; } +inva
Re: svn commit: r339561 - head/sys/crypto/chacha20
> Author: cem > Date: Mon Oct 22 01:27:11 2018 > New Revision: 339561 > URL: https://svnweb.freebsd.org/changeset/base/339561 > > Log: > Add explicit copyright text to trivial header > > Reported by:rgrimes Thank you. > Modified: > head/sys/crypto/chacha20/_chacha.h > > Modified: head/sys/crypto/chacha20/_chacha.h > == > --- head/sys/crypto/chacha20/_chacha.hMon Oct 22 00:27:37 2018 > (r339560) > +++ head/sys/crypto/chacha20/_chacha.hMon Oct 22 01:27:11 2018 > (r339561) > @@ -1,4 +1,7 @@ > /* $FreeBSD$ */ > +/* > + * Public domain. > + */ > > #ifndef _CHACHA_H > #define _CHACHA_H > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339570 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/ncv sys/i386/conf sys/modules sys/modules/ncv
> Author: imp > Date: Mon Oct 22 02:35:26 2018 > New Revision: 339570 > URL: https://svnweb.freebsd.org/changeset/base/339570 > > Log: > Remove ncv(4) driver > > ncv(4) is marked as gone in 12. Remove it. There are no sightings of > it in the nycbug dmesg database. It was for an obscure SCSI card that > sold mostly in Japan, and was especially popilar among pc98 hackers in > the 4.x time frame.. > > Relnote: Yes I would of liked to delay these until post 12.0 release production incase there are any release cycle fixes that need to be MFC'ed to fix the 12.0 release, but done is done and we shall just have to deal with that by direct commit or other means. > Deleted: > head/share/man/man4/ncv.4 > head/sys/dev/ncv/ncr53c500.c > head/sys/dev/ncv/ncr53c500_pccard.c > head/sys/dev/ncv/ncr53c500hw.h > head/sys/dev/ncv/ncr53c500hwtab.h > head/sys/dev/ncv/ncr53c500reg.h > head/sys/dev/ncv/ncr53c500var.h > head/sys/modules/ncv/Makefile > Modified: > head/share/man/man4/Makefile > head/sys/amd64/conf/NOTES > head/sys/conf/files > head/sys/i386/conf/NOTES > head/sys/modules/Makefile > > Modified: head/share/man/man4/Makefile > == > --- head/share/man/man4/Makefile Mon Oct 22 02:35:12 2018 > (r339569) > +++ head/share/man/man4/Makefile Mon Oct 22 02:35:26 2018 > (r339570) > @@ -305,7 +305,6 @@ MAN= aac.4 \ > nand.4 \ > nandsim.4 \ > ncr.4 \ > - ncv.4 \ > ${_ndis.4} \ > net80211.4 \ > netdump.4 \ > > Modified: head/sys/amd64/conf/NOTES > == > --- head/sys/amd64/conf/NOTES Mon Oct 22 02:35:12 2018(r339569) > +++ head/sys/amd64/conf/NOTES Mon Oct 22 02:35:26 2018(r339570) > @@ -428,11 +428,9 @@ device twa # 3ware 9000 > series PATA/SATA RAID > # > # SCSI host adapters: > # > -# ncv: NCR 53C500 based SCSI host adapters. > # nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters. > # stg: TMC 18C30, 18C50 based SCSI host adapters. > > -device ncv > device nsp > device stg > > > Modified: head/sys/conf/files > == > --- head/sys/conf/files Mon Oct 22 02:35:12 2018(r339569) > +++ head/sys/conf/files Mon Oct 22 02:35:26 2018(r339570) > @@ -113,7 +113,7 @@ cam/ctl/scsi_ctl.coptional ctl > cam/mmc/mmc_xpt.coptional scbus mmccam > cam/mmc/mmc_da.c optional scbus mmccam da > cam/scsi/scsi_da.c optional da > -cam/scsi/scsi_low.c optional ncv | nsp | stg > +cam/scsi/scsi_low.c optional nsp | stg > cam/scsi/scsi_pass.c optional pass > cam/scsi/scsi_pt.c optional pt > cam/scsi/scsi_sa.c optional sa > @@ -2511,8 +2511,6 @@ dev/nand/nandsim_log.c optional nandsim nand > dev/nand/nandsim_swap.c optional nandsim nand > dev/nand/nfc_if.moptional nand > dev/ncr/ncr.coptional ncr pci > -dev/ncv/ncr53c500.c optional ncv > -dev/ncv/ncr53c500_pccard.c optional ncv pccard > dev/netmap/if_ptnet.coptional netmap inet > dev/netmap/netmap.c optional netmap > dev/netmap/netmap_freebsd.c optional netmap > > Modified: head/sys/i386/conf/NOTES > == > --- head/sys/i386/conf/NOTES Mon Oct 22 02:35:12 2018(r339569) > +++ head/sys/i386/conf/NOTES Mon Oct 22 02:35:26 2018(r339570) > @@ -659,11 +659,9 @@ device twa # 3ware 9000 > series PATA/SATA RAID > # > # SCSI host adapters: > # > -# ncv: NCR 53C500 based SCSI host adapters. > # nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters. > # stg: TMC 18C30, 18C50 based SCSI host adapters. > > -device ncv > device nsp > device stg > hint.stg.0.at="isa" > > Modified: head/sys/modules/Makefile > == > --- head/sys/modules/Makefile Mon Oct 22 02:35:12 2018(r339569) > +++ head/sys/modules/Makefile Mon Oct 22 02:35:26 2018(r339570) > @@ -268,7 +268,6 @@ SUBDIR= \ > ${_nandsim} \ > ${_ncr} \ > ${_nctgpio} \ > - ${_ncv} \ > ${_ndis} \ > ${_netgraph} \ > ${_nfe} \ > @@ -757,7 +756,6 @@ _glxiic= glxiic > _glxsb= glxsb > #_ibcs2= ibcs2 > _ncr=ncr > -_ncv=ncv > _nsp=nsp > _pcfclock= pcfclock > _pst=pst > > -- Rod Grimes rgri...@freebsd.org ___ svn-src
svn commit: r339596 - head/sys/vm
Author: glebius Date: Mon Oct 22 15:48:07 2018 New Revision: 339596 URL: https://svnweb.freebsd.org/changeset/base/339596 Log: If we lost race or were migrated during bucket allocation for the per-CPU cache, then we put new bucket on generic bucket cache. However, code didn't honor UMA_ZONE_NOBUCKETCACHE flag, so potentially we could start a cache on a zone that clearly forbids that. Fix this. Reviewed by: markj Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Mon Oct 22 15:33:05 2018(r339595) +++ head/sys/vm/uma_core.c Mon Oct 22 15:48:07 2018(r339596) @@ -2410,6 +2410,7 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags * the current cache; when we re-acquire the critical section, we * must detect and handle migration if it has occurred. */ +zalloc_restart: critical_enter(); cpu = curcpu; cache = &zone->uz_cpu[cpu]; @@ -2551,12 +2552,18 @@ zalloc_start: * initialized bucket to make this less likely or claim * the memory directly. */ - if (cache->uc_allocbucket != NULL || - (zone->uz_flags & UMA_ZONE_NUMA && - domain != PCPU_GET(domain))) - LIST_INSERT_HEAD(&zdom->uzd_buckets, bucket, ub_link); - else + if (cache->uc_allocbucket == NULL && + ((zone->uz_flags & UMA_ZONE_NUMA) == 0 || + domain == PCPU_GET(domain))) { cache->uc_allocbucket = bucket; + } else if ((zone->uz_flags & UMA_ZONE_NOBUCKETCACHE) != 0) { + critical_exit(); + ZONE_UNLOCK(zone); + bucket_drain(zone, bucket); + bucket_free(zone, bucket, udata); + goto zalloc_restart; + } else + LIST_INSERT_HEAD(&zdom->uzd_buckets, bucket, ub_link); ZONE_UNLOCK(zone); goto zalloc_start; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339570 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/ncv sys/i386/conf sys/modules sys/modules/ncv
On Mon, Oct 22, 2018 at 9:45 AM Rodney W. Grimes < free...@pdx.rh.cn85.dnsmgr.net> wrote: > > Author: imp > > Date: Mon Oct 22 02:35:26 2018 > > New Revision: 339570 > > URL: https://svnweb.freebsd.org/changeset/base/339570 > > > > Log: > > Remove ncv(4) driver > > > > ncv(4) is marked as gone in 12. Remove it. There are no sightings of > > it in the nycbug dmesg database. It was for an obscure SCSI card that > > sold mostly in Japan, and was especially popilar among pc98 hackers in > > the 4.x time frame.. > > > > Relnote: Yes > > I would of liked to delay these until post 12.0 release production > incase there are any release cycle fixes that need to be MFC'ed to > fix the 12.0 release, but done is done and we shall just have to > deal with that by direct commit or other means. > I did these because they were marked as going away in 12, and this would allow us to MFC them if we wanted before 12.0R. Warner > > Deleted: > > head/share/man/man4/ncv.4 > > head/sys/dev/ncv/ncr53c500.c > > head/sys/dev/ncv/ncr53c500_pccard.c > > head/sys/dev/ncv/ncr53c500hw.h > > head/sys/dev/ncv/ncr53c500hwtab.h > > head/sys/dev/ncv/ncr53c500reg.h > > head/sys/dev/ncv/ncr53c500var.h > > head/sys/modules/ncv/Makefile > > Modified: > > head/share/man/man4/Makefile > > head/sys/amd64/conf/NOTES > > head/sys/conf/files > > head/sys/i386/conf/NOTES > > head/sys/modules/Makefile > > > > Modified: head/share/man/man4/Makefile > > > == > > --- head/share/man/man4/Makefile Mon Oct 22 02:35:12 2018 > (r339569) > > +++ head/share/man/man4/Makefile Mon Oct 22 02:35:26 2018 > (r339570) > > @@ -305,7 +305,6 @@ MAN= aac.4 \ > > nand.4 \ > > nandsim.4 \ > > ncr.4 \ > > - ncv.4 \ > > ${_ndis.4} \ > > net80211.4 \ > > netdump.4 \ > > > > Modified: head/sys/amd64/conf/NOTES > > > == > > --- head/sys/amd64/conf/NOTES Mon Oct 22 02:35:12 2018(r339569) > > +++ head/sys/amd64/conf/NOTES Mon Oct 22 02:35:26 2018(r339570) > > @@ -428,11 +428,9 @@ device twa # 3ware > 9000 series PATA/SATA RAID > > # > > # SCSI host adapters: > > # > > -# ncv: NCR 53C500 based SCSI host adapters. > > # nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters. > > # stg: TMC 18C30, 18C50 based SCSI host adapters. > > > > -device ncv > > device nsp > > device stg > > > > > > Modified: head/sys/conf/files > > > == > > --- head/sys/conf/files Mon Oct 22 02:35:12 2018(r339569) > > +++ head/sys/conf/files Mon Oct 22 02:35:26 2018(r339570) > > @@ -113,7 +113,7 @@ cam/ctl/scsi_ctl.coptional ctl > > cam/mmc/mmc_xpt.coptional scbus mmccam > > cam/mmc/mmc_da.c optional scbus mmccam da > > cam/scsi/scsi_da.c optional da > > -cam/scsi/scsi_low.c optional ncv | nsp | stg > > +cam/scsi/scsi_low.c optional nsp | stg > > cam/scsi/scsi_pass.c optional pass > > cam/scsi/scsi_pt.c optional pt > > cam/scsi/scsi_sa.c optional sa > > @@ -2511,8 +2511,6 @@ dev/nand/nandsim_log.c optional nandsim > nand > > dev/nand/nandsim_swap.c optional nandsim nand > > dev/nand/nfc_if.moptional nand > > dev/ncr/ncr.coptional ncr pci > > -dev/ncv/ncr53c500.c optional ncv > > -dev/ncv/ncr53c500_pccard.c optional ncv pccard > > dev/netmap/if_ptnet.coptional netmap inet > > dev/netmap/netmap.c optional netmap > > dev/netmap/netmap_freebsd.c optional netmap > > > > Modified: head/sys/i386/conf/NOTES > > > == > > --- head/sys/i386/conf/NOTES Mon Oct 22 02:35:12 2018(r339569) > > +++ head/sys/i386/conf/NOTES Mon Oct 22 02:35:26 2018(r339570) > > @@ -659,11 +659,9 @@ device twa # 3ware > 9000 series PATA/SATA RAID > > # > > # SCSI host adapters: > > # > > -# ncv: NCR 53C500 based SCSI host adapters. > > # nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters. > > # stg: TMC 18C30, 18C50 based SCSI host adapters. > > > > -device ncv > > device nsp > > device stg > > hint.stg.0.at="isa" > > > > Modified: head/sys/modules/Makefile > > > == > > --- head/sys/modules/Makefile Mon Oct 22 02:35:12 2018(r339569) > > +++ head/sys/modules/Makefile Mon Oct 22 02:35:26 2018(r339570) > > @@ -268,7 +268,6 @@ SUBDIR= \ > > ${_nandsim} \ > > ${_ncr} \ > > ${_nctgpio} \ > > - ${_ncv} \ > > ${_n
Re: svn commit: r339565 - in head: share/man/man4 share/man/man4/man4.i386 sys/conf sys/dev/aha sys/kern sys/modules sys/modules/aha sys/sparc64/conf
> On Sun, Oct 21, 2018 at 9:35 PM Warner Losh wrote: > > > Author: imp > > Date: Mon Oct 22 02:34:25 2018 > > New Revision: 339565 > > URL: https://svnweb.freebsd.org/changeset/base/339565 > > > > Log: > > Remove aha(4) from the tree. > > > > > The documentation build is now failing, as there's an entity reference to > the autogenerated > hardware list, which does not exist anymore. Will you be able to look at > those as part of your > removals or does someone from the doc team need to handle it? Please stop deprecaton processing until: 1) We have the new documented deprication policy 2) We have crafted a step by step deprication set of procedures so issues like this can be in it. 2) Release 12.0 is shipped. Thanks, Rod https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339570 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/ncv sys/i386/conf sys/modules sys/modules/ncv
[ Charset UTF-8 unsupported, converting... ] > On Mon, Oct 22, 2018 at 9:45 AM Rodney W. Grimes < > free...@pdx.rh.cn85.dnsmgr.net> wrote: > > > > Author: imp > > > Date: Mon Oct 22 02:35:26 2018 > > > New Revision: 339570 > > > URL: https://svnweb.freebsd.org/changeset/base/339570 > > > > > > Log: > > > Remove ncv(4) driver > > > > > > ncv(4) is marked as gone in 12. Remove it. There are no sightings of > > > it in the nycbug dmesg database. It was for an obscure SCSI card that > > > sold mostly in Japan, and was especially popilar among pc98 hackers in > > > the 4.x time frame.. > > > > > > Relnote: Yes > > > > I would of liked to delay these until post 12.0 release production > > incase there are any release cycle fixes that need to be MFC'ed to > > fix the 12.0 release, but done is done and we shall just have to > > deal with that by direct commit or other means. > > > > I did these because they were marked as going away in 12, and this would > allow us to MFC them if we wanted before 12.0R. Um, ok I may need to recant some of my wanting the 3 things done before we process any more of this if infact your still wanting to get all of this deprication merged and into 12.0R I see gjb@ has fixed the doc build issue already. > Warner > > > > > Deleted: > > > head/share/man/man4/ncv.4 > > > head/sys/dev/ncv/ncr53c500.c > > > head/sys/dev/ncv/ncr53c500_pccard.c > > > head/sys/dev/ncv/ncr53c500hw.h > > > head/sys/dev/ncv/ncr53c500hwtab.h > > > head/sys/dev/ncv/ncr53c500reg.h > > > head/sys/dev/ncv/ncr53c500var.h > > > head/sys/modules/ncv/Makefile > > > Modified: > > > head/share/man/man4/Makefile > > > head/sys/amd64/conf/NOTES > > > head/sys/conf/files > > > head/sys/i386/conf/NOTES > > > head/sys/modules/Makefile > > > > > > Modified: head/share/man/man4/Makefile > > > > > == > > > --- head/share/man/man4/Makefile Mon Oct 22 02:35:12 2018 > > (r339569) > > > +++ head/share/man/man4/Makefile Mon Oct 22 02:35:26 2018 > > (r339570) > > > @@ -305,7 +305,6 @@ MAN= aac.4 \ > > > nand.4 \ > > > nandsim.4 \ > > > ncr.4 \ > > > - ncv.4 \ > > > ${_ndis.4} \ > > > net80211.4 \ > > > netdump.4 \ > > > > > > Modified: head/sys/amd64/conf/NOTES > > > > > == > > > --- head/sys/amd64/conf/NOTES Mon Oct 22 02:35:12 2018(r339569) > > > +++ head/sys/amd64/conf/NOTES Mon Oct 22 02:35:26 2018(r339570) > > > @@ -428,11 +428,9 @@ device twa # 3ware > > 9000 series PATA/SATA RAID > > > # > > > # SCSI host adapters: > > > # > > > -# ncv: NCR 53C500 based SCSI host adapters. > > > # nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters. > > > # stg: TMC 18C30, 18C50 based SCSI host adapters. > > > > > > -device ncv > > > device nsp > > > device stg > > > > > > > > > Modified: head/sys/conf/files > > > > > == > > > --- head/sys/conf/files Mon Oct 22 02:35:12 2018(r339569) > > > +++ head/sys/conf/files Mon Oct 22 02:35:26 2018(r339570) > > > @@ -113,7 +113,7 @@ cam/ctl/scsi_ctl.coptional ctl > > > cam/mmc/mmc_xpt.coptional scbus mmccam > > > cam/mmc/mmc_da.c optional scbus mmccam da > > > cam/scsi/scsi_da.c optional da > > > -cam/scsi/scsi_low.c optional ncv | nsp | stg > > > +cam/scsi/scsi_low.c optional nsp | stg > > > cam/scsi/scsi_pass.c optional pass > > > cam/scsi/scsi_pt.c optional pt > > > cam/scsi/scsi_sa.c optional sa > > > @@ -2511,8 +2511,6 @@ dev/nand/nandsim_log.c optional nandsim > > nand > > > dev/nand/nandsim_swap.c optional nandsim nand > > > dev/nand/nfc_if.moptional nand > > > dev/ncr/ncr.coptional ncr pci > > > -dev/ncv/ncr53c500.c optional ncv > > > -dev/ncv/ncr53c500_pccard.c optional ncv pccard > > > dev/netmap/if_ptnet.coptional netmap inet > > > dev/netmap/netmap.c optional netmap > > > dev/netmap/netmap_freebsd.c optional netmap > > > > > > Modified: head/sys/i386/conf/NOTES > > > > > == > > > --- head/sys/i386/conf/NOTES Mon Oct 22 02:35:12 2018(r339569) > > > +++ head/sys/i386/conf/NOTES Mon Oct 22 02:35:26 2018(r339570) > > > @@ -659,11 +659,9 @@ device twa # 3ware > > 9000 series PATA/SATA RAID > > > # > > > # SCSI host adapters: > > > # > > > -# ncv: NCR 53C500 based SCSI host adapters. > > > # nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters. > > > # stg: TMC 18C30, 18C50 based SCSI host adapters. > > > > > > -device
svn commit: r339598 - head/sys/netinet6
Author: markj Date: Mon Oct 22 16:09:01 2018 New Revision: 339598 URL: https://svnweb.freebsd.org/changeset/base/339598 Log: Fix style bugs in in6_pcblookup_lbgroup(). This should have been a part of r338470. No functional changes intended. Reported by: gallatin Reviewed by: gallatin, Johannes Lundberg MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D17109 Modified: head/sys/netinet6/in6_pcb.c Modified: head/sys/netinet6/in6_pcb.c == --- head/sys/netinet6/in6_pcb.c Mon Oct 22 15:54:28 2018(r339597) +++ head/sys/netinet6/in6_pcb.c Mon Oct 22 16:09:01 2018(r339598) @@ -873,10 +873,9 @@ in6_pcblookup_lbgroup(const struct inpcbinfo *pcbinfo, const struct in6_addr *laddr, uint16_t lport, const struct in6_addr *faddr, uint16_t fport, int lookupflags) { - struct inpcb *local_wild = NULL; + struct inpcb *local_wild; const struct inpcblbgrouphead *hdr; struct inpcblbgroup *grp; - struct inpcblbgroup *grp_local_wild; uint32_t idx; INP_HASH_LOCK_ASSERT(pcbinfo); @@ -893,33 +892,24 @@ in6_pcblookup_lbgroup(const struct inpcbinfo *pcbinfo, * - Load balanced group does not contain jailed sockets. * - Load balanced does not contain IPv4 mapped INET6 wild sockets. */ + local_wild = NULL; CK_LIST_FOREACH(grp, hdr, il_list) { #ifdef INET if (!(grp->il_vflag & INP_IPV6)) continue; #endif - if (grp->il_lport == lport) { - idx = 0; - int pkt_hash = INP_PCBLBGROUP_PKTHASH( - INP6_PCBHASHKEY(faddr), lport, fport); + if (grp->il_lport != lport) + continue; - idx = pkt_hash % grp->il_inpcnt; - - if (IN6_ARE_ADDR_EQUAL(&grp->il6_laddr, laddr)) { - return (grp->il_inp[idx]); - } else { - if (IN6_IS_ADDR_UNSPECIFIED(&grp->il6_laddr) && - (lookupflags & INPLOOKUP_WILDCARD)) { - local_wild = grp->il_inp[idx]; - grp_local_wild = grp; - } - } - } + idx = INP_PCBLBGROUP_PKTHASH(INP6_PCBHASHKEY(faddr), lport, + fport) % grp->il_inpcnt; + if (IN6_ARE_ADDR_EQUAL(&grp->il6_laddr, laddr)) + return (grp->il_inp[idx]); + if (IN6_IS_ADDR_UNSPECIFIED(&grp->il6_laddr) && + (lookupflags & INPLOOKUP_WILDCARD) != 0) + local_wild = grp->il_inp[idx]; } - if (local_wild != NULL) { - return (local_wild); - } - return (NULL); + return (local_wild); } #ifdef PCBGROUP ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339599 - in head/sys: kern sys
Author: markj Date: Mon Oct 22 16:16:42 2018 New Revision: 339599 URL: https://svnweb.freebsd.org/changeset/base/339599 Log: Don't import 0 into vmem quantum caches. vmem uses UMA cache zones to implement the quantum cache. Since uma_zalloc() returns 0 (NULL) to signal an allocation failure, UMA should not be used to cache resource 0. Fix this by ensuring that 0 is never cached in UMA in the first place, and by modifying vmem_alloc() to fall back to a search of the free lists if the cache is depleted, rather than blocking in qc_import(). Reported by and discussed with: Brett Gutstein Reviewed by: alc MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D17483 Modified: head/sys/kern/subr_vmem.c head/sys/sys/vmem.h Modified: head/sys/kern/subr_vmem.c == --- head/sys/kern/subr_vmem.c Mon Oct 22 16:09:01 2018(r339598) +++ head/sys/kern/subr_vmem.c Mon Oct 22 16:16:42 2018(r339599) @@ -504,6 +504,9 @@ bt_insfree(vmem_t *vm, bt_t *bt) /* * Import from the arena into the quantum cache in UMA. + * + * We use VMEM_ADDR_QCACHE_MIN instead of 0: uma_zalloc() returns 0 to indicate + * failure, so UMA can't be used to cache a resource with value 0. */ static int qc_import(void *arg, void **store, int cnt, int domain, int flags) @@ -512,19 +515,16 @@ qc_import(void *arg, void **store, int cnt, int domain vmem_addr_t addr; int i; + KASSERT((flags & M_WAITOK) == 0, ("blocking allocation")); + qc = arg; - if ((flags & VMEM_FITMASK) == 0) - flags |= M_BESTFIT; for (i = 0; i < cnt; i++) { if (vmem_xalloc(qc->qc_vmem, qc->qc_size, 0, 0, 0, - VMEM_ADDR_MIN, VMEM_ADDR_MAX, flags, &addr) != 0) + VMEM_ADDR_QCACHE_MIN, VMEM_ADDR_MAX, flags, &addr) != 0) break; store[i] = (void *)addr; - /* Only guarantee one allocation. */ - flags &= ~M_WAITOK; - flags |= M_NOWAIT; } - return i; + return (i); } /* @@ -1123,15 +1123,20 @@ vmem_alloc(vmem_t *vm, vmem_size_t size, int flags, vm WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "vmem_alloc"); if (size <= vm->vm_qcache_max) { + /* +* Resource 0 cannot be cached, so avoid a blocking allocation +* in qc_import() and give the vmem_xalloc() call below a chance +* to return 0. +*/ qc = &vm->vm_qcache[(size - 1) >> vm->vm_quantum_shift]; - *addrp = (vmem_addr_t)uma_zalloc(qc->qc_cache, flags); - if (*addrp == 0) - return (ENOMEM); - return (0); + *addrp = (vmem_addr_t)uma_zalloc(qc->qc_cache, + (flags & ~M_WAITOK) | M_NOWAIT); + if (__predict_true(*addrp != 0)) + return (0); } - return vmem_xalloc(vm, size, 0, 0, 0, VMEM_ADDR_MIN, VMEM_ADDR_MAX, - flags, addrp); + return (vmem_xalloc(vm, size, 0, 0, 0, VMEM_ADDR_MIN, VMEM_ADDR_MAX, + flags, addrp)); } int @@ -1263,7 +1268,8 @@ vmem_free(vmem_t *vm, vmem_addr_t addr, vmem_size_t si qcache_t *qc; MPASS(size > 0); - if (size <= vm->vm_qcache_max) { + if (size <= vm->vm_qcache_max && + __predict_true(addr >= VMEM_ADDR_QCACHE_MIN)) { qc = &vm->vm_qcache[(size - 1) >> vm->vm_quantum_shift]; uma_zfree(qc->qc_cache, (void *)addr); } else Modified: head/sys/sys/vmem.h == --- head/sys/sys/vmem.h Mon Oct 22 16:09:01 2018(r339598) +++ head/sys/sys/vmem.h Mon Oct 22 16:16:42 2018(r339599) @@ -41,8 +41,9 @@ typedef struct vmem vmem_t; typedef uintptr_t vmem_addr_t; typedef size_t vmem_size_t; -#defineVMEM_ADDR_MIN 0 -#defineVMEM_ADDR_MAX (~(vmem_addr_t)0) +#defineVMEM_ADDR_MIN 0 +#defineVMEM_ADDR_QCACHE_MIN1 +#defineVMEM_ADDR_MAX (~(vmem_addr_t)0) typedef int (vmem_import_t)(void *, vmem_size_t, int, vmem_addr_t *); typedef void (vmem_release_t)(void *, vmem_addr_t, vmem_size_t); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339600 - head/sys/sys
Author: hselasky Date: Mon Oct 22 16:21:50 2018 New Revision: 339600 URL: https://svnweb.freebsd.org/changeset/base/339600 Log: Make sure returned value is checked and assert a valid refcount. While at it fix a print: Unsigned types cannot be negative. Reviewed by: kib, mjg Differential revision:https://reviews.freebsd.org/D17616 MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/sys/refcount.h Modified: head/sys/sys/refcount.h == --- head/sys/sys/refcount.h Mon Oct 22 16:16:42 2018(r339599) +++ head/sys/sys/refcount.h Mon Oct 22 16:21:50 2018(r339600) @@ -62,7 +62,7 @@ refcount_release(volatile u_int *count) atomic_thread_fence_rel(); old = atomic_fetchadd_int(count, -1); - KASSERT(old > 0, ("negative refcount %p", count)); + KASSERT(old > 0, ("refcount %p is zero", count)); if (old > 1) return (0); @@ -77,15 +77,19 @@ refcount_release(volatile u_int *count) } /* + * This functions returns non-zero if the refcount was + * incremented. Else zero is returned. + * * A temporary hack until refcount_* APIs are sorted out. */ -static __inline int +static __inline __result_use_check int refcount_acquire_if_not_zero(volatile u_int *count) { u_int old; old = *count; for (;;) { + KASSERT(old < UINT_MAX, ("refcount %p overflowed", count)); if (old == 0) return (0); if (atomic_fcmpset_int(count, &old, old + 1)) @@ -93,13 +97,14 @@ refcount_acquire_if_not_zero(volatile u_int *count) } } -static __inline int +static __inline __result_use_check int refcount_release_if_not_last(volatile u_int *count) { u_int old; old = *count; for (;;) { + KASSERT(old > 0, ("refcount %p is zero", count)); if (old == 1) return (0); if (atomic_fcmpset_int(count, &old, old - 1)) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339565 - in head: share/man/man4 share/man/man4/man4.i386 sys/conf sys/dev/aha sys/kern sys/modules sys/modules/aha sys/sparc64/conf
On Mon, Oct 22, 2018 at 9:52 AM Rodney W. Grimes < free...@pdx.rh.cn85.dnsmgr.net> wrote: > > On Sun, Oct 21, 2018 at 9:35 PM Warner Losh wrote: > > > > > Author: imp > > > Date: Mon Oct 22 02:34:25 2018 > > > New Revision: 339565 > > > URL: https://svnweb.freebsd.org/changeset/base/339565 > > > > > > Log: > > > Remove aha(4) from the tree. > > > > > > > > The documentation build is now failing, as there's an entity reference to > > the autogenerated > > hardware list, which does not exist anymore. Will you be able to look at > > those as part of your > > removals or does someone from the doc team need to handle it? > > Please stop deprecaton processing until: > 1) We have the new documented deprication policy > 2) We have crafted a step by step deprication set >of procedures so issues like this can be in it. > 2) Release 12.0 is shipped. > These drivers have already been litigated and were previously tagged, pursuant to community discussions, to be removed in 12. This is following the process, such as we have. Committing these changes now means that we could, if we wanted, MFC the changes. They were done carefully so they could all be MFC'd or they could be MFC'd one at a time. ncr(4) was also done w/o discussions today because it was deprecated in 1999, but its removal was overlooked until now. The bottom line is that these were properly removed in a time that was also proper to keep all our options open. I'm not going to stop the other deprecation activities. We're establishing a process that's working well and we'll continue to use it. There were some bumps with the NIC stuff which we've learned from and will incorporate into further rounds (next up: other SCSI drivers with no users, and some long-broken sound cards and PC Card (not CardBus)). While it would be nice to write a generic policy, that's hard to get right w/o experience. So Brooks and I are going to proceed with what we're doing (but plan no further removals until after 12.0 is out) so we can develop that experience. It's been a community discussion process so far, and will continue to be one. Once we have a couple of successful rounds of deprecation, we can look to formalizing the process that's working. There will be no more removals before 12.0R since we're too early in the process for all the others. Warner ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339601 - head/sys/vm
Author: markj Date: Mon Oct 22 17:04:04 2018 New Revision: 339601 URL: https://svnweb.freebsd.org/changeset/base/339601 Log: Swap in processes unless there's a global memory shortage. On NUMA systems, we would not swap in processes unless all domains had some free pages. This is too conservative in general. Instead, permit swapins so long as at least one domain has free pages, and add a kernel stack NUMA policy which ensures that we will try to allocate kernel stack pages from any domain. Reported and tested by: pho, Jan Bramkamp Reviewed by: alc, kib Discussed with: jeff MFC after:3 days Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D17304 Modified: head/sys/vm/vm_glue.c head/sys/vm/vm_swapout.c Modified: head/sys/vm/vm_glue.c == --- head/sys/vm/vm_glue.c Mon Oct 22 16:21:50 2018(r339600) +++ head/sys/vm/vm_glue.c Mon Oct 22 17:04:04 2018(r339601) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -298,7 +299,7 @@ vm_sync_icache(vm_map_t map, vm_offset_t va, vm_offset struct kstack_cache_entry *kstack_cache; static int kstack_cache_size = 128; -static int kstacks; +static int kstacks, kstack_domain_iter; static struct mtx kstack_cache_mtx; MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF); @@ -367,6 +368,17 @@ vm_thread_new(struct thread *td, int pages) printf("vm_thread_new: kstack allocation failed\n"); vm_object_deallocate(ksobj); return (0); + } + + /* +* Ensure that kstack objects can draw pages from any memory +* domain. Otherwise a local memory shortage can block a process +* swap-in. +*/ + if (vm_ndomains > 1) { + ksobj->domain.dr_policy = DOMAINSET_RR(); + ksobj->domain.dr_iter = atomic_fetchadd_int(&kstack_domain_iter, + 1); } atomic_add_int(&kstacks, 1); Modified: head/sys/vm/vm_swapout.c == --- head/sys/vm/vm_swapout.cMon Oct 22 16:21:50 2018(r339600) +++ head/sys/vm/vm_swapout.cMon Oct 22 17:04:04 2018(r339601) @@ -742,7 +742,8 @@ swapper_selector(bool wkilled_only) /* * Limit swapper to swap in one non-WKILLED process in MAXSLP/2 * interval, assuming that there is: - * - no memory shortage; + * - there exists at least one domain that is not suffering from a shortage of + * free memory; * - no parallel swap-ins; * - no other swap-ins in the current SWAPIN_INTERVAL. */ @@ -750,7 +751,7 @@ static bool swapper_wkilled_only(void) { - return (vm_page_count_min() || swap_inprogress > 0 || + return (vm_page_count_min_set(&all_domains) || swap_inprogress > 0 || (u_int)(ticks - last_swapin) < SWAPIN_INTERVAL); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339601 - head/sys/vm
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Am Mon, 22 Oct 2018 17:04:05 + (UTC) Mark Johnston schrieb: > Author: markj > Date: Mon Oct 22 17:04:04 2018 > New Revision: 339601 > URL: https://svnweb.freebsd.org/changeset/base/339601 > > Log: > Swap in processes unless there's a global memory shortage. > > On NUMA systems, we would not swap in processes unless all domains > had some free pages. This is too conservative in general. Instead, > permit swapins so long as at least one domain has free pages, and add > a kernel stack NUMA policy which ensures that we will try to allocate > kernel stack pages from any domain. > > Reported and tested by: pho, Jan Bramkamp > Reviewed by:alc, kib > Discussed with: jeff > MFC after: 3 days > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D17304 > > Modified: > head/sys/vm/vm_glue.c > head/sys/vm/vm_swapout.c > > Modified: head/sys/vm/vm_glue.c > == > --- head/sys/vm/vm_glue.c Mon Oct 22 16:21:50 2018(r339600) > +++ head/sys/vm/vm_glue.c Mon Oct 22 17:04:04 2018(r339601) > @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > #include > #include > @@ -298,7 +299,7 @@ vm_sync_icache(vm_map_t map, vm_offset_t va, vm_offset > > struct kstack_cache_entry *kstack_cache; > static int kstack_cache_size = 128; > -static int kstacks; > +static int kstacks, kstack_domain_iter; > static struct mtx kstack_cache_mtx; > MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF); > > @@ -367,6 +368,17 @@ vm_thread_new(struct thread *td, int pages) > printf("vm_thread_new: kstack allocation failed\n"); > vm_object_deallocate(ksobj); > return (0); > + } > + > + /* > + * Ensure that kstack objects can draw pages from any memory > + * domain. Otherwise a local memory shortage can block a process > + * swap-in. > + */ > + if (vm_ndomains > 1) { > + ksobj->domain.dr_policy = DOMAINSET_RR(); > + ksobj->domain.dr_iter = atomic_fetchadd_int(&kstack_domain_iter, > + 1); > } > > atomic_add_int(&kstacks, 1); > > Modified: head/sys/vm/vm_swapout.c > == > --- head/sys/vm/vm_swapout.c Mon Oct 22 16:21:50 2018(r339600) > +++ head/sys/vm/vm_swapout.c Mon Oct 22 17:04:04 2018(r339601) > @@ -742,7 +742,8 @@ swapper_selector(bool wkilled_only) > /* > * Limit swapper to swap in one non-WKILLED process in MAXSLP/2 > * interval, assuming that there is: > - * - no memory shortage; > + * - there exists at least one domain that is not suffering from a shortage > of > + * free memory; > * - no parallel swap-ins; > * - no other swap-ins in the current SWAPIN_INTERVAL. > */ > @@ -750,7 +751,7 @@ static bool > swapper_wkilled_only(void) > { > > - return (vm_page_count_min() || swap_inprogress > 0 || > + return (vm_page_count_min_set(&all_domains) || swap_inprogress > 0 || > (u_int)(ticks - last_swapin) < SWAPIN_INTERVAL); > } > > ___ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" This commit breaks CURRENT buildkernel: [...] - --- vm_glue.o --- /usr/src/sys/vm/vm_glue.c:380:17: error: no member named 'dr_iter' in 'struct domainset_ref' Kind regards, oh - -- O. Hartmann Ich widerspreche der Nutzung oder Übermittlung meiner Daten für Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG). -BEGIN PGP SIGNATURE- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCW84FwwAKCRDS528fyFhY lMYGAf9h+vf8AI9JLGVUhUwwblt8GjAvrqRAcDw1Q6NG/I5xX8npX4OrXmrlzmpf 8VZ7n9fnnlZAD7e3/6MvgkfNMjPGAf96XTFAiTMSXTpQ84N5g2G03L5kAZaMaRKS 0mViZJlgQnjQaoV7089M0httbwXhz3oqGW+L0ZoZL5O5Rg9mDK/Y =0PHK -END PGP SIGNATURE- ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339602 - head/sys/vm
Author: markj Date: Mon Oct 22 17:17:30 2018 New Revision: 339602 URL: https://svnweb.freebsd.org/changeset/base/339602 Log: Avoid a redundancy in a comment updated by r339601. Reported by: alc X-MFC with: r339601 Modified: head/sys/vm/vm_swapout.c Modified: head/sys/vm/vm_swapout.c == --- head/sys/vm/vm_swapout.cMon Oct 22 17:04:04 2018(r339601) +++ head/sys/vm/vm_swapout.cMon Oct 22 17:17:30 2018(r339602) @@ -742,8 +742,7 @@ swapper_selector(bool wkilled_only) /* * Limit swapper to swap in one non-WKILLED process in MAXSLP/2 * interval, assuming that there is: - * - there exists at least one domain that is not suffering from a shortage of - * free memory; + * - at least one domain that is not suffering from a shortage of free memory; * - no parallel swap-ins; * - no other swap-ins in the current SWAPIN_INTERVAL. */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339603 - head/sys/vm
Author: markj Date: Mon Oct 22 17:19:48 2018 New Revision: 339603 URL: https://svnweb.freebsd.org/changeset/base/339603 Log: Fix the build after r339601. I committed some patches out of order and didn't build-test one of them. Reported by: Jenkins, O. Hartmann X-MFC with: r339601 Modified: head/sys/vm/vm_glue.c Modified: head/sys/vm/vm_glue.c == --- head/sys/vm/vm_glue.c Mon Oct 22 17:17:30 2018(r339602) +++ head/sys/vm/vm_glue.c Mon Oct 22 17:19:48 2018(r339603) @@ -377,8 +377,8 @@ vm_thread_new(struct thread *td, int pages) */ if (vm_ndomains > 1) { ksobj->domain.dr_policy = DOMAINSET_RR(); - ksobj->domain.dr_iter = atomic_fetchadd_int(&kstack_domain_iter, - 1); + ksobj->domain.dr_iterator = + atomic_fetchadd_int(&kstack_domain_iter, 1); } atomic_add_int(&kstacks, 1); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339601 - head/sys/vm
On Mon, Oct 22, 2018 at 07:15:20PM +0200, O. Hartmann wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > Am Mon, 22 Oct 2018 17:04:05 + (UTC) > Mark Johnston schrieb: > > > Author: markj > > Date: Mon Oct 22 17:04:04 2018 > > New Revision: 339601 > > URL: https://svnweb.freebsd.org/changeset/base/339601 > > > > Log: > > Swap in processes unless there's a global memory shortage. > > > > On NUMA systems, we would not swap in processes unless all domains > > had some free pages. This is too conservative in general. Instead, > > permit swapins so long as at least one domain has free pages, and add > > a kernel stack NUMA policy which ensures that we will try to allocate > > kernel stack pages from any domain. > > > > Reported and tested by: pho, Jan Bramkamp > > Reviewed by: alc, kib > > Discussed with: jeff > > MFC after:3 days > > Sponsored by: The FreeBSD Foundation > > Differential Revision:https://reviews.freebsd.org/D17304 > > > > Modified: > > head/sys/vm/vm_glue.c > > head/sys/vm/vm_swapout.c > > > This commit breaks CURRENT buildkernel: > [...] > - --- vm_glue.o --- > /usr/src/sys/vm/vm_glue.c:380:17: error: no member named 'dr_iter' in 'struct > domainset_ref' Fixed, sorry for the breakage. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339605 - head/sys/kern
Author: cem Date: Mon Oct 22 17:42:57 2018 New Revision: 339605 URL: https://svnweb.freebsd.org/changeset/base/339605 Log: Conditionalize kern.tty_info_kstacks feature on STACKS option Fix tinderbox (mips XLPN32) after r339471. Reported by: tinderbox X-MFC-With: r339471 Sponsored by: Dell EMC Isilon Modified: head/sys/kern/tty_info.c Modified: head/sys/kern/tty_info.c == --- head/sys/kern/tty_info.cMon Oct 22 17:27:36 2018(r339604) +++ head/sys/kern/tty_info.cMon Oct 22 17:42:57 2018(r339605) @@ -236,10 +236,12 @@ sbuf_tty_drain(void *a, const char *d, int len) return (-ENXIO); } +#ifdef STACK static bool tty_info_kstacks = false; SYSCTL_BOOL(_kern, OID_AUTO, tty_info_kstacks, CTLFLAG_RWTUN, &tty_info_kstacks, 0, "Enable printing kernel stack(9) traces on ^T (tty info)"); +#endif /* * Report on state of foreground process group. @@ -248,13 +250,16 @@ void tty_info(struct tty *tp) { struct timeval rtime, utime, stime; +#ifdef STACK struct stack stack; + int sterr; +#endif struct proc *p, *ppick; struct thread *td, *tdpick; const char *stateprefix, *state; struct sbuf sb; long rss; - int load, pctcpu, sterr; + int load, pctcpu; pid_t pid; char comm[MAXCOMLEN + 1]; struct rusage ru; @@ -329,6 +334,7 @@ tty_info(struct tty *tp) else state = "unknown"; pctcpu = (sched_pctcpu(td) * 1 + FSCALE / 2) >> FSHIFT; +#ifdef STACK if (tty_info_kstacks) { stack_zero(&stack); if (TD_IS_SWAPPED(td) || TD_IS_RUNNING(td)) @@ -338,6 +344,7 @@ tty_info(struct tty *tp) sterr = 0; } } +#endif thread_unlock(td); if (p->p_state == PRS_NEW || p->p_state == PRS_ZOMBIE) rss = 0; @@ -359,8 +366,10 @@ tty_info(struct tty *tp) (long)stime.tv_sec, stime.tv_usec / 1, pctcpu / 100, rss); +#ifdef STACK if (tty_info_kstacks && sterr == 0) stack_sbuf_print_flags(&sb, &stack, M_NOWAIT); +#endif out: sbuf_finish(&sb); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339606 - in head: lib/libzstd sys/conf sys/contrib/zstd sys/contrib/zstd/contrib/gen_html sys/contrib/zstd/contrib/meson sys/contrib/zstd/contrib/pzstd sys/contrib/zstd/contrib/seekabl...
Author: cem Date: Mon Oct 22 18:29:12 2018 New Revision: 339606 URL: https://svnweb.freebsd.org/changeset/base/339606 Log: Update to Zstandard 1.3.7 Relnotes: yes Sponsored by: Dell EMC Isilon Added: head/sys/contrib/zstd/doc/images/cdict_v136.png (contents, props changed) head/sys/contrib/zstd/doc/images/zstd_cdict_v1_3_5.png (contents, props changed) head/sys/contrib/zstd/lib/common/debug.c (contents, props changed) head/sys/contrib/zstd/lib/common/debug.h (contents, props changed) head/sys/contrib/zstd/lib/compress/hist.c (contents, props changed) head/sys/contrib/zstd/lib/compress/hist.h (contents, props changed) head/sys/contrib/zstd/lib/dictBuilder/cover.h (contents, props changed) head/sys/contrib/zstd/lib/dictBuilder/fastcover.c (contents, props changed) head/sys/contrib/zstd/programs/zstdgrep.1 (contents, props changed) head/sys/contrib/zstd/programs/zstdgrep.1.md head/sys/contrib/zstd/programs/zstdless.1 (contents, props changed) head/sys/contrib/zstd/programs/zstdless.1.md head/sys/contrib/zstd/tests/libzstd_partial_builds.sh (contents, props changed) head/sys/contrib/zstd/tests/rateLimiter.py (contents, props changed) Deleted: head/sys/contrib/zstd/circle.yml head/sys/contrib/zstd/tests/namespaceTest.c Modified: head/lib/libzstd/Makefile head/sys/conf/files head/sys/conf/files.sparc64 head/sys/contrib/zstd/.gitattributes head/sys/contrib/zstd/Makefile head/sys/contrib/zstd/NEWS head/sys/contrib/zstd/README.md head/sys/contrib/zstd/TESTING.md head/sys/contrib/zstd/appveyor.yml head/sys/contrib/zstd/contrib/gen_html/Makefile head/sys/contrib/zstd/contrib/meson/meson.build head/sys/contrib/zstd/contrib/pzstd/Makefile head/sys/contrib/zstd/contrib/pzstd/Options.cpp head/sys/contrib/zstd/contrib/pzstd/Pzstd.cpp head/sys/contrib/zstd/contrib/seekable_format/examples/Makefile head/sys/contrib/zstd/contrib/seekable_format/examples/seekable_compression.c head/sys/contrib/zstd/contrib/seekable_format/examples/seekable_decompression.c head/sys/contrib/zstd/contrib/seekable_format/zstd_seekable.h head/sys/contrib/zstd/contrib/seekable_format/zstdseek_decompress.c head/sys/contrib/zstd/doc/zstd_compression_format.md head/sys/contrib/zstd/doc/zstd_manual.html head/sys/contrib/zstd/lib/BUCK head/sys/contrib/zstd/lib/Makefile head/sys/contrib/zstd/lib/README.md head/sys/contrib/zstd/lib/common/bitstream.h head/sys/contrib/zstd/lib/common/compiler.h head/sys/contrib/zstd/lib/common/cpu.h head/sys/contrib/zstd/lib/common/entropy_common.c head/sys/contrib/zstd/lib/common/fse.h head/sys/contrib/zstd/lib/common/fse_decompress.c head/sys/contrib/zstd/lib/common/huf.h head/sys/contrib/zstd/lib/common/mem.h head/sys/contrib/zstd/lib/common/pool.c head/sys/contrib/zstd/lib/common/pool.h head/sys/contrib/zstd/lib/common/xxhash.c head/sys/contrib/zstd/lib/common/zstd_common.c head/sys/contrib/zstd/lib/common/zstd_internal.h head/sys/contrib/zstd/lib/compress/fse_compress.c head/sys/contrib/zstd/lib/compress/huf_compress.c head/sys/contrib/zstd/lib/compress/zstd_compress.c head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h head/sys/contrib/zstd/lib/compress/zstd_double_fast.c head/sys/contrib/zstd/lib/compress/zstd_double_fast.h head/sys/contrib/zstd/lib/compress/zstd_fast.c head/sys/contrib/zstd/lib/compress/zstd_fast.h head/sys/contrib/zstd/lib/compress/zstd_lazy.c head/sys/contrib/zstd/lib/compress/zstd_lazy.h head/sys/contrib/zstd/lib/compress/zstd_ldm.c head/sys/contrib/zstd/lib/compress/zstd_ldm.h head/sys/contrib/zstd/lib/compress/zstd_opt.c head/sys/contrib/zstd/lib/compress/zstd_opt.h head/sys/contrib/zstd/lib/compress/zstdmt_compress.c head/sys/contrib/zstd/lib/compress/zstdmt_compress.h head/sys/contrib/zstd/lib/decompress/huf_decompress.c head/sys/contrib/zstd/lib/decompress/zstd_decompress.c head/sys/contrib/zstd/lib/dictBuilder/cover.c head/sys/contrib/zstd/lib/dictBuilder/divsufsort.c head/sys/contrib/zstd/lib/dictBuilder/zdict.c head/sys/contrib/zstd/lib/dictBuilder/zdict.h head/sys/contrib/zstd/lib/freebsd/zstd_kmalloc.c head/sys/contrib/zstd/lib/legacy/zstd_v01.c head/sys/contrib/zstd/lib/legacy/zstd_v02.c head/sys/contrib/zstd/lib/legacy/zstd_v03.c head/sys/contrib/zstd/lib/legacy/zstd_v04.c head/sys/contrib/zstd/lib/legacy/zstd_v05.c head/sys/contrib/zstd/lib/legacy/zstd_v06.c head/sys/contrib/zstd/lib/legacy/zstd_v07.c head/sys/contrib/zstd/lib/zstd.h head/sys/contrib/zstd/programs/Makefile head/sys/contrib/zstd/programs/README.md head/sys/contrib/zstd/programs/bench.c head/sys/contrib/zstd/programs/bench.h head/sys/contrib/zstd/programs/datagen.c head/sys/contrib/zstd/programs/dibio.c head/sys/contrib/zstd/programs/dibio.h head/sys/contrib/zstd/programs/fileio.c head/sys/contrib/zstd/programs/fileio.h head/sys/contrib/zstd/programs/platform.h head/sys/contrib/zstd
svn commit: r339607 - head
Author: emaste Date: Mon Oct 22 18:40:21 2018 New Revision: 339607 URL: https://svnweb.freebsd.org/changeset/base/339607 Log: Makefile.inc1: clean up stale dependency hacks Our dependency tracking cannot directly cope with certain source tree changes, particularly with respect to removing or moving source files or replacing generated files. We have a collection of ad-hoc workarounds to handle these cases. As there is a (small) build-time cost inherent in these workarounds, we do not want to keep them indefinitely. Thus, remove workarounds from 2017. Sponsored by: The FreeBSD Foundation Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Mon Oct 22 18:29:12 2018(r339606) +++ head/Makefile.inc1 Mon Oct 22 18:40:21 2018(r339607) @@ -903,40 +903,18 @@ _sanity_check: .PHONY .MAKE _cleanobj_fast_depend_hack: .PHONY # Syscall stubs rewritten in C and obsolete MD assembly implementations # Date SVN Rev Syscalls -# 20170624 r320278 fstat fstatat fstatfs getdirentries getfsstat statfs # 20180404 r332048 sigreturn # 20180405 r332080 shmat # 20180406 r332119 setlogin # 20180411 r332443 exect # 20180525 r334224 vadvise # 20180604 r334626 brk sbrk -.for f in brk exect fstat fstatat fstatfs getdirentries getfsstat sbrk setlogin shmat sigreturn statfs vadvise +.for f in brk exect sbrk setlogin shmat sigreturn vadvise @if [ -e "${OBJTOP}/lib/libc/.depend.${f}.o" ] && \ egrep -qw '${f}\.[sS]' ${OBJTOP}/lib/libc/.depend.${f}.o; then \ echo "Removing stale dependencies for ${f} syscall wrappers"; \ rm -f ${OBJTOP}/lib/libc/.depend.${f}.* \ ${LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libc/.depend.${f}.*}; \ - fi -.endfor -# 20170607 remove stale dependencies for utimens* wrappers removed in r319663 -.for f in futimens utimensat - @if [ -e "${OBJTOP}/lib/libc/.depend.${f}.o" ] && \ - egrep -q '/${f}.c' ${OBJTOP}/lib/libc/.depend.${f}.o; then \ - echo "Removing stale dependencies for ${f} syscall wrappers"; \ - rm -f ${OBJTOP}/lib/libc/.depend.${f}.* \ - ${LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libc/.depend.${f}.*}; \ - fi -.endfor -# 20170523 remove stale generated asm files for functions which are no longer -# syscalls after r302092 (pipe) and r318736 (others) -.for f in getdents lstat mknod pipe stat - @if [ -e "${OBJTOP}/lib/libc/${f}.s" ] || \ - [ -e "${OBJTOP}/lib/libc/${f}.S" ] ; then \ - echo "Removing stale generated ${f} syscall files"; \ - rm -f ${OBJTOP}/lib/libc/${f}.* \ - ${OBJTOP}/lib/libc/.depend.${f}.* \ - ${LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libc/${f}.*} \ - ${LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libc/.depend.${f}.*}; \ fi .endfor # 20181013 r339348 bcopy reimplemented as .c ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339608 - head/share/man/man7
Author: emaste Date: Mon Oct 22 18:41:22 2018 New Revision: 339608 URL: https://svnweb.freebsd.org/changeset/base/339608 Log: arch.7: first appeared in FreeBSD 11.1 Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 == --- head/share/man/man7/arch.7 Mon Oct 22 18:40:21 2018(r339607) +++ head/share/man/man7/arch.7 Mon Oct 22 18:41:22 2018(r339608) @@ -458,4 +458,4 @@ Like An .Nm manual page appeared in -.Fx 12 . +.Fx 11.1 . ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339608 - head/share/man/man7
> Author: emaste > Date: Mon Oct 22 18:41:22 2018 > New Revision: 339608 > URL: https://svnweb.freebsd.org/changeset/base/339608 > > Log: > arch.7: first appeared in FreeBSD 11.1 MFC? > Modified: > head/share/man/man7/arch.7 > > Modified: head/share/man/man7/arch.7 > == > --- head/share/man/man7/arch.7Mon Oct 22 18:40:21 2018 > (r339607) > +++ head/share/man/man7/arch.7Mon Oct 22 18:41:22 2018 > (r339608) > @@ -458,4 +458,4 @@ Like > An > .Nm > manual page appeared in > -.Fx 12 . > +.Fx 11.1 . > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339606 - in head: lib/libzstd sys/conf sys/contrib/zstd sys/contrib/zstd/contrib/gen_html sys/contrib/zstd/contrib/meson sys/contrib/zstd/contrib/pzstd sys/contrib/zstd/contrib/seekab
[ Charset UTF-8 unsupported, converting... ] > Author: cem > Date: Mon Oct 22 18:29:12 2018 > New Revision: 339606 > URL: https://svnweb.freebsd.org/changeset/base/339606 > > Log: > Update to Zstandard 1.3.7 > > Relnotes: yes > Sponsored by: Dell EMC Isilon MFC after: 1+month? > Added: > head/sys/contrib/zstd/doc/images/cdict_v136.png (contents, props changed) > head/sys/contrib/zstd/doc/images/zstd_cdict_v1_3_5.png (contents, props > changed) > head/sys/contrib/zstd/lib/common/debug.c (contents, props changed) > head/sys/contrib/zstd/lib/common/debug.h (contents, props changed) > head/sys/contrib/zstd/lib/compress/hist.c (contents, props changed) > head/sys/contrib/zstd/lib/compress/hist.h (contents, props changed) > head/sys/contrib/zstd/lib/dictBuilder/cover.h (contents, props changed) > head/sys/contrib/zstd/lib/dictBuilder/fastcover.c (contents, props > changed) > head/sys/contrib/zstd/programs/zstdgrep.1 (contents, props changed) > head/sys/contrib/zstd/programs/zstdgrep.1.md > head/sys/contrib/zstd/programs/zstdless.1 (contents, props changed) > head/sys/contrib/zstd/programs/zstdless.1.md > head/sys/contrib/zstd/tests/libzstd_partial_builds.sh (contents, props > changed) > head/sys/contrib/zstd/tests/rateLimiter.py (contents, props changed) > Deleted: > head/sys/contrib/zstd/circle.yml > head/sys/contrib/zstd/tests/namespaceTest.c > Modified: > head/lib/libzstd/Makefile > head/sys/conf/files > head/sys/conf/files.sparc64 > head/sys/contrib/zstd/.gitattributes > head/sys/contrib/zstd/Makefile > head/sys/contrib/zstd/NEWS > head/sys/contrib/zstd/README.md > head/sys/contrib/zstd/TESTING.md > head/sys/contrib/zstd/appveyor.yml > head/sys/contrib/zstd/contrib/gen_html/Makefile > head/sys/contrib/zstd/contrib/meson/meson.build > head/sys/contrib/zstd/contrib/pzstd/Makefile > head/sys/contrib/zstd/contrib/pzstd/Options.cpp > head/sys/contrib/zstd/contrib/pzstd/Pzstd.cpp > head/sys/contrib/zstd/contrib/seekable_format/examples/Makefile > > head/sys/contrib/zstd/contrib/seekable_format/examples/seekable_compression.c > > head/sys/contrib/zstd/contrib/seekable_format/examples/seekable_decompression.c > head/sys/contrib/zstd/contrib/seekable_format/zstd_seekable.h > head/sys/contrib/zstd/contrib/seekable_format/zstdseek_decompress.c > head/sys/contrib/zstd/doc/zstd_compression_format.md > head/sys/contrib/zstd/doc/zstd_manual.html > head/sys/contrib/zstd/lib/BUCK > head/sys/contrib/zstd/lib/Makefile > head/sys/contrib/zstd/lib/README.md > head/sys/contrib/zstd/lib/common/bitstream.h > head/sys/contrib/zstd/lib/common/compiler.h > head/sys/contrib/zstd/lib/common/cpu.h > head/sys/contrib/zstd/lib/common/entropy_common.c > head/sys/contrib/zstd/lib/common/fse.h > head/sys/contrib/zstd/lib/common/fse_decompress.c > head/sys/contrib/zstd/lib/common/huf.h > head/sys/contrib/zstd/lib/common/mem.h > head/sys/contrib/zstd/lib/common/pool.c > head/sys/contrib/zstd/lib/common/pool.h > head/sys/contrib/zstd/lib/common/xxhash.c > head/sys/contrib/zstd/lib/common/zstd_common.c > head/sys/contrib/zstd/lib/common/zstd_internal.h > head/sys/contrib/zstd/lib/compress/fse_compress.c > head/sys/contrib/zstd/lib/compress/huf_compress.c > head/sys/contrib/zstd/lib/compress/zstd_compress.c > head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h > head/sys/contrib/zstd/lib/compress/zstd_double_fast.c > head/sys/contrib/zstd/lib/compress/zstd_double_fast.h > head/sys/contrib/zstd/lib/compress/zstd_fast.c > head/sys/contrib/zstd/lib/compress/zstd_fast.h > head/sys/contrib/zstd/lib/compress/zstd_lazy.c > head/sys/contrib/zstd/lib/compress/zstd_lazy.h > head/sys/contrib/zstd/lib/compress/zstd_ldm.c > head/sys/contrib/zstd/lib/compress/zstd_ldm.h > head/sys/contrib/zstd/lib/compress/zstd_opt.c > head/sys/contrib/zstd/lib/compress/zstd_opt.h > head/sys/contrib/zstd/lib/compress/zstdmt_compress.c > head/sys/contrib/zstd/lib/compress/zstdmt_compress.h > head/sys/contrib/zstd/lib/decompress/huf_decompress.c > head/sys/contrib/zstd/lib/decompress/zstd_decompress.c > head/sys/contrib/zstd/lib/dictBuilder/cover.c > head/sys/contrib/zstd/lib/dictBuilder/divsufsort.c > head/sys/contrib/zstd/lib/dictBuilder/zdict.c > head/sys/contrib/zstd/lib/dictBuilder/zdict.h > head/sys/contrib/zstd/lib/freebsd/zstd_kmalloc.c > head/sys/contrib/zstd/lib/legacy/zstd_v01.c > head/sys/contrib/zstd/lib/legacy/zstd_v02.c > head/sys/contrib/zstd/lib/legacy/zstd_v03.c > head/sys/contrib/zstd/lib/legacy/zstd_v04.c > head/sys/contrib/zstd/lib/legacy/zstd_v05.c > head/sys/contrib/zstd/lib/legacy/zstd_v06.c > head/sys/contrib/zstd/lib/legacy/zstd_v07.c > head/sys/contrib/zstd/lib/zstd.h > head/sys/contrib/zstd/programs/Makefile > head/sys/contrib/zstd/programs/README.md > head/sys/contrib/zstd/programs/bench.c > head/sys/contrib/zstd/programs/
svn commit: r339609 - in head/release: amd64 i386 powerpc sparc64
Author: emaste Date: Mon Oct 22 19:39:20 2018 New Revision: 339609 URL: https://svnweb.freebsd.org/changeset/base/339609 Log: release: set -e to exit on error in iso image scripts Reviewed by: gjb Differential Revision:https://reviews.freebsd.org/D17651 Modified: head/release/amd64/mkisoimages.sh head/release/i386/mkisoimages.sh head/release/powerpc/mkisoimages.sh head/release/sparc64/mkisoimages.sh Modified: head/release/amd64/mkisoimages.sh == --- head/release/amd64/mkisoimages.sh Mon Oct 22 18:41:22 2018 (r339608) +++ head/release/amd64/mkisoimages.sh Mon Oct 22 19:39:20 2018 (r339609) @@ -23,6 +23,8 @@ # extra-bits-dir, if provided, contains additional files to be merged # into base-bits-dir as part of making the image. +set -e + if [ -z $ETDUMP ]; then ETDUMP=etdump fi Modified: head/release/i386/mkisoimages.sh == --- head/release/i386/mkisoimages.shMon Oct 22 18:41:22 2018 (r339608) +++ head/release/i386/mkisoimages.shMon Oct 22 19:39:20 2018 (r339609) @@ -23,6 +23,8 @@ # extra-bits-dir, if provided, contains additional files to be merged # into base-bits-dir as part of making the image. +set -e + if [ "$1" = "-b" ]; then # This is highly x86-centric and will be used directly below. bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot" Modified: head/release/powerpc/mkisoimages.sh == --- head/release/powerpc/mkisoimages.sh Mon Oct 22 18:41:22 2018 (r339608) +++ head/release/powerpc/mkisoimages.sh Mon Oct 22 19:39:20 2018 (r339609) @@ -23,6 +23,7 @@ # extra-bits-dir, if provided, contains additional files to be merged # into base-bits-dir as part of making the image. +set -e if [ "$1" = "-b" ]; then bootable=1 Modified: head/release/sparc64/mkisoimages.sh == --- head/release/sparc64/mkisoimages.sh Mon Oct 22 18:41:22 2018 (r339608) +++ head/release/sparc64/mkisoimages.sh Mon Oct 22 19:39:20 2018 (r339609) @@ -22,6 +22,8 @@ # resulting ISO image, base-bits-dir contains the image contents and # extra-bits-dir, if provided, contains additional files to be merged # into base-bits-dir as part of making the image. +set -e + if [ $# -lt 3 ]; then echo "Usage: $0 [-b] image-label image-name base-bits-dir [extra-bits-dir]" > /dev/stderr exit 1 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339616 - in head: share/man/man4 sys/arm64/arm64 sys/kern sys/vm sys/x86/acpica
Author: markj Date: Mon Oct 22 20:13:51 2018 New Revision: 339616 URL: https://svnweb.freebsd.org/changeset/base/339616 Log: Make it possible to disable NUMA support with a tunable. This provides a chicken switch for anyone negatively impacted by enabling NUMA in the amd64 GENERIC kernel configuration. With NUMA disabled at boot-time, information about the NUMA topology is not exposed to the rest of the kernel, and all of physical memory is viewed as coming from a single domain. This method still has some performance overhead relative to disabling NUMA support at compile time. PR: 231460 Reviewed by: alc, gallatin, kib MFC after:1 week Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D17439 Modified: head/share/man/man4/numa.4 head/sys/arm64/arm64/mp_machdep.c head/sys/kern/kern_cpuset.c head/sys/vm/vm_phys.c head/sys/x86/acpica/srat.c Modified: head/share/man/man4/numa.4 == --- head/share/man/man4/numa.4 Mon Oct 22 20:00:43 2018(r339615) +++ head/share/man/man4/numa.4 Mon Oct 22 20:13:51 2018(r339616) @@ -24,18 +24,16 @@ .\" .\" $FreeBSD$ .\" -.Dd July 10, 2018 +.Dd October 22, 2018 .Dt NUMA 4 .Os .Sh NAME .Nm NUMA .Nd Non-Uniform Memory Access .Sh SYNOPSIS -.Cd options SMP -.Cd options MAXMEMDOM=16 +.Cd options MAXMEMDOM +.Cd options NUMA .Pp -.In sys/cpuset.h -.In sys/bus.h .Sh DESCRIPTION Non-Uniform Memory Access is a computer architecture design which involves unequal costs between processors, memory and IO devices @@ -47,14 +45,26 @@ architecture, the latency to access specific memory or depends upon which processor the memory or device is attached to. Accessing memory local to a processor is faster than accessing memory that is connected to one of the other processors. +.Fx +implements NUMA-aware memory allocation policies. +By default it attempts to ensure that allocations are balanced across +each domain. +Users may override the default domain selection policy using +.Xr cpuset 1 . .Pp .Nm -is enabled when the +support is enabled when the .Cd NUMA -option is used in a kernel configuration -file and the +option is specified in the kernel configuration file. +Each platform defines the .Cd MAXMEMDOM -option is set to a value greater than 1. +constant, which specifies the maximum number of supported NUMA domains. +This constant may be specified in the kernel configuration file. +.Nm +support can be disabled at boot time by setting the +.Va vm.numa.disabled +tunable to 1. +Other values for this tunable are currently ignored. .Pp Thread and process .Nm @@ -128,7 +138,7 @@ tool first appeared in .Fx 11.0 and were removed in .Fx 12.0 . -Current implementation appeared in +The current implementation appeared in .Fx 12.0 . .Pp .Sh AUTHORS Modified: head/sys/arm64/arm64/mp_machdep.c == --- head/sys/arm64/arm64/mp_machdep.c Mon Oct 22 20:00:43 2018 (r339615) +++ head/sys/arm64/arm64/mp_machdep.c Mon Oct 22 20:13:51 2018 (r339616) @@ -576,11 +576,12 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size return (FALSE); /* Try to read the numa node of this cpu */ - if (OF_getencprop(node, "numa-node-id", &domain, sizeof(domain)) > 0) { - __pcpu[id].pc_domain = domain; - if (domain < MAXMEMDOM) - CPU_SET(id, &cpuset_domain[domain]); - } + if (vm_ndomains == 1 || + OF_getencprop(node, "numa-node-id", &domain, sizeof(domain)) <= 0) + domain = 0; + __pcpu[id].pc_domain = domain; + if (domain < MAXMEMDOM) + CPU_SET(id, &cpuset_domain[domain]); return (TRUE); } Modified: head/sys/kern/kern_cpuset.c == --- head/sys/kern/kern_cpuset.c Mon Oct 22 20:00:43 2018(r339615) +++ head/sys/kern/kern_cpuset.c Mon Oct 22 20:13:51 2018(r339616) @@ -458,6 +458,12 @@ _domainset_create(struct domainset *domain, struct dom struct domainset *ndomain; int i, j, max; + KASSERT(domain->ds_cnt <= vm_ndomains, + ("invalid domain count in domainset %p", domain)); + KASSERT(domain->ds_policy != DOMAINSET_POLICY_PREFER || + domain->ds_prefer < vm_ndomains, + ("invalid preferred domain in domains %p", domain)); + mtx_lock_spin(&cpuset_lock); LIST_FOREACH(ndomain, &cpuset_domains, ds_link) if (domainset_equal(ndomain, domain)) Modified: head/sys/vm/vm_phys.c == --- head/sys/vm/vm_phys.c Mon Oct 22 20:00:43 2018(r339615) +++ head/sys/vm/vm_phys.c Mon Oct 22 20:13:51 2018(r339616) @@
svn commit: r339617 - head/sys/contrib/zstd
Author: cem Date: Mon Oct 22 20:22:33 2018 New Revision: 339617 URL: https://svnweb.freebsd.org/changeset/base/339617 Log: Retroactively vendor 1.3.3, 1.3.4, and 1.3.7 imports "svn merge --record-only svn+ssh://repo.freebsd.org/base/vendor/zstd/dist" Reported by: jhb, markj Sponsored by: Dell EMC Isilon Modified: Directory Properties: head/sys/contrib/zstd/ (props changed) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339616 - in head: share/man/man4 sys/arm64/arm64 sys/kern sys/vm sys/x86/acpica
> Author: markj > Date: Mon Oct 22 20:13:51 2018 > New Revision: 339616 > URL: https://svnweb.freebsd.org/changeset/base/339616 > > Log: > Make it possible to disable NUMA support with a tunable. > > This provides a chicken switch for anyone negatively impacted by > enabling NUMA in the amd64 GENERIC kernel configuration. With > NUMA disabled at boot-time, information about the NUMA topology > is not exposed to the rest of the kernel, and all of physical > memory is viewed as coming from a single domain. > > This method still has some performance overhead relative to disabling > NUMA support at compile time. > > PR: 231460 > Reviewed by:alc, gallatin, kib > MFC after: 1 week > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D17439 Thank you Mark. > Modified: > head/share/man/man4/numa.4 > head/sys/arm64/arm64/mp_machdep.c > head/sys/kern/kern_cpuset.c > head/sys/vm/vm_phys.c > head/sys/x86/acpica/srat.c > > Modified: head/share/man/man4/numa.4 > == > --- head/share/man/man4/numa.4Mon Oct 22 20:00:43 2018 > (r339615) > +++ head/share/man/man4/numa.4Mon Oct 22 20:13:51 2018 > (r339616) > @@ -24,18 +24,16 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd July 10, 2018 > +.Dd October 22, 2018 > .Dt NUMA 4 > .Os > .Sh NAME > .Nm NUMA > .Nd Non-Uniform Memory Access > .Sh SYNOPSIS > -.Cd options SMP > -.Cd options MAXMEMDOM=16 > +.Cd options MAXMEMDOM > +.Cd options NUMA > .Pp > -.In sys/cpuset.h > -.In sys/bus.h > .Sh DESCRIPTION > Non-Uniform Memory Access is a computer architecture design which > involves unequal costs between processors, memory and IO devices > @@ -47,14 +45,26 @@ architecture, the latency to access specific memory or > depends upon which processor the memory or device is attached to. > Accessing memory local to a processor is faster than accessing memory > that is connected to one of the other processors. > +.Fx > +implements NUMA-aware memory allocation policies. > +By default it attempts to ensure that allocations are balanced across > +each domain. > +Users may override the default domain selection policy using > +.Xr cpuset 1 . > .Pp > .Nm > -is enabled when the > +support is enabled when the > .Cd NUMA > -option is used in a kernel configuration > -file and the > +option is specified in the kernel configuration file. > +Each platform defines the > .Cd MAXMEMDOM > -option is set to a value greater than 1. > +constant, which specifies the maximum number of supported NUMA domains. > +This constant may be specified in the kernel configuration file. > +.Nm > +support can be disabled at boot time by setting the > +.Va vm.numa.disabled > +tunable to 1. > +Other values for this tunable are currently ignored. > .Pp > Thread and process > .Nm > @@ -128,7 +138,7 @@ tool first appeared in > .Fx 11.0 > and were removed in > .Fx 12.0 . > -Current implementation appeared in > +The current implementation appeared in > .Fx 12.0 . > .Pp > .Sh AUTHORS > > Modified: head/sys/arm64/arm64/mp_machdep.c > == > --- head/sys/arm64/arm64/mp_machdep.c Mon Oct 22 20:00:43 2018 > (r339615) > +++ head/sys/arm64/arm64/mp_machdep.c Mon Oct 22 20:13:51 2018 > (r339616) > @@ -576,11 +576,12 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size > return (FALSE); > > /* Try to read the numa node of this cpu */ > - if (OF_getencprop(node, "numa-node-id", &domain, sizeof(domain)) > 0) { > - __pcpu[id].pc_domain = domain; > - if (domain < MAXMEMDOM) > - CPU_SET(id, &cpuset_domain[domain]); > - } > + if (vm_ndomains == 1 || > + OF_getencprop(node, "numa-node-id", &domain, sizeof(domain)) <= 0) > + domain = 0; > + __pcpu[id].pc_domain = domain; > + if (domain < MAXMEMDOM) > + CPU_SET(id, &cpuset_domain[domain]); > > return (TRUE); > } > > Modified: head/sys/kern/kern_cpuset.c > == > --- head/sys/kern/kern_cpuset.c Mon Oct 22 20:00:43 2018 > (r339615) > +++ head/sys/kern/kern_cpuset.c Mon Oct 22 20:13:51 2018 > (r339616) > @@ -458,6 +458,12 @@ _domainset_create(struct domainset *domain, struct dom > struct domainset *ndomain; > int i, j, max; > > + KASSERT(domain->ds_cnt <= vm_ndomains, > + ("invalid domain count in domainset %p", domain)); > + KASSERT(domain->ds_policy != DOMAINSET_POLICY_PREFER || > + domain->ds_prefer < vm_ndomains, > + ("invalid preferred domain in domains %p", domain)); > + > mtx_lock_spin(&cpuset_lock); > LIST_FOREACH(ndomain, &cpuset_domains, ds_link) > if (domainset_equ
svn commit: r339618 - head/sys/compat/linuxkpi/common/include/linux
Author: tijl Date: Mon Oct 22 20:55:35 2018 New Revision: 339618 URL: https://svnweb.freebsd.org/changeset/base/339618 Log: Define linuxkpi readq for 64-bit architectures. It is used by drm-kmod. Currently the compiler picks up the definition in machine/cpufunc.h. Add compiler memory barriers to read* and write*. The Linux x86 implementation of these functions uses inline asm with "memory" clobber. The Linux x86 implementation of read_relaxed* and write_relaxed* uses the same inline asm without "memory" clobber. Implement ioread* and iowrite* in terms of read* and write* so they also have memory barriers. Qualify the addr parameter in write* as volatile. Like Linux, define macros with the same name as the inline functions. Only define 64-bit versions on 64-bit architectures because generally 32-bit architectures can't do atomic 64-bit loads and stores. Regroup the functions a bit and add brief comments explaining what they do: - __raw_read*, __raw_write*: atomic, no barriers, no byte swapping - read_relaxed*, write_relaxed*: atomic, no barriers, little-endian - read*, write*: atomic, with barriers, little-endian Add a comment that says our implementation of ioread* and iowrite* only handles MMIO and does not support port IO. Reviewed by: hselasky MFC after:3 days Modified: head/sys/compat/linuxkpi/common/include/linux/io.h Modified: head/sys/compat/linuxkpi/common/include/linux/io.h == --- head/sys/compat/linuxkpi/common/include/linux/io.h Mon Oct 22 20:22:33 2018(r339617) +++ head/sys/compat/linuxkpi/common/include/linux/io.h Mon Oct 22 20:55:35 2018(r339618) @@ -38,153 +38,309 @@ #include #include +/* + * XXX This is all x86 specific. It should be bus space access. + */ + +/* Access MMIO registers atomically without barriers and byte swapping. */ + +static inline uint8_t +__raw_readb(const volatile void *addr) +{ + return (*(const volatile uint8_t *)addr); +} +#define__raw_readb(addr) __raw_readb(addr) + +static inline void +__raw_writeb(uint8_t v, volatile void *addr) +{ + *(volatile uint8_t *)addr = v; +} +#define__raw_writeb(v, addr) __raw_writeb(v, addr) + +static inline uint16_t +__raw_readw(const volatile void *addr) +{ + return (*(const volatile uint16_t *)addr); +} +#define__raw_readw(addr) __raw_readw(addr) + +static inline void +__raw_writew(uint16_t v, volatile void *addr) +{ + *(volatile uint16_t *)addr = v; +} +#define__raw_writew(v, addr) __raw_writew(v, addr) + static inline uint32_t __raw_readl(const volatile void *addr) { - return *(const volatile uint32_t *)addr; + return (*(const volatile uint32_t *)addr); } +#define__raw_readl(addr) __raw_readl(addr) static inline void -__raw_writel(uint32_t b, volatile void *addr) +__raw_writel(uint32_t v, volatile void *addr) { - *(volatile uint32_t *)addr = b; + *(volatile uint32_t *)addr = v; } +#define__raw_writel(v, addr) __raw_writel(v, addr) +#ifdef __LP64__ static inline uint64_t __raw_readq(const volatile void *addr) { - return *(const volatile uint64_t *)addr; + return (*(const volatile uint64_t *)addr); } +#define__raw_readq(addr) __raw_readq(addr) static inline void -__raw_writeq(uint64_t b, volatile void *addr) +__raw_writeq(uint64_t v, volatile void *addr) { - *(volatile uint64_t *)addr = b; + *(volatile uint64_t *)addr = v; } +#define__raw_writeq(v, addr) __raw_writeq(v, addr) +#endif -/* - * XXX This is all x86 specific. It should be bus space access. - */ #definemmiowb()barrier() -#undef writel +/* Access little-endian MMIO registers atomically with memory barriers. */ + +#undef readb +static inline uint8_t +readb(const volatile void *addr) +{ + uint8_t v; + + __compiler_membar(); + v = *(const volatile uint8_t *)addr; + __compiler_membar(); + return (v); +} +#definereadb(addr) readb(addr) + +#undef writeb static inline void -writel(uint32_t b, void *addr) +writeb(uint8_t v, volatile void *addr) { - *(volatile uint32_t *)addr = b; + __compiler_membar(); + *(volatile uint8_t *)addr = v; + __compiler_membar(); } +#definewriteb(v, addr) writeb(v, addr) -#undef writel_relaxed +#undef readw +static inline uint16_t +readw(const volatile void *addr) +{ + uint16_t v; + + __compiler_membar(); + v = *(const volatile uint16_t *)addr; + __compiler_membar(); + return (v); +} +#definereadw(addr) readw(addr) + +#undef writew static inline void -writel_relaxed(uint32_t b, void *addr) +writew(uint16_t v, volatile void *addr) { - *(volatile uint32_t *)addr = b; + __compiler_membar(); + *(volatile uint16_t *)
svn commit: r339619 - in head/sys: netinet sys
Author: jhb Date: Mon Oct 22 21:17:36 2018 New Revision: 339619 URL: https://svnweb.freebsd.org/changeset/base/339619 Log: A couple of style fixes in recent TCP changes. - Add a blank line before a block comment to match other block comments in the same function. - Sort the prototype for sbsndptr_adv and fix whitespace between return type and function name. Reviewed by: gallatin, bz Differential Revision:https://reviews.freebsd.org/D17474 Modified: head/sys/netinet/tcp_output.c head/sys/sys/sockbuf.h Modified: head/sys/netinet/tcp_output.c == --- head/sys/netinet/tcp_output.c Mon Oct 22 20:55:35 2018 (r339618) +++ head/sys/netinet/tcp_output.c Mon Oct 22 21:17:36 2018 (r339619) @@ -895,6 +895,7 @@ send: len = max_len; } } + /* * Prevent the last segment from being * fractional unless the send sockbuf can be Modified: head/sys/sys/sockbuf.h == --- head/sys/sys/sockbuf.h Mon Oct 22 20:55:35 2018(r339618) +++ head/sys/sys/sockbuf.h Mon Oct 22 21:17:36 2018(r339619) @@ -165,10 +165,9 @@ intsbreserve_locked(struct sockbuf *sb, u_long cc, st struct thread *td); struct mbuf * sbsndptr(struct sockbuf *sb, u_int off, u_int len, u_int *moff); +void sbsndptr_adv(struct sockbuf *sb, struct mbuf *mb, u_int len); struct mbuf * sbsndptr_noadv(struct sockbuf *sb, u_int off, u_int *moff); -void - sbsndptr_adv(struct sockbuf *sb, struct mbuf *mb, u_int len); struct mbuf * sbsndmbuf(struct sockbuf *sb, u_int off, u_int *moff); intsbwait(struct sockbuf *sb); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339620 - head/usr.bin/ktrdump
Author: jhb Date: Mon Oct 22 21:25:28 2018 New Revision: 339620 URL: https://svnweb.freebsd.org/changeset/base/339620 Log: Add a "live" mode to ktrdump. Support a "live" mode in ktrdump enabled via the -l flag. In this mode, ktrdump polls the kernel's trace buffer periodically (currently hardcoded as a 50 millisecond interval) and dumps any newly added entries. Fancier logic for the timeout (e.g. a command line option or some kind of backoff based on the time since the last entry) can be added later as the need arises. While here, fix some bugs from when this was Capsicum-ized: - Use caph_limit_stream() for the output stream so that isatty() works and the output can be line-buffered (especially useful for live mode). - Use caph_limit_stderr() to permit error messages to be displayed if an error occurs after cap_enter(). Reviewed by: kib, 0mp (manpage) MFC after:2 months Differential Revision:https://reviews.freebsd.org/D17315 Modified: head/usr.bin/ktrdump/ktrdump.8 head/usr.bin/ktrdump/ktrdump.c Modified: head/usr.bin/ktrdump/ktrdump.8 == --- head/usr.bin/ktrdump/ktrdump.8 Mon Oct 22 21:17:36 2018 (r339619) +++ head/usr.bin/ktrdump/ktrdump.8 Mon Oct 22 21:25:28 2018 (r339620) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2015 +.Dd October 22, 2018 .Dt KTRDUMP 8 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd print kernel ktr trace buffer .Sh SYNOPSIS .Nm -.Op Fl cfqrtH +.Op Fl cflqrtH .Op Fl i Ar ktrfile .Op Fl M Ar core .Op Fl N Ar system @@ -47,6 +47,9 @@ The following options are available: .Bl -tag -width ".Fl i Ar ktrfile" .It Fl c Print the CPU number that each entry was logged from. +.It Fl l +Poll the kernel ktr trace buffer periodically dumping any new events after +each poll. .It Fl f Print the file and line number that each entry was logged from. .It Fl q Modified: head/usr.bin/ktrdump/ktrdump.c == --- head/usr.bin/ktrdump/ktrdump.c Mon Oct 22 21:17:36 2018 (r339619) +++ head/usr.bin/ktrdump/ktrdump.c Mon Oct 22 21:25:28 2018 (r339620) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #defineSBUFLEN 128 #defineUSAGE \ - "usage: ktrdump [-cfqrtH] [-i ktrfile] [-M core] [-N system] [-o outfile]\n" + "usage: ktrdump [-cflqrtH] [-i ktrfile] [-M core] [-N system] [-o outfile]\n" static void usage(void); @@ -65,6 +65,7 @@ static struct nlist nl[] = { static int cflag; static int fflag; +static int lflag; static int Mflag; static int Nflag; static int qflag; @@ -111,7 +112,7 @@ main(int ac, char **av) * Parse commandline arguments. */ out = stdout; - while ((c = getopt(ac, av, "cfqrtHe:i:m:M:N:o:")) != -1) + while ((c = getopt(ac, av, "cflqrtHe:i:m:M:N:o:")) != -1) switch (c) { case 'c': cflag = 1; @@ -136,6 +137,9 @@ main(int ac, char **av) err(1, "unable to limit rights for %s", optarg); break; + case 'l': + lflag = 1; + break; case 'M': case 'm': if (strlcpy(corefile, optarg, sizeof(corefile)) @@ -169,9 +173,10 @@ main(int ac, char **av) if (ac != 0) usage(); - cap_rights_init(&rights, CAP_FSTAT, CAP_WRITE); - if (cap_rights_limit(fileno(out), &rights) < 0 && errno != ENOSYS) + if (caph_limit_stream(fileno(out), CAPH_WRITE) < 0) err(1, "unable to limit rights for %s", outfile); + if (caph_limit_stderr() < 0) + err(1, "unable to limit rights for stderr"); /* * Open our execfile and corefile, resolve needed symbols and read in @@ -258,15 +263,29 @@ main(int ac, char **av) fprintf(out, "\n"); } + tlast = -1; /* * Now tear through the trace buffer. +* +* In "live" mode, find the oldest entry (first non-NULL entry +* after index2) and walk forward. Otherwise, start with the +* most recent entry and walk backwards. */ if (!iflag) { - i = index - 1; - if (i < 0) - i = entries - 1; + if (lflag) { + i = index2 + 1 % entries; + while (buf[i].ktr_desc == NULL && i != index) { + i++; + if (i == entries) + i = 0; + } + } else { + i = index - 1; + if (i < 0) + i = entries - 1; +
svn commit: r339622 - in head/sys: compat/freebsd32 kern
Author: brooks Date: Mon Oct 22 21:50:43 2018 New Revision: 339622 URL: https://svnweb.freebsd.org/changeset/base/339622 Log: Remove __restrict qualifiers from syscalls.master. The restruct qualifier is intended to aid code generation in the compiler, but the only access to storage through these pointers is via structs using copyin/copyout and the like which can not be written in C or C++ and thus the compiler gains nothing from the qualifiers. As such, the qualifiers add no value in current usage. Reviewed by: kib Obtained from:CheriBSD Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D17574 Modified: head/sys/compat/freebsd32/syscalls.master head/sys/kern/syscalls.master Modified: head/sys/compat/freebsd32/syscalls.master == --- head/sys/compat/freebsd32/syscalls.master Mon Oct 22 21:26:37 2018 (r339621) +++ head/sys/compat/freebsd32/syscalls.master Mon Oct 22 21:50:43 2018 (r339622) @@ -1051,8 +1051,8 @@ 540AUE_CHFLAGSAT NOPROTO { int chflagsat(int fd, const char *path, \ u_long flags, int atflag); } 541AUE_ACCEPT NOPROTO { int accept4(int s, \ - struct sockaddr * __restrict name, \ - __socklen_t * __restrict anamelen, \ + struct sockaddr *name, \ + __socklen_t *anamelen, \ int flags); } 542AUE_PIPENOPROTO { int pipe2(int *fildes, int flags); } 543AUE_AIO_MLOCK STD { int freebsd32_aio_mlock( \ Modified: head/sys/kern/syscalls.master == --- head/sys/kern/syscalls.master Mon Oct 22 21:26:37 2018 (r339621) +++ head/sys/kern/syscalls.master Mon Oct 22 21:50:43 2018 (r339622) @@ -144,23 +144,23 @@ _Out_writes_bytes_(len) caddr_t buf, \ size_t len, int flags, \ _Out_writes_bytes_opt_(*fromlenaddr) \ - struct sockaddr * __restrict from, \ + struct sockaddr *from, \ _Inout_opt_ \ - __socklen_t * __restrict fromlenaddr); } + __socklen_t *fromlenaddr); } 30 AUE_ACCEPT STD { int accept(int s, \ _Out_writes_bytes_opt_(*anamelen) \ - struct sockaddr * __restrict name, \ + struct sockaddr *name, \ _Inout_opt_ \ - __socklen_t * __restrict anamelen); } + __socklen_t *anamelen); } 31 AUE_GETPEERNAME STD { int getpeername(int fdes, \ _Out_writes_bytes_(*alen) \ - struct sockaddr * __restrict asa, \ + struct sockaddr *asa, \ _Inout_opt_ \ - __socklen_t * __restrict alen); } + __socklen_t *alen); } 32 AUE_GETSOCKNAME STD { int getsockname(int fdes, \ _Out_writes_bytes_(*alen) \ - struct sockaddr * __restrict asa, \ - _Inout_ __socklen_t * __restrict alen); } + struct sockaddr *asa, \ + _Inout_ __socklen_t *alen); } 33 AUE_ACCESS STD { int access(_In_z_ char *path, int amode); } 34 AUE_CHFLAGS STD { int chflags(_In_z_ const char *path, \ u_long flags); } @@ -1273,9 +1273,9 @@ u_long flags, int atflag); } 541AUE_ACCEPT STD { int accept4(int s, \ _Out_writes_bytes_opt_(*anamelen) \ - struct sockaddr * __restrict name, \ + struct sockaddr *name, \ _Inout_opt_ \ - __socklen_t * __restrict anamelen, \ + __socklen_t *anamelen, \ int flags); } 542AUE_PIPESTD { int pipe2(_Out_writes_(2) int *fildes, \ int flags); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339623 - head/sys/sys
Author: brooks Date: Mon Oct 22 21:51:59 2018 New Revision: 339623 URL: https://svnweb.freebsd.org/changeset/base/339623 Log: Regen after r339622. Note: changes to freebsd32 syscalls.master impacted no generated files. Modified: head/sys/sys/sysproto.h Modified: head/sys/sys/sysproto.h == --- head/sys/sys/sysproto.h Mon Oct 22 21:50:43 2018(r339622) +++ head/sys/sys/sysproto.h Mon Oct 22 21:51:59 2018(r339623) @@ -135,23 +135,23 @@ struct recvfrom_args { char buf_l_[PADL_(caddr_t)]; caddr_t buf; char buf_r_[PADR_(caddr_t)]; char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; - char from_l_[PADL_(struct sockaddr *__restrict)]; struct sockaddr *__restrict from; char from_r_[PADR_(struct sockaddr *__restrict)]; - char fromlenaddr_l_[PADL_(__socklen_t *__restrict)]; __socklen_t *__restrict fromlenaddr; char fromlenaddr_r_[PADR_(__socklen_t *__restrict)]; + char from_l_[PADL_(struct sockaddr *)]; struct sockaddr * from; char from_r_[PADR_(struct sockaddr *)]; + char fromlenaddr_l_[PADL_(__socklen_t *)]; __socklen_t * fromlenaddr; char fromlenaddr_r_[PADR_(__socklen_t *)]; }; struct accept_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char name_l_[PADL_(struct sockaddr *__restrict)]; struct sockaddr *__restrict name; char name_r_[PADR_(struct sockaddr *__restrict)]; - char anamelen_l_[PADL_(__socklen_t *__restrict)]; __socklen_t *__restrict anamelen; char anamelen_r_[PADR_(__socklen_t *__restrict)]; + char name_l_[PADL_(struct sockaddr *)]; struct sockaddr * name; char name_r_[PADR_(struct sockaddr *)]; + char anamelen_l_[PADL_(__socklen_t *)]; __socklen_t * anamelen; char anamelen_r_[PADR_(__socklen_t *)]; }; struct getpeername_args { char fdes_l_[PADL_(int)]; int fdes; char fdes_r_[PADR_(int)]; - char asa_l_[PADL_(struct sockaddr *__restrict)]; struct sockaddr *__restrict asa; char asa_r_[PADR_(struct sockaddr *__restrict)]; - char alen_l_[PADL_(__socklen_t *__restrict)]; __socklen_t *__restrict alen; char alen_r_[PADR_(__socklen_t *__restrict)]; + char asa_l_[PADL_(struct sockaddr *)]; struct sockaddr * asa; char asa_r_[PADR_(struct sockaddr *)]; + char alen_l_[PADL_(__socklen_t *)]; __socklen_t * alen; char alen_r_[PADR_(__socklen_t *)]; }; struct getsockname_args { char fdes_l_[PADL_(int)]; int fdes; char fdes_r_[PADR_(int)]; - char asa_l_[PADL_(struct sockaddr *__restrict)]; struct sockaddr *__restrict asa; char asa_r_[PADR_(struct sockaddr *__restrict)]; - char alen_l_[PADL_(__socklen_t *__restrict)]; __socklen_t *__restrict alen; char alen_r_[PADR_(__socklen_t *__restrict)]; + char asa_l_[PADL_(struct sockaddr *)]; struct sockaddr * asa; char asa_r_[PADR_(struct sockaddr *)]; + char alen_l_[PADL_(__socklen_t *)]; __socklen_t * alen; char alen_r_[PADR_(__socklen_t *)]; }; struct access_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; @@ -1662,8 +1662,8 @@ struct chflagsat_args { }; struct accept4_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char name_l_[PADL_(struct sockaddr *__restrict)]; struct sockaddr *__restrict name; char name_r_[PADR_(struct sockaddr *__restrict)]; - char anamelen_l_[PADL_(__socklen_t *__restrict)]; __socklen_t *__restrict anamelen; char anamelen_r_[PADR_(__socklen_t *__restrict)]; + char name_l_[PADL_(struct sockaddr *)]; struct sockaddr * name; char name_r_[PADR_(struct sockaddr *)]; + char anamelen_l_[PADL_(__socklen_t *)]; __socklen_t * anamelen; char anamelen_r_[PADR_(__socklen_t *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; struct pipe2_args { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339624 - head/sys/kern
Author: brooks Date: Mon Oct 22 22:13:00 2018 New Revision: 339624 URL: https://svnweb.freebsd.org/changeset/base/339624 Log: Remove the need for backslashes in syscalls.master. Join non-special lines together until we hit a line containing a '}' character. This allows the function declaration body to be split across multiple lines without backslash continuation characters. Continue to join lines ending with backslashes to allow gradual migration and to support out-of-tree syscall vectors Reviewed by: emaste, kib Obtained from:CheriBSD Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D17488 Modified: head/sys/kern/makesyscalls.sh Modified: head/sys/kern/makesyscalls.sh == --- head/sys/kern/makesyscalls.sh Mon Oct 22 21:51:59 2018 (r339623) +++ head/sys/kern/makesyscalls.sh Mon Oct 22 22:13:00 2018 (r339624) @@ -68,13 +68,33 @@ if [ -n "$2" ]; then fi sed -e ' -:join + # FreeBSD ID, includes, comments, and blank lines + /.*\$FreeBSD/b done_joining + /^[#;]/b done_joining + /^$/b done_joining + + # Join lines ending in backslash +:joining /\\$/{a\ N s/\\\n// - b join + b joining } + + # OBSOL, etc lines without function signatures + /^[0-9][^{]*$/b done_joining + + # Join incomplete signatures. The { must appear on the first line + # and the } must appear on the last line (modulo lines joined by + # backslashes). + /^[^}]*$/{a\ + + N + s/\n// + b joining + } +:done_joining 2,${ /^#/!s/\([{}()*,]\)/ \1 /g } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339625 - in head/sys: arm/include arm64/include mips/include powerpc/include riscv/include sparc64/include sys x86/include
Author: brooks Date: Mon Oct 22 22:24:32 2018 New Revision: 339625 URL: https://svnweb.freebsd.org/changeset/base/339625 Log: Consolidate identical ELF auxargs type defintions. All platforms except powerpc use the same values and powerpc shares a majority of them. Go ahead and declare AT_NOTELF, AT_UID, and AT_EUID in favor of the unused AT_DCACHEBSIZE, AT_ICACHEBSIZE, and AT_UCACHEBSIZE for powerpc. Reviewed by: jhb, imp Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D17397 Modified: head/sys/arm/include/elf.h head/sys/arm64/include/elf.h head/sys/mips/include/elf.h head/sys/powerpc/include/elf.h head/sys/riscv/include/elf.h head/sys/sparc64/include/elf.h head/sys/sys/elf_common.h head/sys/x86/include/elf.h Modified: head/sys/arm/include/elf.h == --- head/sys/arm/include/elf.h Mon Oct 22 22:13:00 2018(r339624) +++ head/sys/arm/include/elf.h Mon Oct 22 22:24:32 2018(r339625) @@ -61,39 +61,7 @@ __ElfType(Auxinfo); * Relocation types. */ -/* Values for a_type. */ -#defineAT_NULL 0 /* Terminates the vector. */ -#defineAT_IGNORE 1 /* Ignored entry. */ -#defineAT_EXECFD 2 /* File descriptor of program to load. */ -#defineAT_PHDR 3 /* Program header of program already loaded. */ -#defineAT_PHENT4 /* Size of each program header entry. */ -#defineAT_PHNUM5 /* Number of program header entries. */ -#defineAT_PAGESZ 6 /* Page size in bytes. */ -#defineAT_BASE 7 /* Interpreter's base address. */ -#defineAT_FLAGS8 /* Flags (unused). */ -#defineAT_ENTRY9 /* Where interpreter should transfer control. */ -#defineAT_NOTELF 10 /* Program is not ELF ?? */ -#defineAT_UID 11 /* Real uid. */ -#defineAT_EUID 12 /* Effective uid. */ -#defineAT_GID 13 /* Real gid. */ -#defineAT_EGID 14 /* Effective gid. */ -#defineAT_EXECPATH 15 /* Path to the executable. */ -#defineAT_CANARY 16 /* Canary for SSP */ -#defineAT_CANARYLEN17 /* Length of the canary. */ -#defineAT_OSRELDATE18 /* OSRELDATE. */ -#defineAT_NCPUS19 /* Number of CPUs. */ -#defineAT_PAGESIZES20 /* Pagesizes. */ -#defineAT_PAGESIZESLEN 21 /* Number of pagesizes. */ -#defineAT_TIMEKEEP 22 /* Pointer to timehands. */ -#defineAT_STACKPROT23 /* Initial stack protection. */ -#defineAT_EHDRFLAGS24 /* e_flags field from elf hdr */ -#defineAT_HWCAP25 /* CPU feature flags. */ -#defineAT_HWCAP2 26 /* CPU feature flags 2. */ - -#defineAT_COUNT27 /* Count of defined aux entry types. */ - #defineR_ARM_COUNT 33 /* Count of defined relocation types. */ - /* Define "machine" characteristics */ #defineELF_TARG_CLASS ELFCLASS32 Modified: head/sys/arm64/include/elf.h == --- head/sys/arm64/include/elf.hMon Oct 22 22:13:00 2018 (r339624) +++ head/sys/arm64/include/elf.hMon Oct 22 22:24:32 2018 (r339625) @@ -68,37 +68,6 @@ __ElfType(Auxinfo); #defineELF_MACHINE_OK(x) ((x) == (ELF_ARCH)) -/* Values for a_type. */ -#defineAT_NULL 0 /* Terminates the vector. */ -#defineAT_IGNORE 1 /* Ignored entry. */ -#defineAT_EXECFD 2 /* File descriptor of program to load. */ -#defineAT_PHDR 3 /* Program header of program already loaded. */ -#defineAT_PHENT4 /* Size of each program header entry. */ -#defineAT_PHNUM5 /* Number of program header entries. */ -#defineAT_PAGESZ 6 /* Page size in bytes. */ -#defineAT_BASE 7 /* Interpreter's base address. */ -#defineAT_FLAGS8 /* Flags (unused). */ -#defineAT_ENTRY9 /* Where interpreter should transfer control. */ -#defineAT_NOTELF 10 /* Program is not ELF ?? */ -#defineAT_UID 11 /* Real uid. */ -#defineAT_EUID 12 /* Effective uid. */ -#defineAT_GID 13 /* Real gid. */ -#defineAT_EGID 14 /* Effective gid. */ -#defineAT_EXECPATH 15 /* Path to the executable. */ -#defineAT_CANARY 16 /* Canary for SSP */ -#defineAT_CANARYLEN17 /* Length of the canary. */ -#defineAT_OSRELDATE18 /* OSRELDATE. */ -#defineAT_NCPUS
Re: svn commit: r339617 - head/sys/contrib/zstd
On 10/22/18 1:22 PM, Conrad Meyer wrote: > Author: cem > Date: Mon Oct 22 20:22:33 2018 > New Revision: 339617 > URL: https://svnweb.freebsd.org/changeset/base/339617 > > Log: > Retroactively vendor 1.3.3, 1.3.4, and 1.3.7 imports > > "svn merge --record-only svn+ssh://repo.freebsd.org/base/vendor/zstd/dist" > > Reported by:jhb, markj > Sponsored by: Dell EMC Isilon Thanks! -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339626 - head/sys/dev/cxgbe
Author: np Date: Mon Oct 22 23:06:23 2018 New Revision: 339626 URL: https://svnweb.freebsd.org/changeset/base/339626 Log: cxgbe(4): Use automatic cidx updates with ofld and ctrl queues. The bits that explicitly request cidx updates do not work reliably with all possible WRs that can be sent over the queue. The F_FW_WR_EQUIQ requests that still remain may also have to be replaced with explicit credit flush WRs in the future. MFC after:2 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c == --- head/sys/dev/cxgbe/t4_sge.c Mon Oct 22 22:24:32 2018(r339625) +++ head/sys/dev/cxgbe/t4_sge.c Mon Oct 22 23:06:23 2018(r339626) @@ -2089,12 +2089,13 @@ drain_wrq_wr_list(struct adapter *sc, struct sge_wrq * if (available < eq->sidx / 4 && atomic_cmpset_int(&eq->equiq, 0, 1)) { + /* +* XXX: This is not 100% reliable with some +* types of WRs. But this is a very unusual +* situation for an ofld/ctrl queue anyway. +*/ dst->equiq_to_len16 |= htobe32(F_FW_WR_EQUIQ | F_FW_WR_EQUEQ); - eq->equeqidx = eq->pidx; - } else if (IDXDIFF(eq->pidx, eq->equeqidx, eq->sidx) >= 32) { - dst->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); - eq->equeqidx = eq->pidx; } dbdiff += n; @@ -2644,12 +2645,13 @@ commit_wrq_wr(struct sge_wrq *wrq, void *w, struct wrq available = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1; if (available < eq->sidx / 4 && atomic_cmpset_int(&eq->equiq, 0, 1)) { + /* +* XXX: This is not 100% reliable with some +* types of WRs. But this is a very unusual +* situation for an ofld/ctrl queue anyway. +*/ dst->equiq_to_len16 |= htobe32(F_FW_WR_EQUIQ | F_FW_WR_EQUEQ); - eq->equeqidx = pidx; - } else if (IDXDIFF(eq->pidx, eq->equeqidx, eq->sidx) >= 32) { - dst->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); - eq->equeqidx = pidx; } ring_eq_db(wrq->adapter, eq, ndesc); @@ -3584,6 +3586,23 @@ free_nm_txq(struct vi_info *vi, struct sge_nm_txq *nm_ } #endif +/* + * Returns a reasonable automatic cidx flush threshold for a given queue size. + */ +static u_int +qsize_to_fthresh(int qsize) +{ + u_int fthresh; + + while (!powerof2(qsize)) + qsize++; + fthresh = ilog2(qsize); + if (fthresh > X_CIDXFLUSHTHRESH_128) + fthresh = X_CIDXFLUSHTHRESH_128; + + return (fthresh); +} + static int ctrl_eq_alloc(struct adapter *sc, struct sge_eq *eq) { @@ -3607,7 +3626,7 @@ ctrl_eq_alloc(struct adapter *sc, struct sge_eq *eq) c.dcaen_to_eqsize = htobe32(V_FW_EQ_CTRL_CMD_FBMIN(X_FETCHBURSTMIN_64B) | V_FW_EQ_CTRL_CMD_FBMAX(X_FETCHBURSTMAX_512B) | - V_FW_EQ_CTRL_CMD_CIDXFTHRESH(X_CIDXFLUSHTHRESH_32) | + V_FW_EQ_CTRL_CMD_CIDXFTHRESH(qsize_to_fthresh(qsize)) | V_FW_EQ_CTRL_CMD_EQSIZE(qsize)); c.eqaddr = htobe64(eq->ba); @@ -3689,12 +3708,13 @@ ofld_eq_alloc(struct adapter *sc, struct vi_info *vi, c.alloc_to_len16 = htonl(F_FW_EQ_OFLD_CMD_ALLOC | F_FW_EQ_OFLD_CMD_EQSTART | FW_LEN16(c)); c.fetchszm_to_iqid = - htonl(V_FW_EQ_OFLD_CMD_HOSTFCMODE(X_HOSTFCMODE_NONE) | + htonl(V_FW_EQ_OFLD_CMD_HOSTFCMODE(X_HOSTFCMODE_STATUS_PAGE) | V_FW_EQ_OFLD_CMD_PCIECHN(eq->tx_chan) | F_FW_EQ_OFLD_CMD_FETCHRO | V_FW_EQ_OFLD_CMD_IQID(eq->iqid)); c.dcaen_to_eqsize = htobe32(V_FW_EQ_OFLD_CMD_FBMIN(X_FETCHBURSTMIN_64B) | V_FW_EQ_OFLD_CMD_FBMAX(X_FETCHBURSTMAX_512B) | + V_FW_EQ_OFLD_CMD_CIDXFTHRESH(qsize_to_fthresh(qsize)) | V_FW_EQ_OFLD_CMD_EQSIZE(qsize)); c.eqaddr = htobe64(eq->ba); @@ -3732,8 +3752,9 @@ alloc_eq(struct adapter *sc, struct vi_info *vi, struc if (rc) return (rc); - eq->pidx = eq->cidx = 0; - eq->equeqidx = eq->dbidx = 0; + eq->pidx = eq->cidx = eq->dbidx = 0; + /* Note that equeqidx is not used with sge_wrq (OFLD/CTRL) queues. */ + eq->equeqidx = 0; eq->doorbells = sc->doorbells;
svn commit: r339627 - head/sbin/pfctl/tests/files
Author: kp Date: Mon Oct 22 23:33:48 2018 New Revision: 339627 URL: https://svnweb.freebsd.org/changeset/base/339627 Log: pf tests: Fix incorrect test for PR 231323 Fix r339466. The test result file did not list the rdr rule. Additionally, the route-to rule needs a redirection address. X-MFC-with: 339466 Modified: head/sbin/pfctl/tests/files/pf1005.in head/sbin/pfctl/tests/files/pf1005.ok Modified: head/sbin/pfctl/tests/files/pf1005.in == --- head/sbin/pfctl/tests/files/pf1005.in Mon Oct 22 23:06:23 2018 (r339626) +++ head/sbin/pfctl/tests/files/pf1005.in Mon Oct 22 23:33:48 2018 (r339627) @@ -1,3 +1,3 @@ rdr on em0 proto tcp from any to any -> 1.1.1.1 port 2121 -pass out log quick on lo0 route-to lo0 from any to any -pass in log quick on lo0 route-to (lo0 localhost) from any to any +pass out log quick on lo0 route-to (lo0 localhost) inet from any to any +pass in log quick on lo0 route-to (lo0 localhost) inet6 from any to any Modified: head/sbin/pfctl/tests/files/pf1005.ok == --- head/sbin/pfctl/tests/files/pf1005.ok Mon Oct 22 23:06:23 2018 (r339626) +++ head/sbin/pfctl/tests/files/pf1005.ok Mon Oct 22 23:33:48 2018 (r339627) @@ -1,2 +1,3 @@ -pass out log quick on lo0 route-to (lo0 ?) all flags S/SA keep state +rdr on em0 inet proto tcp all -> 1.1.1.1 port 2121 +pass out log quick on lo0 route-to (lo0 127.0.0.1) inet all flags S/SA keep state pass in log quick on lo0 route-to (lo0 ::1) inet6 all flags S/SA keep state ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339626 - head/sys/dev/cxgbe
> Author: np > Date: Mon Oct 22 23:06:23 2018 > New Revision: 339626 > URL: https://svnweb.freebsd.org/changeset/base/339626 > > Log: > cxgbe(4): Use automatic cidx updates with ofld and ctrl queues. > > The bits that explicitly request cidx updates do not work reliably with > all possible WRs that can be sent over the queue. The F_FW_WR_EQUIQ > requests that still remain may also have to be replaced with explicit > credit flush WRs in the future. > > MFC after: 2 days Please note in your RFA to re@ your reasons for requesting early merge to a frozen stable branch. I see good reason for this to be approved as it would be good to get this in the next snapshot, but it usually would be rejected if there is not a reason given. (There is a normal 3 day minimum on MFC after to a frozen branch) Thanks, RodSponsored by: Chelsio Communications > > Modified: > head/sys/dev/cxgbe/t4_sge.c > > Modified: head/sys/dev/cxgbe/t4_sge.c > == > --- head/sys/dev/cxgbe/t4_sge.c Mon Oct 22 22:24:32 2018 > (r339625) > +++ head/sys/dev/cxgbe/t4_sge.c Mon Oct 22 23:06:23 2018 > (r339626) > @@ -2089,12 +2089,13 @@ drain_wrq_wr_list(struct adapter *sc, struct sge_wrq * > > if (available < eq->sidx / 4 && > atomic_cmpset_int(&eq->equiq, 0, 1)) { > + /* > + * XXX: This is not 100% reliable with some > + * types of WRs. But this is a very unusual > + * situation for an ofld/ctrl queue anyway. > + */ > dst->equiq_to_len16 |= htobe32(F_FW_WR_EQUIQ | > F_FW_WR_EQUEQ); > - eq->equeqidx = eq->pidx; > - } else if (IDXDIFF(eq->pidx, eq->equeqidx, eq->sidx) >= 32) { > - dst->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); > - eq->equeqidx = eq->pidx; > } > > dbdiff += n; > @@ -2644,12 +2645,13 @@ commit_wrq_wr(struct sge_wrq *wrq, void *w, struct wrq > available = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1; > if (available < eq->sidx / 4 && > atomic_cmpset_int(&eq->equiq, 0, 1)) { > + /* > + * XXX: This is not 100% reliable with some > + * types of WRs. But this is a very unusual > + * situation for an ofld/ctrl queue anyway. > + */ > dst->equiq_to_len16 |= htobe32(F_FW_WR_EQUIQ | > F_FW_WR_EQUEQ); > - eq->equeqidx = pidx; > - } else if (IDXDIFF(eq->pidx, eq->equeqidx, eq->sidx) >= > 32) { > - dst->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); > - eq->equeqidx = pidx; > } > > ring_eq_db(wrq->adapter, eq, ndesc); > @@ -3584,6 +3586,23 @@ free_nm_txq(struct vi_info *vi, struct sge_nm_txq *nm_ > } > #endif > > +/* > + * Returns a reasonable automatic cidx flush threshold for a given queue > size. > + */ > +static u_int > +qsize_to_fthresh(int qsize) > +{ > + u_int fthresh; > + > + while (!powerof2(qsize)) > + qsize++; > + fthresh = ilog2(qsize); > + if (fthresh > X_CIDXFLUSHTHRESH_128) > + fthresh = X_CIDXFLUSHTHRESH_128; > + > + return (fthresh); > +} > + > static int > ctrl_eq_alloc(struct adapter *sc, struct sge_eq *eq) > { > @@ -3607,7 +3626,7 @@ ctrl_eq_alloc(struct adapter *sc, struct sge_eq *eq) > c.dcaen_to_eqsize = > htobe32(V_FW_EQ_CTRL_CMD_FBMIN(X_FETCHBURSTMIN_64B) | > V_FW_EQ_CTRL_CMD_FBMAX(X_FETCHBURSTMAX_512B) | > - V_FW_EQ_CTRL_CMD_CIDXFTHRESH(X_CIDXFLUSHTHRESH_32) | > + V_FW_EQ_CTRL_CMD_CIDXFTHRESH(qsize_to_fthresh(qsize)) | > V_FW_EQ_CTRL_CMD_EQSIZE(qsize)); > c.eqaddr = htobe64(eq->ba); > > @@ -3689,12 +3708,13 @@ ofld_eq_alloc(struct adapter *sc, struct vi_info *vi, > c.alloc_to_len16 = htonl(F_FW_EQ_OFLD_CMD_ALLOC | > F_FW_EQ_OFLD_CMD_EQSTART | FW_LEN16(c)); > c.fetchszm_to_iqid = > - htonl(V_FW_EQ_OFLD_CMD_HOSTFCMODE(X_HOSTFCMODE_NONE) | > + htonl(V_FW_EQ_OFLD_CMD_HOSTFCMODE(X_HOSTFCMODE_STATUS_PAGE) | > V_FW_EQ_OFLD_CMD_PCIECHN(eq->tx_chan) | > F_FW_EQ_OFLD_CMD_FETCHRO | V_FW_EQ_OFLD_CMD_IQID(eq->iqid)); > c.dcaen_to_eqsize = > htobe32(V_FW_EQ_OFLD_CMD_FBMIN(X_FETCHBURSTMIN_64B) | > V_FW_EQ_OFLD_CMD_FBMAX(X_FETCHBURSTMAX_512B) | > + V_FW_EQ_OFLD_CMD_CIDXFTHRESH(qsize_to_fthresh(qsize)) | >
svn commit: r339628 - head/sys/dev/cxgbe
Author: np Date: Mon Oct 22 23:57:59 2018 New Revision: 339628 URL: https://svnweb.freebsd.org/changeset/base/339628 Log: cxgbe(4): improve the accuracy of various TSO limits reported to the kernel. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/adapter.h == --- head/sys/dev/cxgbe/adapter.hMon Oct 22 23:33:48 2018 (r339627) +++ head/sys/dev/cxgbe/adapter.hMon Oct 22 23:57:59 2018 (r339628) @@ -113,6 +113,7 @@ enum { SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */ TX_SGL_SEGS = 39, TX_SGL_SEGS_TSO = 38, + TX_SGL_SEGS_EO_TSO = 30,/* XXX: lower for IPv6. */ TX_WR_FLITS = SGE_MAX_WR_LEN / 8 }; Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cMon Oct 22 23:33:48 2018 (r339627) +++ head/sys/dev/cxgbe/t4_main.cMon Oct 22 23:57:59 2018 (r339628) @@ -63,6 +63,8 @@ __FBSDID("$FreeBSD$"); #ifdef RSS #include #endif +#include +#include #if defined(__i386__) || defined(__amd64__) #include #include @@ -1535,9 +1537,13 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | CSUM_UDP_IPV6 | CSUM_TCP_IPV6; - ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); - ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS; - ifp->if_hw_tsomaxsegsize = 65536; + ifp->if_hw_tsomax = IP_MAXPACKET; + ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_TSO; +#ifdef RATELIMIT + if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) + ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_EO_TSO; +#endif + ifp->if_hw_tsomaxsegsize = 0; ether_ifattach(ifp, vi->hw_addr); #ifdef DEV_NETMAP ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339554 - head/sys/net
On 21 Oct 2018, at 11:24, Andrey V. Elsukov wrote: Author: ae Date: Sun Oct 21 18:24:20 2018 New Revision: 339554 URL: https://svnweb.freebsd.org/changeset/base/339554 Log: Rework if_ipsec(4) to use epoch(9) instead of rmlock. * use CK_LIST and FNV hash to keep chains of softc; * read access to softc is protected by epoch(); * write access is protected by ipsec_ioctl_sx. Changing of softc fields is allowed only when softc is unlinked from CK_LIST chains. * linking/unlinking of softc is allowed only when ipsec_ioctl_sx is exclusive locked. * the plain LIST of all softc is replaced by hash table that uses ingress address of tunnels as a key. * added support for appearing/disappearing of ingress address handling. Now it is allowed configure non-local ingress IP address, and thus the problem with if_ipsec(4) configuration that happens on boot, when ingress address is not yet configured, is solved. MFC after:1 month Sponsored by: Yandex LLC Differential Revision:https://reviews.freebsd.org/D17190 This panics during the pf tests. To reproduce: pkg install scapy kldload pf cd /usr/tests/sys/netpfil kyua test Fatal trap 9: general protection fault while in kernel mode cpuid = 3; apic id = 03 instruction pointer = 0x20:0x80ca7260 stack pointer = 0x28:0xfe00954c4650 frame pointer = 0x28:0xfe00954c4660 code segment= base 0x0, limit 0xf, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags= interrupt enabled, resume, IOPL = 0 current process = 3204 (jail) [ thread pid 3204 tid 101409 ] Stopped at ipsec_srcaddr+0x40: cmpl$0,ll+0xb(%rbx) db> bt Tracing pid 3204 tid 101409 td 0xf80084239580 ipsec_srcaddr() at ipsec_srcaddr+0x40/frame 0xfe00954c4660 srcaddr_change_event() at srcaddr_change_event+0x14d/frame 0xfe00954c46c0 in_difaddr_ioctl() at in_difaddr_ioctl+0x41f/frame 0xfe00954c4720 in_ifscrub_all() at in_ifscrub_all+0x13d/frame 0xfe00954c47a0 ip_destroy() at ip_destroy+0xbd/frame 0xfe00954c47c0 vnet_destroy() at vnet_destroy+0x124/frame 0xfe00954c47f0 prison_deref() at prison_deref+0x29d/frame 0xfe00954c4830 sys_jail_remove() at sys_jail_remove+0x28a/frame 0xfe00954c4880 amd64_syscall() at amd64_syscall+0x278/frame 0xfe00954c49b0 fast_syscall_common() at fast_syscall_common+0x101/frame 0xfe00954c49b0 --- syscall (508, FreeBSD ELF64, sys_jail_remove), rip = 0x8003131ba, rsp = 0x7fffe828, rbp = 0x7fffe8b0 --- At that point %rbx is 0xdeadc0dedeadc0de, so presumably we’re trying to dereference something that’s been freed already. kgdb agrees. The softc has been freed: #0 __curthread () at ./machine/pcpu.h:230 #1 doadump (textdump=0) at /usr/src/sys/kern/kern_shutdown.c:366 #2 0x804645db in db_dump (dummy=, dummy2=, dummy3=, dummy4=) at /usr/src/sys/ddb/db_command.c:574 #3 0x804643a9 in db_command (last_cmdp=, cmd_table=, dopager=) at /usr/src/sys/ddb/db_command.c:481 #4 0x80464124 in db_command_loop () at /usr/src/sys/ddb/db_command.c:534 #5 0x8046733f in db_trap (type=, code=) at /usr/src/sys/ddb/db_main.c:252 #6 0x80be5987 in kdb_trap (type=9, code=0, tf=0xfe00954c4590) at /usr/src/sys/kern/subr_kdb.c:693 #7 0x81072f51 in trap_fatal (frame=0xfe00954c4590, eva=0) at /usr/src/sys/amd64/amd64/trap.c:921 #8 0x8107244d in trap (frame=0xfe00954c4590) at /usr/src/sys/amd64/amd64/trap.c:217 #9 #10 ipsec_srcaddr (arg=, sa=0xf80023591298, event=) at /usr/src/sys/net/if_ipsec.c:784 #11 0x80d2de7d in srcaddr_change_event (arg=, ifp=0xf80057864800, ifa=0xf80023591200, event=1) at /usr/src/sys/netinet/ip_encap.c:181 #12 0x80d1ec4f in in_difaddr_ioctl (cmd=2149607705, data=, ifp=0xf80057864800, td=) at /usr/src/sys/netinet/in.c:651 #13 0x80d1f4cd in in_control (cmd=2149607705, ifp=out>, td=0x81b98600 , so=out>, data=) at /usr/src/sys/netinet/in.c:250 #14 in_ifscrub_all () at /usr/src/sys/netinet/in.c:935 #15 0x80d32dfd in ip_destroy (unused=) at /usr/src/sys/netinet/ip_input.c:398 #16 0x80ccd734 in vnet_sysuninit () at /usr/src/sys/net/vnet.c:597 #17 vnet_destroy (vnet=0xf80005d9c0c0) at /usr/src/sys/net/vnet.c:284 #18 0x80b64c0d in prison_deref (pr=0x81b0cc30 , flags=23) at /usr/src/sys/kern/kern_jail.c:2634 #19 0x80b6620a in sys_jail_remove (td=, uap=) at /usr/src/sys/kern/kern_jail.c:2257 #20 0x81073b28 in syscallenter (td=0xf80084239580) at /usr/src/sys/amd64/amd64/../../kern/subr_syscall.c:135 #21 amd64_syscall (td=0xf80084239580, traced=0)
svn commit: r339632 - head/sys/dev/dpaa
Author: jhibbits Date: Tue Oct 23 01:56:52 2018 New Revision: 339632 URL: https://svnweb.freebsd.org/changeset/base/339632 Log: dpaa: Mark BMan and QMan as earlier driver modules The BMan softc must exist when dtsec devices are created, else a NULL pointer is dereferenced. QMan likely as well. Until now, we have relied on order within the fdt parsing to attach correctly, but this obviously is not foolproof. Mark these as BUS_PASS_SUPPORTDEV so they're probed and attached explicitly before dtsec devices. Modified: head/sys/dev/dpaa/bman_fdt.c head/sys/dev/dpaa/qman_fdt.c Modified: head/sys/dev/dpaa/bman_fdt.c == --- head/sys/dev/dpaa/bman_fdt.cTue Oct 23 01:42:43 2018 (r339631) +++ head/sys/dev/dpaa/bman_fdt.cTue Oct 23 01:56:52 2018 (r339632) @@ -68,7 +68,8 @@ static driver_t bman_driver = { }; static devclass_t bman_devclass; -DRIVER_MODULE(bman, simplebus, bman_driver, bman_devclass, 0, 0); +EARLY_DRIVER_MODULE(bman, simplebus, bman_driver, bman_devclass, 0, 0, +BUS_PASS_SUPPORTDEV); static int bman_fdt_probe(device_t dev) Modified: head/sys/dev/dpaa/qman_fdt.c == --- head/sys/dev/dpaa/qman_fdt.cTue Oct 23 01:42:43 2018 (r339631) +++ head/sys/dev/dpaa/qman_fdt.cTue Oct 23 01:56:52 2018 (r339632) @@ -68,7 +68,8 @@ static driver_t qman_driver = { }; static devclass_t qman_devclass; -DRIVER_MODULE(qman, simplebus, qman_driver, qman_devclass, 0, 0); +EARLY_DRIVER_MODULE(qman, simplebus, qman_driver, qman_devclass, 0, 0, +BUS_PASS_SUPPORTDEV); static int qman_fdt_probe(device_t dev) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339554 - head/sys/net
On 22 Oct 2018, at 17:51, Kristof Provost wrote: On 21 Oct 2018, at 11:24, Andrey V. Elsukov wrote: Author: ae Date: Sun Oct 21 18:24:20 2018 New Revision: 339554 URL: https://svnweb.freebsd.org/changeset/base/339554 Log: Rework if_ipsec(4) to use epoch(9) instead of rmlock. * use CK_LIST and FNV hash to keep chains of softc; * read access to softc is protected by epoch(); * write access is protected by ipsec_ioctl_sx. Changing of softc fields is allowed only when softc is unlinked from CK_LIST chains. * linking/unlinking of softc is allowed only when ipsec_ioctl_sx is exclusive locked. * the plain LIST of all softc is replaced by hash table that uses ingress address of tunnels as a key. * added support for appearing/disappearing of ingress address handling. Now it is allowed configure non-local ingress IP address, and thus the problem with if_ipsec(4) configuration that happens on boot, when ingress address is not yet configured, is solved. MFC after:1 month Sponsored by: Yandex LLC Differential Revision:https://reviews.freebsd.org/D17190 This panics during the pf tests. I think I understand what’s happening here. With this patch I see a different panic: diff --git a/sys/net/if_ipsec.c b/sys/net/if_ipsec.c index 91b11a455b3..146cb59 100644 --- a/sys/net/if_ipsec.c +++ b/sys/net/if_ipsec.c @@ -134,6 +134,9 @@ ipsec_srchash(const struct sockaddr *sa) { uint32_t hval; + KASSERT(V_ipsec4_srchtbl, ("NULL")); + KASSERT(V_ipsec6_srchtbl, ("NULL (v6)")); + switch (sa->sa_family) { #ifdef INET case AF_INET: @@ -265,17 +274,22 @@ static void vnet_ipsec_uninit(const void *unused __unused) { if_clone_detach(V_ipsec_cloner); free(V_ipsec_idhtbl, M_IPSEC); #ifdef INET if (IS_DEFAULT_VNET(curvnet)) ip_encap_unregister_srcaddr(ipsec4_srctab); free(V_ipsec4_srchtbl, M_IPSEC); + V_ipsec4_srchtbl = NULL; + #endif #ifdef INET6 if (IS_DEFAULT_VNET(curvnet)) ip6_encap_unregister_srcaddr(ipsec6_srctab); free(V_ipsec6_srchtbl, M_IPSEC); + V_ipsec4_srchtbl = NULL; #endif } VNET_SYSUNINIT(vnet_ipsec_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, That trips the KASSERT() in ipsec_srchash(). Basically, the problem is that the V_ipsec4_srchtbl table gets freed in vnet_ipsec_uninit(), and later we get a srcaddr_change_event(), which tries to iterate the list (in ipsec_srcaddr()). Obviously iterating a freed list doesn’t go well for us (hence the 0xdeadc0dedeadc0de softc). That also explains why this happens during the pf tests, even though they don’t actually use IPSec. I’m not quite sure how to best fix this though. I suppose we could set V_ipsec4_srchtbl to NULL (well, copy the pointer first, set it to NULL and then free it so we don’t add a race condition) and then check for NULL in ipsec_srcaddr(). It feels like the srcaddr_change_event needs to be per-vnet, so we can unregister before we free V_ipsec4_srchtbl. Best regards, Kristof ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r339523 - in head/sys: conf dev/amdgpio modules modules/amdgpio
On 10/21/18 1:12 PM, Oleksandr Tymoshenko wrote: > Nathan Whitehorn (nwhiteh...@freebsd.org) wrote: >> >> On 10/20/18 9:52 PM, Oleksandr Tymoshenko wrote: >>> Author: gonzo >>> Date: Sun Oct 21 04:52:37 2018 >>> New Revision: 339523 >>> URL: https://svnweb.freebsd.org/changeset/base/339523 >>> >>> Log: >>> Add amdgpio, driver for GPIO controller on AMD-based x86_64 platforms >>> >>> Submitted by: Rajesh Kumar >>> Differential Revision:https://reviews.freebsd.org/D16865 >>> >> [...] >>> Modified: head/sys/modules/Makefile >>> == >>> --- head/sys/modules/Makefile Sun Oct 21 02:39:13 2018 >>> (r339522) >>> +++ head/sys/modules/Makefile Sun Oct 21 04:52:37 2018 >>> (r339523) >>> @@ -34,6 +34,7 @@ SUBDIR= \ >>> ale \ >>> alq \ >>> ${_amd_ecc_inject} \ >>> + ${_amdgpio} \ >>> ${_amdsbwd} \ >>> ${_amdsmn} \ >>> ${_amdtemp} \ >>> @@ -717,6 +718,7 @@ _x86bios= x86bios >>> .endif >>> >>> .if ${MACHINE_CPUARCH} == "amd64" >>> +_amdgpio= amdgpio >>> _ccp= ccp >>> _efirt=efirt >>> _iavf= iavf >>> >> Does this not work on 64-bit AMD processors running i386 kernels? > I see no reason why it wouldn't. Probably just haven't been tested. > It might be nice if we just added it to all architectures where it conceivably applies. Essentially all of our code is more portable than the platforms on which it is tested, so there doesn't seem to be a good reason to limit such things. -Nathan ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339634 - in head/sys: kern net
Author: erj Date: Tue Oct 23 04:37:29 2018 New Revision: 339634 URL: https://svnweb.freebsd.org/changeset/base/339634 Log: iflib: drain enqueued tasks before detaching from taskqgroup The taskqgroup_detach function does not check if task is already enqueued when detaching it. This may lead to kernel panic if enqueued task starts after context state lock is destroyed. Ensure that the already enqueued admin tasks are executed before detaching them. The issue was discovered during validation of D16429. Unloading of if_ixlv followed by immediate removal of VFs with iovctl -D may lead to panic on NODEBUG kernel. As well, check if iflib is in detach before enqueueing new admin or iov tasks, to prevent new tasks from executing while the taskqgroup tasks are being drained. Submitted by: Krzysztof Galazka Reviewed by: shurd@, erj@ Sponsored by: Intel Corporation Differential Revision:https://reviews.freebsd.org/D17404 Modified: head/sys/kern/subr_gtaskqueue.c head/sys/net/iflib.c Modified: head/sys/kern/subr_gtaskqueue.c == --- head/sys/kern/subr_gtaskqueue.c Tue Oct 23 03:30:14 2018 (r339633) +++ head/sys/kern/subr_gtaskqueue.c Tue Oct 23 04:37:29 2018 (r339634) @@ -812,6 +812,7 @@ taskqgroup_detach(struct taskqgroup *qgroup, struct gr qgroup->tqg_queue[i].tgc_cnt--; LIST_REMOVE(gtask, gt_list); mtx_unlock(&qgroup->tqg_lock); + gtaskqueue_drain(gtask->gt_taskqueue, >ask->gt_task); gtask->gt_taskqueue = NULL; } Modified: head/sys/net/iflib.c == --- head/sys/net/iflib.cTue Oct 23 03:30:14 2018(r339633) +++ head/sys/net/iflib.cTue Oct 23 04:37:29 2018(r339634) @@ -2279,8 +2279,8 @@ iflib_timer(void *arg) 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); STATE_UNLOCK(ctx); + iflib_admin_intr_deferred(ctx); } static void @@ -2802,8 +2802,8 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) err: STATE_LOCK(ctx); ctx->ifc_flags |= IFC_DO_RESET; - iflib_admin_intr_deferred(ctx); STATE_UNLOCK(ctx); + iflib_admin_intr_deferred(ctx); return (false); } @@ -5973,7 +5973,10 @@ iflib_admin_intr_deferred(if_ctx_t ctx) { #ifdef INVARIANTS struct grouptask *gtask; - +#endif + if (iflib_in_detach(ctx)) + return; +#ifdef INVARIANTS gtask = &ctx->ifc_admin_task; MPASS(gtask != NULL && gtask->gt_taskqueue != NULL); #endif @@ -5984,6 +5987,8 @@ iflib_admin_intr_deferred(if_ctx_t ctx) void iflib_iov_intr_deferred(if_ctx_t ctx) { + if (iflib_in_detach(ctx)) + return; GROUPTASK_ENQUEUE(&ctx->ifc_vflr_task); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339635 - head/lib/libsysdecode
Author: arichardson Date: Tue Oct 23 06:31:19 2018 New Revision: 339635 URL: https://svnweb.freebsd.org/changeset/base/339635 Log: Fix regex for extracting SHM_* values for libsysdecode There was an additional + after the {6} which is apparently ignored by the FreeBSD regex implementation but was giving me an error when compiling on MacOS. While changing this also make sure that tables.h is not created if mktables fails. The current rule would create a partial tables.h which causes following incremental builds to use that broken file and fail with an unrelated compilation error or even succeed even though they shouldn't. Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D17069 Modified: head/lib/libsysdecode/Makefile head/lib/libsysdecode/mktables Modified: head/lib/libsysdecode/Makefile == --- head/lib/libsysdecode/Makefile Tue Oct 23 04:37:29 2018 (r339634) +++ head/lib/libsysdecode/Makefile Tue Oct 23 06:31:19 2018 (r339635) @@ -107,7 +107,7 @@ MLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \ sysdecode_mask.3 sysdecode_wait4_options.3 \ sysdecode_mask.3 sysdecode_wait6_options.3 -CLEANFILES= ioctl.c tables.h +CLEANFILES= ioctl.c ioctl.c.tmp tables.h tables.h.tmp .if defined(COMPAT_32BIT) CPP+= -m32 @@ -124,7 +124,8 @@ CFLAGS.gcc+=${CFLAGS.gcc.${.IMPSRC}} DEPENDOBJS+= tables.h tables.h: mktables - sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET} + sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET}.tmp && \ + mv -f ${.TARGET}.tmp ${.TARGET} # mkioctls runs find(1) for headers so needs to rebuild every time. This used # to be a hack only done in buildworld. Modified: head/lib/libsysdecode/mktables == --- head/lib/libsysdecode/mktables Tue Oct 23 04:37:29 2018 (r339634) +++ head/lib/libsysdecode/mktables Tue Oct 23 06:31:19 2018 (r339635) @@ -123,7 +123,7 @@ gen_table "rlimit" "RLIMIT_[A-Z]+[[:space:]]+ gen_table "rusage" "RUSAGE_[A-Z]+[[:space:]]+[-0-9]+" "sys/resource.h" gen_table "schedpolicy" "SCHED_[A-Z]+[[:space:]]+[0-9]+" "sched.h" gen_table "sendfileflags" "SF_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" -gen_table "shmatflags" "SHM_[A-Z]+[[:space:]]+[0-9]{6}+" "sys/shm.h" +gen_table "shmatflags" "SHM_[A-Z]+[[:space:]]+[0-9]{6}" "sys/shm.h" gen_table "shutdownhow" "SHUT_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" gen_table "sigbuscode" "BUS_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" gen_table "sigchldcode" "CLD_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339637 - head/lib/ncurses/ncurses
Author: arichardson Date: Tue Oct 23 06:31:31 2018 New Revision: 339637 URL: https://svnweb.freebsd.org/changeset/base/339637 Log: Fix ncurses fallback.c build with a strict build shell The script uses shift three times and when building with a strict /bin/sh shifting without any arguments will cause the script to fail. In this case the target will fail and we write an empty output file. When doing a NO_CLEAN build after this will mean fallback.c is up to date and clang will happily compile the empty input file which leads to strange build errors later. Fixed by passing three empty arguments to MkFallback.sh and only creating fallback.c if MKfallback.sh succeeds. Aproved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D16867 Modified: head/lib/ncurses/ncurses/Makefile Modified: head/lib/ncurses/ncurses/Makefile == --- head/lib/ncurses/ncurses/Makefile Tue Oct 23 06:31:25 2018 (r339636) +++ head/lib/ncurses/ncurses/Makefile Tue Oct 23 06:31:31 2018 (r339637) @@ -350,7 +350,8 @@ expanded.c: MKexpanded.sh sh ${NCURSES_DIR}/ncurses/tty/MKexpanded.sh "${CC:N${CCACHE_BIN}} -E" ${CFLAGS} >expanded.c fallback.c: MKfallback.sh - sh ${NCURSES_DIR}/ncurses/tinfo/MKfallback.sh > fallback.c + sh -e ${NCURSES_DIR}/ncurses/tinfo/MKfallback.sh "" "" "" > ${.TARGET}.tmp && \ + mv -f ${.TARGET}.tmp ${.TARGET} # Generated headers nomacros.h: MKlib_gen.sh curses.h ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r339636 - in head: . share/mk
Author: arichardson Date: Tue Oct 23 06:31:25 2018 New Revision: 339636 URL: https://svnweb.freebsd.org/changeset/base/339636 Log: Only compute the X_COMPILER_*/X_LINKER_* variables when needed When building CheriBSD we have to set XLD/XCC/XCFLAGS on the command line. This triggers the $XCC != $CC case in bsd.compiler.mk (and the same for LD in bsd.linker.mk) which causes it to call ${XCC} --version and ${XLD} --version (plus various awk+sed+echo calls) in every subdirectory. For incremental builds and stages that only walk the source tree this is often the majority of the time spent in that directory. By only computing the value of the X_COMPILER_*/X_LINKER_* variables if _WANT_TOOLCHAIN_CROSS_VARS is set we can reduce the number of cc/ld calls to once per build stage instead of once per recursive make. With this change (and no changes to the sources) the `make includes` stage now takes 28 seconds at -j1 instead of 86 seconds. Approved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D17046 Modified: head/Makefile.inc1 head/share/mk/bsd.compiler.mk head/share/mk/bsd.linker.mk Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Oct 23 06:31:19 2018(r339635) +++ head/Makefile.inc1 Tue Oct 23 06:31:25 2018(r339636) @@ -103,8 +103,11 @@ MK_GCC_BOOTSTRAP= no # here since we will always have the right make, unlike in src/Makefile # Don't include bsd.linker.mk yet until XBINUTILS is handled (after src.opts.mk) _NO_INCLUDE_LINKERMK= t +# We also want the X_COMPILER* variables if we are using an external toolchain. +_WANT_TOOLCHAIN_CROSS_VARS=t .include "share/mk/bsd.compiler.mk" .undef _NO_INCLUDE_LINKERMK +.undef _WANT_TOOLCHAIN_CROSS_VARS # src.opts.mk depends on COMPILER_FEATURES .include "share/mk/src.opts.mk" @@ -205,7 +208,10 @@ X${BINUTIL}?= ${${BINUTIL}} MK_LLD_BOOTSTRAP= no .endif +# We also want the X_LINKER* variables if we are using an external toolchain. +_WANT_TOOLCHAIN_CROSS_VARS=t .include "share/mk/bsd.linker.mk" +.undef _WANT_TOOLCHAIN_CROSS_VARS # Begin WITH_SYSTEM_COMPILER / WITH_SYSTEM_LD Modified: head/share/mk/bsd.compiler.mk == --- head/share/mk/bsd.compiler.mk Tue Oct 23 06:31:19 2018 (r339635) +++ head/share/mk/bsd.compiler.mk Tue Oct 23 06:31:25 2018 (r339636) @@ -116,7 +116,16 @@ ccache-print-options: .PHONY .endif # exists(${CCACHE_BIN}) .endif # ${MK_CCACHE_BUILD} == "yes" -.for cc X_ in CC $${_empty_var_} XCC X_ +_cc_vars=CC $${_empty_var_} +.if !empty(_WANT_TOOLCHAIN_CROSS_VARS) +# Only the toplevel makefile needs to compute the X_COMPILER_* variables. +# Skipping the computation of the unused X_COMPILER_* in the subdirectory +# makefiles can save a noticeable amount of time when walking the whole source +# tree (e.g. during make includes, etc.). +_cc_vars+=XCC X_ +.endif + +.for cc X_ in ${_cc_vars} .if ${cc} == "CC" || !empty(XCC) # Try to import COMPILER_TYPE and COMPILER_VERSION from parent make. # The value is only used/exported for the same environment that impacts Modified: head/share/mk/bsd.linker.mk == --- head/share/mk/bsd.linker.mk Tue Oct 23 06:31:19 2018(r339635) +++ head/share/mk/bsd.linker.mk Tue Oct 23 06:31:25 2018(r339636) @@ -26,7 +26,13 @@ .if !target() : -.for ld X_ in LD $${_empty_var_} XLD X_ +_ld_vars=LD $${_empty_var_} +.if !empty(_WANT_TOOLCHAIN_CROSS_VARS) +# Only the toplevel makefile needs to compute the X_LINKER_* variables. +_ld_vars+=XLD X_ +.endif + +.for ld X_ in ${_ld_vars} .if ${ld} == "LD" || !empty(XLD) # Try to import LINKER_TYPE and LINKER_VERSION from parent make. # The value is only used/exported for the same environment that impacts ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"