Re: svn commit: r359459 - head/share/man/man5
On Mon, Mar 30, 2020 at 07:39:39PM -0400, Ed Maste wrote: > On Mon, 30 Mar 2020 at 19:03, John Baldwin wrote: > > > > and I haven't seen the commit to > > actually remove GDB_LIBEXEC yet? > > I haven't seen the commit mail for r359457 yet either, but the change > is committed. As of recently, commit mail gets significantly delayed for some reason, per what I've also observed. ./danfe ___ 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: r359479 - in head: share/man/man4 sys/dev/intel sys/modules sys/modules/pchtherm
Author: takawata Date: Tue Mar 31 06:25:43 2020 New Revision: 359479 URL: https://svnweb.freebsd.org/changeset/base/359479 Log: Add Platform Controller Hub built-in thermal management device driver. Differential Revision:https://reviews.freebsd.org/D24077 Added: head/share/man/man4/pchtherm.4 (contents, props changed) head/sys/dev/intel/pchtherm.c (contents, props changed) head/sys/modules/pchtherm/ head/sys/modules/pchtherm/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/modules/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileTue Mar 31 02:36:39 2020 (r359478) +++ head/share/man/man4/MakefileTue Mar 31 06:25:43 2020 (r359479) @@ -404,6 +404,7 @@ MAN=aac.4 \ pccard.4 \ pccbb.4 \ pcf.4 \ + ${_pchtherm.4} \ pci.4 \ pcib.4 \ pcic.4 \ @@ -815,6 +816,7 @@ _nvd.4= nvd.4 _nvme.4= nvme.4 _nvram.4= nvram.4 _padlock.4=padlock.4 +_pchtherm.4= pchtherm.4 _rr232x.4= rr232x.4 _speaker.4=speaker.4 _spkr.4= spkr.4 Added: head/share/man/man4/pchtherm.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/pchtherm.4 Tue Mar 31 06:25:43 2020 (r359479) @@ -0,0 +1,117 @@ +.\" +.\" Copyright (c) 2020 Takanori Watanabe +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 15, 2020 +.Dt pchtherm 4 +.Os +.Sh NAME +.Nm pchtherm +.Nd Intel PCH thermal subsystem +.Sh SYNOPSIS +.Cd "device pci" +.Cd "device pchtherm" +.Sh DESCRIPTION +The +.Nm +driver provides access to sensor data and configuration +installed in Intel PCH chipset. +.Nm +configuration register. +.Pp +The access to +.Nm +data is made via the +.Xr sysctl 8 +interface: +.Bd -literal +dev.pchtherm.0.ctt: 115.0C +dev.pchtherm.0.temperature: 28.5C +dev.pchtherm.0.t2temp: 91.0C +dev.pchtherm.0.t1temp: 86.0C +dev.pchtherm.0.t0temp: 81.0C +dev.pchtherm.0.tahv: 83.0C +dev.pchtherm.0.talv: 30.0C +dev.pchtherm.0.pmtime: 32 +dev.pchtherm.0.pmtemp: 50.0C +dev.pchtherm.0.%parent: pci0 +dev.pchtherm.0.%pnpinfo: vendor=0x8086 device=0x9d31 subvendor=0x17aa subdevice=0x2256 class=0x118000 +dev.pchtherm.0.%location: slot=20 function=2 dbsf=pci0:0:20:2 +dev.pchtherm.0.%driver: pchtherm +dev.pchtherm.0.%desc: Skylake PCH Thermal Subsystem +dev.pchtherm.%parent: +.Ed +.Bl -tag -width ".Va dev.pchtherm.%d.pch_hot_level" +.It Va dev.pchtherm.%d.temperature +Is the read-only value of the current temperature read by the sensor. +.It Va dev.pchtherm.%d.ctt +When the system reaches this temperature, it will shut down. +This will not appear when this feature is disabled and locked down. +.It Va dev.pchtherm.%d.t0temp +When temperature is under this value, system will be in T0 state. +.It Va dev.pchtherm.%d.t1temp +When temperature is over +.Va t0temp +and under this value, system will be in T1 state. +.It Va dev.pchtherm.%d.t2temp +When temperature is over +.Va t1temp +and under this value, system will be in T2 state. +Over this value, system will be in T3 state. +.It Va dev.pchtherm.%d.talv +Lower alart value. +This will not appear when sensor enable bit is locked down and the value is zero(which will show -50.0C). +.It Va dev.pchtherm.%d.tahv +High alart value. +This will not appear when sensor enable bit is locked down and the value is zero(which will show -50.0C). +.It Va dev.pchtherm.%d.pmtemp +Sensor Power management temperature. +Under this temperature, sensor will idle during +.Va pmtim
Re: svn commit: r359436 - in head/sys: kern net sys
On Tue, Mar 31, 2020 at 10:55 AM Mark Johnston wrote: > > > It seems could be triggered by sys.netinet6.frag6.* > > > sys.netpfil.common.* sbin.pfctl.pfctl_test.* tests, and there are lots > > > of test cases timed out. > > > > > > Can you help check these? > > > > I see, it is actually caused by r359438. I'm looking at it now. > > I verified that the netpfil and netinet6 tests pass with r359477. Thanks for the fixing, the latest test panics at epair_qflush: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14747/consoleFull while executing sys.netpfil.pf.* tests. I'm not sure if this is related or because of previous commits (I suspect the later). I'll look into this. Best, Li-Wen ___ 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: r359478 - head/usr.sbin/bhyve
Author: bcran Date: Tue Mar 31 02:36:39 2020 New Revision: 359478 URL: https://svnweb.freebsd.org/changeset/base/359478 Log: Bhyve: fix SMBIOS Type 17 table generation According to the SMBIOS specification (revision 2.7 or newer), the extended module size field should only be used for sizes that can't fit in the older size field. Reviewed by: rgrimes, grehan, jhb Differential Revision:https://reviews.freebsd.org/D24107 Modified: head/usr.sbin/bhyve/smbiostbl.c Modified: head/usr.sbin/bhyve/smbiostbl.c == --- head/usr.sbin/bhyve/smbiostbl.c Tue Mar 31 02:25:53 2020 (r359477) +++ head/usr.sbin/bhyve/smbiostbl.c Tue Mar 31 02:36:39 2020 (r359478) @@ -255,7 +255,7 @@ struct smbios_table_type17 { uint16_terrhand;/* handle of mem error data */ uint16_ttwidth; /* total width in bits */ uint16_tdwidth; /* data width in bits */ - uint16_tsize; /* size in bytes */ + uint16_tsize; /* size in kb or mb */ uint8_t form; /* form factor */ uint8_t set;/* set */ uint8_t dloc; /* device locator string */ @@ -268,7 +268,7 @@ struct smbios_table_type17 { uint8_t asset; /* asset tag string */ uint8_t part; /* part number string */ uint8_t attributes; /* attributes */ - uint32_txsize; /* extended size in mbs */ + uint32_txsize; /* extended size in mb */ uint16_tcurspeed; /* current speed in mhz */ uint16_tminvoltage; /* minimum voltage */ uint16_tmaxvoltage; /* maximum voltage */ @@ -444,7 +444,7 @@ struct smbios_table_type17 smbios_type17_template = { -1, /* handle of memory error data */ 64, /* total width in bits including ecc */ 64, /* data width in bits */ - 0x7fff, /* size in bytes (0x7fff=use extended)*/ + 0, /* size in kb or mb (0x7fff=use extended)*/ SMBIOS_MDFF_UNKNOWN, 0, /* set (0x00=none, 0xff=unknown) */ 1, /* device locator string */ @@ -695,20 +695,39 @@ smbios_type17_initializer(struct smbios_structure *tem uint16_t *n, uint16_t *size) { struct smbios_table_type17 *type17; + uint64_t memsize, size_KB, size_MB; smbios_generic_initializer(template_entry, template_strings, curaddr, endaddr, n, size); type17 = (struct smbios_table_type17 *)curaddr; type17->arrayhand = type16_handle; - type17->xsize = guest_lomem; - if (guest_himem > 0) { - curaddr = *endaddr; - smbios_generic_initializer(template_entry, template_strings, - curaddr, endaddr, n, size); - type17 = (struct smbios_table_type17 *)curaddr; - type17->arrayhand = type16_handle; - type17->xsize = guest_himem; + memsize = guest_lomem + guest_himem; + size_KB = memsize / 1024; + size_MB = memsize / MB; + + /* A single Type 17 entry can't represent more than ~2PB RAM */ + if (size_MB > 0x7FFF) { + printf("Warning: guest memory too big for SMBIOS Type 17 table: " + "%luMB greater than max supported 2147483647MB\n", size_MB); + + size_MB = 0x7FFF; + } + + /* See SMBIOS 2.7.0 section 7.18 - Memory Device (Type 17) */ + if (size_KB <= 0x7FFF) { + /* Can represent up to 32767KB with the top bit set */ + type17->size = size_KB | (1 << 15); + } else if (size_MB < 0x7FFF) { + /* Can represent up to 32766MB with the top bit unset */ + type17->size = size_MB & 0x7FFF; + } else { + type17->size = 0x7FFF; + /* +* Can represent up to 2147483647MB (~2PB) +* The top bit is reserved +*/ + type17->xsize = size_MB & 0x7FFF; } return (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"
Re: svn commit: r359436 - in head/sys: kern net sys
On Mon, Mar 30, 2020 at 09:59:05PM -0400, Mark Johnston wrote: > On Tue, Mar 31, 2020 at 09:40:51AM +0800, Li-Wen Hsu wrote: > > On Mon, Mar 30, 2020 at 10:32 PM Mark Johnston wrote: > > > > > > Author: markj > > > Date: Mon Mar 30 14:22:52 2020 > > > New Revision: 359436 > > > URL: https://svnweb.freebsd.org/changeset/base/359436 > > > > > > Log: > > > Simplify taskqgroup inititialization. > > > > > > taskqgroup initialization was broken into two steps: > > > > > > 1. allocate the taskqgroup structure, at SI_SUB_TASKQ; > > > 2. initialize taskqueues, start taskqueue threads, enqueue "binder" > > > tasks to bind threads to specific CPUs, at SI_SUB_SMP. > > > > > > Step 2 tries to handle the case where tasks have already been attached > > > to a queue, by migrating them to their intended queue. In particular, > > > tasks can't be enqueued before step 2 has completed. This breaks NFS > > > mountroot on systems using an iflib-based driver when EARLY_AP_STARTUP > > > is not defined, since mountroot happens before SI_SUB_SMP in this case. > > > > > > Simplify initialization: do all initialization except for CPU binding at > > > SI_SUB_TASKQ. This means that until CPU binding is completed, group > > > tasks may be executed on a CPU other than that to which they were bound, > > > but this should not be a problem for existing users of the taskqgroup > > > KPIs. > > > > > > Reported by: sbruno > > > Tested by:bdragon, sbruno > > > MFC after:1 month > > > Sponsored by: The FreeBSD Foundation > > > Differential Revision:https://reviews.freebsd.org/D24188 > > > > > > Modified: > > > head/sys/kern/subr_gtaskqueue.c > > > head/sys/net/iflib.c > > > head/sys/sys/gtaskqueue.h > > > > Hi Mark, > > > > I see many "panic: deadlres_td_sleep_q: possible deadlock detected" in > > the CI after this commit: > > > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14738/consoleFull > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14739/consoleFull > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14741/consoleFull > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14742/consoleFull > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14743/console > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14744/consoleFull > > > > It seems could be triggered by sys.netinet6.frag6.* > > sys.netpfil.common.* sbin.pfctl.pfctl_test.* tests, and there are lots > > of test cases timed out. > > > > Can you help check these? > > I see, it is actually caused by r359438. I'm looking at it now. I verified that the netpfil and netinet6 tests pass with r359477. ___ 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: r359477 - head/sys/netinet6
Author: markj Date: Tue Mar 31 02:25:53 2020 New Revision: 359477 URL: https://svnweb.freebsd.org/changeset/base/359477 Log: Use a dedicated taskqueue thread for in6m_release_task(). Interfaces may be detached from a taskqueue_thread task, for example by prison_complete(), so after r359438, when draining the queue we may end up deadlocking. Reported by: Jenkins via lwhsu MFC with: r359438 Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c == --- head/sys/netinet6/in6_mcast.c Tue Mar 31 01:18:00 2020 (r359476) +++ head/sys/netinet6/in6_mcast.c Tue Mar 31 02:25:53 2020 (r359477) @@ -510,14 +510,19 @@ in6m_release(struct in6_multi *inm) } } -static struct task free_task; +/* + * Interface detach can happen in a taskqueue thread context, so we must use a + * dedicated thread to avoid deadlocks when draining in6m_release tasks. + */ +TASKQUEUE_DEFINE_THREAD(in6m_free); +static struct task in6m_free_task; static struct in6_multi_head in6m_free_list = SLIST_HEAD_INITIALIZER(); static void in6m_release_task(void *arg __unused, int pending __unused); static void in6m_init(void) { - TASK_INIT(&free_task, 0, in6m_release_task, NULL); + TASK_INIT(&in6m_free_task, 0, in6m_release_task, NULL); } SYSINIT(in6m_init, SI_SUB_TASKQ, SI_ORDER_ANY, in6m_init, NULL); @@ -529,13 +534,13 @@ in6m_release_list_deferred(struct in6_multi_head *inmh mtx_lock(&in6_multi_free_mtx); SLIST_CONCAT(&in6m_free_list, inmh, in6_multi, in6m_nrele); mtx_unlock(&in6_multi_free_mtx); - taskqueue_enqueue(taskqueue_thread, &free_task); + taskqueue_enqueue(taskqueue_in6m_free, &in6m_free_task); } void in6m_release_wait(void) { - taskqueue_drain_all(taskqueue_thread); + taskqueue_drain_all(taskqueue_in6m_free); } void ___ 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: r359436 - in head/sys: kern net sys
On Tue, Mar 31, 2020 at 09:40:51AM +0800, Li-Wen Hsu wrote: > On Mon, Mar 30, 2020 at 10:32 PM Mark Johnston wrote: > > > > Author: markj > > Date: Mon Mar 30 14:22:52 2020 > > New Revision: 359436 > > URL: https://svnweb.freebsd.org/changeset/base/359436 > > > > Log: > > Simplify taskqgroup inititialization. > > > > taskqgroup initialization was broken into two steps: > > > > 1. allocate the taskqgroup structure, at SI_SUB_TASKQ; > > 2. initialize taskqueues, start taskqueue threads, enqueue "binder" > > tasks to bind threads to specific CPUs, at SI_SUB_SMP. > > > > Step 2 tries to handle the case where tasks have already been attached > > to a queue, by migrating them to their intended queue. In particular, > > tasks can't be enqueued before step 2 has completed. This breaks NFS > > mountroot on systems using an iflib-based driver when EARLY_AP_STARTUP > > is not defined, since mountroot happens before SI_SUB_SMP in this case. > > > > Simplify initialization: do all initialization except for CPU binding at > > SI_SUB_TASKQ. This means that until CPU binding is completed, group > > tasks may be executed on a CPU other than that to which they were bound, > > but this should not be a problem for existing users of the taskqgroup > > KPIs. > > > > Reported by: sbruno > > Tested by:bdragon, sbruno > > MFC after:1 month > > Sponsored by: The FreeBSD Foundation > > Differential Revision:https://reviews.freebsd.org/D24188 > > > > Modified: > > head/sys/kern/subr_gtaskqueue.c > > head/sys/net/iflib.c > > head/sys/sys/gtaskqueue.h > > Hi Mark, > > I see many "panic: deadlres_td_sleep_q: possible deadlock detected" in > the CI after this commit: > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14738/consoleFull > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14739/consoleFull > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14741/consoleFull > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14742/consoleFull > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14743/console > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14744/consoleFull > > It seems could be triggered by sys.netinet6.frag6.* > sys.netpfil.common.* sbin.pfctl.pfctl_test.* tests, and there are lots > of test cases timed out. > > Can you help check these? I see, it is actually caused by r359438. I'm looking at it now. ___ 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: r359436 - in head/sys: kern net sys
On Mon, Mar 30, 2020 at 10:32 PM Mark Johnston wrote: > > Author: markj > Date: Mon Mar 30 14:22:52 2020 > New Revision: 359436 > URL: https://svnweb.freebsd.org/changeset/base/359436 > > Log: > Simplify taskqgroup inititialization. > > taskqgroup initialization was broken into two steps: > > 1. allocate the taskqgroup structure, at SI_SUB_TASKQ; > 2. initialize taskqueues, start taskqueue threads, enqueue "binder" > tasks to bind threads to specific CPUs, at SI_SUB_SMP. > > Step 2 tries to handle the case where tasks have already been attached > to a queue, by migrating them to their intended queue. In particular, > tasks can't be enqueued before step 2 has completed. This breaks NFS > mountroot on systems using an iflib-based driver when EARLY_AP_STARTUP > is not defined, since mountroot happens before SI_SUB_SMP in this case. > > Simplify initialization: do all initialization except for CPU binding at > SI_SUB_TASKQ. This means that until CPU binding is completed, group > tasks may be executed on a CPU other than that to which they were bound, > but this should not be a problem for existing users of the taskqgroup > KPIs. > > Reported by: sbruno > Tested by:bdragon, sbruno > MFC after:1 month > Sponsored by: The FreeBSD Foundation > Differential Revision:https://reviews.freebsd.org/D24188 > > Modified: > head/sys/kern/subr_gtaskqueue.c > head/sys/net/iflib.c > head/sys/sys/gtaskqueue.h Hi Mark, I see many "panic: deadlres_td_sleep_q: possible deadlock detected" in the CI after this commit: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14738/consoleFull https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14739/consoleFull https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14741/consoleFull https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14742/consoleFull https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14743/console https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14744/consoleFull It seems could be triggered by sys.netinet6.frag6.* sys.netpfil.common.* sbin.pfctl.pfctl_test.* tests, and there are lots of test cases timed out. Can you help check these? Thanks, Li-Wen ___ 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: r359475 - head/sys/vm
Author: bdrewery Date: Tue Mar 31 01:12:53 2020 New Revision: 359475 URL: https://svnweb.freebsd.org/changeset/base/359475 Log: Remove dead code leftover from r331018. Sponsored by: Dell EMC Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Mon Mar 30 23:29:53 2020(r359474) +++ head/sys/vm/vm_page.c Tue Mar 31 01:12:53 2020(r359475) @@ -2048,8 +2048,6 @@ again: if (vm_object_reserv(object) && (m = vm_reserv_alloc_page(object, pindex, domain, req, mpred)) != NULL) { - domain = vm_phys_domain(m); - vmd = VM_DOMAIN(domain); goto found; } #endif @@ -2248,8 +2246,6 @@ again: if (vm_object_reserv(object) && (m_ret = vm_reserv_alloc_contig(object, pindex, domain, req, mpred, npages, low, high, alignment, boundary)) != NULL) { - domain = vm_phys_domain(m_ret); - vmd = VM_DOMAIN(domain); goto found; } #endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r359459 - head/share/man/man5
On Mon, 30 Mar 2020 at 19:03, John Baldwin wrote: > > and I haven't seen the commit to > actually remove GDB_LIBEXEC yet? I haven't seen the commit mail for r359457 yet either, but the change is committed. ___ 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: r359456 - head
Author: brooks Date: Mon Mar 30 20:04:55 2020 New Revision: 359456 URL: https://svnweb.freebsd.org/changeset/base/359456 Log: Relax existence check of ${LOCALBASE}/bin/kyua After the base kyua import the testsuite can utilize the in-base kyua just fine. Submitted by: Dries Michiels Differential Revision:https://reviews.freebsd.org/D24230 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Mon Mar 30 20:01:44 2020(r359455) +++ head/Makefile.inc1 Mon Mar 30 20:04:55 2020(r359456) @@ -1988,7 +1988,7 @@ sign-packages:_pkgbootstrap .PHONY # Run test suite on installed world. # checkworld: .PHONY - @if [ ! -x "${LOCALBASE}/bin/kyua" ]; then \ + @if [ ! -x "${LOCALBASE}/bin/kyua" ] && [ ! -x "/usr/bin/kyua" ]; then \ echo "You need kyua (devel/kyua) to run the test suite." | /usr/bin/fmt; \ exit 1; \ fi ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r359457 - in head: . gnu/usr.bin/gdb share/mk tools/build/mk tools/build/options
Author: emaste Date: Mon Mar 30 20:05:09 2020 New Revision: 359457 URL: https://svnweb.freebsd.org/changeset/base/359457 Log: drop GDB_LIBEXEC option (now always true) In-tree gdb is essentially obsolete. We kept it for sparc64 (because gdb in ports lacked sparc64 support) and as a fallback for crashinfo. gdb was installed to /libexec on all archs other than sparc64, where the WITHOUT_GDB_LIBEXEC option was default, with gdb installed to /usr/bin. With sparc64's retirement WITH_GDB_LIBEXEC became the default for all architectures, but it was still possible to set it off and install gdb into /usr/bin. As the next step in gdb's retirement, remove the option and install gdb only into /libexec as the crashinfo fallback. We expect users to install the gdb port or package for debugging. The in-tree gdb lacks support for a number of supported architectures and does not support contemporary DWARF debug info. Reviewed by: jhb (earlier) Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D24227 Deleted: head/tools/build/options/WITHOUT_GDB_LIBEXEC head/tools/build/options/WITH_GDB_LIBEXEC Modified: head/ObsoleteFiles.inc head/gnu/usr.bin/gdb/Makefile head/gnu/usr.bin/gdb/Makefile.inc head/share/mk/src.opts.mk head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Mon Mar 30 20:04:55 2020(r359456) +++ head/ObsoleteFiles.inc Mon Mar 30 20:05:09 2020(r359457) @@ -36,6 +36,14 @@ # xargs -n1 | sort | uniq -d; # done +# 20200330: GDB_LIBEXEC option retired (always true) +OLD_FILES+=usr/bin/gdb +OLD_FILES+=usr/bin/gdbserver +OLD_FILES+=usr/bin/kgdb +OLD_FILES+=usr/share/man/man1/gdb.1.gz +OLD_FILES+=usr/share/man/man1/gdbserver.1.gz +OLD_FILES+=usr/share/man/man1/kgdb.1.gz + # 20200327: OCF refactoring OLD_FILES+=usr/share/man/man9/crypto_find_driver.9 OLD_FILES+=usr/share/man/man9/crypto_register.9 Modified: head/gnu/usr.bin/gdb/Makefile == --- head/gnu/usr.bin/gdb/Makefile Mon Mar 30 20:04:55 2020 (r359456) +++ head/gnu/usr.bin/gdb/Makefile Mon Mar 30 20:05:09 2020 (r359457) @@ -4,10 +4,4 @@ SUBDIR=libgdb gdb kgdb -.if ${MK_GDB_LIBEXEC} == "no" -.if exists(${.CURDIR}/gdbserver/reg-${MACHINE_CPUARCH}.c) -SUBDIR+=gdbserver -.endif -.endif - .include Modified: head/gnu/usr.bin/gdb/Makefile.inc == --- head/gnu/usr.bin/gdb/Makefile.inc Mon Mar 30 20:04:55 2020 (r359456) +++ head/gnu/usr.bin/gdb/Makefile.inc Mon Mar 30 20:05:09 2020 (r359457) @@ -58,7 +58,7 @@ GENSRCS+= nm.h tm.h CFLAGS+= -DCROSS_DEBUGGER -I${BMAKE_ROOT:H:H} GDB_SUFFIX= -${TARGET_ARCH} MAN= -.elif ${MK_GDB_LIBEXEC} != "no" +.else BINDIR?= /usr/libexec MAN= .endif Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Mon Mar 30 20:04:55 2020(r359456) +++ head/share/mk/src.opts.mk Mon Mar 30 20:05:09 2020(r359457) @@ -106,7 +106,6 @@ __DEFAULT_YES_OPTIONS = \ FTP \ GAMES \ GDB \ -GDB_LIBEXEC \ GNU_DIFF \ GNU_GREP \ GOOGLETEST \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 30 20:04:55 2020(r359456) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 30 20:05:09 2020(r359457) @@ -2282,16 +2282,7 @@ OLD_FILES+=usr/bin/llvm-profdata OLD_FILES+=usr/share/man/man1/llvm-cov.1.gz .endif -.if ${MK_GDB} == no || ${MK_GDB_LIBEXEC} == yes -OLD_FILES+=usr/bin/gdb -OLD_FILES+=usr/bin/gdbserver -OLD_FILES+=usr/bin/kgdb -OLD_FILES+=usr/share/man/man1/gdb.1.gz -OLD_FILES+=usr/share/man/man1/gdbserver.1.gz -OLD_FILES+=usr/share/man/man1/kgdb.1.gz -.endif - -.if ${MK_GDB} == no || ${MK_GDB_LIBEXEC} == no +.if ${MK_GDB} == no OLD_FILES+=usr/libexec/gdb OLD_FILES+=usr/libexec/kgdb .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r359455 - head/libexec/flua
Author: kevans Date: Mon Mar 30 20:01:44 2020 New Revision: 359455 URL: https://svnweb.freebsd.org/changeset/base/359455 Log: flua: follow-up to r359453, don't bother with libedit in bootstrap The bootstrap flua should not be used for REPL-like activities; exclude it to save the dependency on libedit and not waste time with it. X-MFC-With: r359453 Modified: head/libexec/flua/Makefile Modified: head/libexec/flua/Makefile == --- head/libexec/flua/Makefile Mon Mar 30 19:10:12 2020(r359454) +++ head/libexec/flua/Makefile Mon Mar 30 20:01:44 2020(r359455) @@ -24,9 +24,12 @@ SRCS+= lfs.c lposix.c CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" -# readline bits +# readline bits; these aren't needed if we're building a bootstrap flua, as we +# don't expect that one to see any REPL usage. +.if !defined(BOOTSTRAPPING) CFLAGS+= -DLUA_USE_READLINE CFLAGS+= -I${SRCTOP}/lib/libedit -I${SRCTOP}/contrib/libedit LIBADD+= edit +.endif .include ___ 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: r359474 - head/sys/kern
Author: gallatin Date: Mon Mar 30 23:29:53 2020 New Revision: 359474 URL: https://svnweb.freebsd.org/changeset/base/359474 Log: KTLS: Coalesce adjacent TLS trailers & headers to improve PCIe bus efficiency KTLS uses the embedded header and trailer fields of unmapped mbufs. This can lead to "silly" buffer lengths, where we have an mbuf chain that will create a scatter/gather lists with a regular pattern of 13 bytes followed by 16 bytes between each adjacent TLS record. For software ktls we typically wind up with a pattern where we have several TLS records encrypted, and made ready at once. When these records are made ready, we can coalesce these silly buffers in sbready_compress by copying 13b TLS header of the next record into the 16b TLS trailer of the current record. After doing so, we now have a small 29 byte chunk between each TLS record. This marginally increases PCIe bus efficiency. We've seen an almost 1Gb/s increase in peak throughput on Broadwell based Xeons running a 100% software TLS workload with Mellanox ConnectX-4 NICs. Note that this change is ifdef'ed for KTLS, as KTLS is currently the only user of the hdr/trailer feature of unmapped mbufs, and peeking into them is expensive, since the ext_pgs struct lives in separately allocated memory, and may be cold in cache. This optimization is not applicable to HW ("NIC") TLS, as that depends on having the entire TLS record described by a single unmapped mbuf, so we cannot shift parts of the record between mbufs for HW TLS. Reviewed by: jhb, hselasky, scottl Sponsored by: Netflix Differential Revision:https://reviews.freebsd.org/D24204 Modified: head/sys/kern/uipc_sockbuf.c Modified: head/sys/kern/uipc_sockbuf.c == --- head/sys/kern/uipc_sockbuf.cMon Mar 30 22:13:32 2020 (r359473) +++ head/sys/kern/uipc_sockbuf.cMon Mar 30 23:29:53 2020 (r359474) @@ -112,7 +112,42 @@ sbready_compress(struct sockbuf *sb, struct mbuf *m0, for (m = m0; m != end; m = m->m_next) { MPASS((m->m_flags & M_NOTREADY) == 0); + /* +* NB: In sbcompress(), 'n' is the last mbuf in the +* socket buffer and 'm' is the new mbuf being copied +* into the trailing space of 'n'. Here, the roles +* are reversed and 'n' is the next mbuf after 'm' +* that is being copied into the trailing space of +* 'm'. +*/ + n = m->m_next; +#ifdef KERN_TLS + /* Try to coalesce adjacent ktls mbuf hdr/trailers. */ + if ((n != NULL) && (n != end) && (m->m_flags & M_EOR) == 0 && + (m->m_flags & M_NOMAP) && + (n->m_flags & M_NOMAP) && + !mbuf_has_tls_session(m) && + !mbuf_has_tls_session(n)) { + struct mbuf_ext_pgs *mpgs, *npgs; + int hdr_len, trail_len; + mpgs = m->m_ext.ext_pgs; + npgs = n->m_ext.ext_pgs; + hdr_len = npgs->hdr_len; + trail_len = mpgs->trail_len; + if (trail_len != 0 && hdr_len != 0 && + trail_len + hdr_len <= MBUF_PEXT_TRAIL_LEN) { + /* copy n's header to m's trailer */ + memcpy(&mpgs->trail[trail_len], npgs->hdr, + hdr_len); + mpgs->trail_len += hdr_len; + m->m_len += hdr_len; + npgs->hdr_len = 0; + n->m_len -= hdr_len; + } + } +#endif + /* Compress small unmapped mbufs into plain mbufs. */ if ((m->m_flags & M_NOMAP) && m->m_len <= MLEN && !mbuf_has_tls_session(m)) { @@ -124,15 +159,6 @@ sbready_compress(struct sockbuf *sb, struct mbuf *m0, } } - /* -* NB: In sbcompress(), 'n' is the last mbuf in the -* socket buffer and 'm' is the new mbuf being copied -* into the trailing space of 'n'. Here, the roles -* are reversed and 'n' is the next mbuf after 'm' -* that is being copied into the trailing space of -* 'm'. -*/ - n = m->m_next; while ((n != NULL) && (n != end) && (m->m_flags & M_EOR) == 0 && M_WRITABLE(m) && (m->m_flags & M_NOMAP) == 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
Re: svn commit: r359459 - head/share/man/man5
On 3/30/20 1:08 PM, Ed Maste wrote: > Author: emaste > Date: Mon Mar 30 20:08:26 2020 > New Revision: 359459 > URL: https://svnweb.freebsd.org/changeset/base/359459 > > Log: > regen src.conf.5 after WITHOUT_GDB_LIBEXEC removal r359454 > > ... and a number of other changes since the last regen. Hmm, 359454 was a markup fix to elf.5 and I haven't seen the commit to actually remove GDB_LIBEXEC yet? -- 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: r359467 - head/lib/libc/sys
Author: jhb Date: Mon Mar 30 21:48:47 2020 New Revision: 359467 URL: https://svnweb.freebsd.org/changeset/base/359467 Log: Trim some duplicate EIO descriptions. While here, drop an extra conjunction from the list of error conditions for the remaining EIO description in symlink(2). Discussed with: mckusick (trimming duplicates) MFC after:2 weeks Modified: head/lib/libc/sys/mkfifo.2 head/lib/libc/sys/symlink.2 Modified: head/lib/libc/sys/mkfifo.2 == --- head/lib/libc/sys/mkfifo.2 Mon Mar 30 21:44:30 2020(r359466) +++ head/lib/libc/sys/mkfifo.2 Mon Mar 30 21:48:47 2020(r359467) @@ -130,10 +130,6 @@ which the fifo is being created has been exhausted. An .Tn I/O error occurred while making the directory entry or allocating the inode. -.It Bq Er EIO -An -.Tn I/O -error occurred while reading from or writing to the file system. .It Bq Er EINTEGRITY Corrupted data was detected while reading from the file system. .It Bq Er EFAULT Modified: head/lib/libc/sys/symlink.2 == --- head/lib/libc/sys/symlink.2 Mon Mar 30 21:44:30 2020(r359466) +++ head/lib/libc/sys/symlink.2 Mon Mar 30 21:48:47 2020(r359467) @@ -118,7 +118,7 @@ manual page for more information. .It Bq Er EIO An I/O error occurred while making the directory entry for .Fa name2 , -or allocating the inode for +allocating the inode for .Fa name2 , or writing out the link contents of .Fa name2 . @@ -149,8 +149,6 @@ contain the symbolic link has been exhausted. .It Bq Er EDQUOT The user's quota of inodes on the file system on which the symbolic link is being created has been exhausted. -.It Bq Er EIO -An I/O error occurred while making the directory entry or allocating the inode. .It Bq Er EINTEGRITY Corrupted data was detected while reading from the file system. .It Bq Er EFAULT ___ 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: r359469 - head/sys/kern
Author: kib Date: Mon Mar 30 21:57:28 2020 New Revision: 359469 URL: https://svnweb.freebsd.org/changeset/base/359469 Log: kern_sendfile.c: wait for all in-flight ios completion before unwiring pages. Reviewed by: glebius, markj Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D24038 Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c == --- head/sys/kern/kern_sendfile.c Mon Mar 30 21:50:51 2020 (r359468) +++ head/sys/kern/kern_sendfile.c Mon Mar 30 21:57:28 2020 (r359469) @@ -256,6 +256,17 @@ fixspace(int old, int new, off_t off, int *space) } /* + * Wait for all in-flight ios to complete, we must not unwire pages + * under them. + */ +static void +sendfile_iowait(struct sf_io *sfio, const char *wmesg) +{ + while (atomic_load_int(&sfio->nios) != 1) + pause(wmesg, 1); +} + +/* * I/O completion callback. */ static void @@ -437,6 +448,8 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i i + count == npages ? &rhpages : NULL, &sendfile_iodone, sfio); if (__predict_false(rv != VM_PAGER_OK)) { + sendfile_iowait(sfio, "sferrio"); + /* * Perform full pages recovery before returning EIO. * Pages from 0 to npages are wired. @@ -967,6 +980,7 @@ retry_space: m != NULL ? SFB_NOWAIT : SFB_CATCH); if (sf == NULL) { SFSTAT_INC(sf_allocfail); + sendfile_iowait(sfio, "sfnosf"); for (int j = i; j < npages; j++) vm_page_unwire(pa[j], PQ_INACTIVE); if (m == 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: r359463 - head/sys/kern
Author: kib Date: Mon Mar 30 21:40:35 2020 New Revision: 359463 URL: https://svnweb.freebsd.org/changeset/base/359463 Log: kern_sendfile.c style: order headers alphabetically. Reviewed by: glebius, markj Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D24038 Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c == --- head/sys/kern/kern_sendfile.c Mon Mar 30 21:25:00 2020 (r359462) +++ head/sys/kern/kern_sendfile.c Mon Mar 30 21:40:35 2020 (r359463) @@ -36,16 +36,14 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include -#include #include -#include #include #include #include +#include #include #include #include @@ -53,9 +51,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include ___ 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: r359473 - head/sys/kern
Author: kib Date: Mon Mar 30 22:13:32 2020 New Revision: 359473 URL: https://svnweb.freebsd.org/changeset/base/359473 Log: kern_sendfile.c: fix bugs with handling of busy page states. - Do not call into a vnode pager while leaving some pages from the same block as the current run, xbusy. This immediately deadlocks if pager needs to instantiate the buffer. - Only relookup bogus pages after io finished, otherwise we might obliterate the valid pages by out of date disk content. While there, expand the comment explaining this pecularity. - Do not double-unbusy on error. Split unbusy for error case, which is left in the sendfile_swapin(), from the more properly coded normal case in sendfile_iodone(). - Add an XXXKIB comment explaining the serious bug in the validation algorithm, not fixed by this patch series. PR: 244713 Reviewed by: glebius, markj Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D24038 Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c == --- head/sys/kern/kern_sendfile.c Mon Mar 30 22:07:11 2020 (r359472) +++ head/sys/kern/kern_sendfile.c Mon Mar 30 22:13:32 2020 (r359473) @@ -92,6 +92,7 @@ struct sf_io { struct socket *so; struct mbuf *m; vm_object_t obj; + vm_pindex_t pindex0; #ifdef KERN_TLS struct ktls_session *tls; #endif @@ -270,17 +271,42 @@ sendfile_iowait(struct sf_io *sfio, const char *wmesg) * I/O completion callback. */ static void -sendfile_iodone(void *arg, vm_page_t *pg, int count, int error) +sendfile_iodone(void *arg, vm_page_t *pa, int count, int error) { struct sf_io *sfio = arg; struct socket *so; + int i; - for (int i = 0; i < count; i++) - if (pg[i] != bogus_page) - vm_page_xunbusy_unchecked(pg[i]); - - if (error) + if (error != 0) { sfio->error = error; + /* +* Restore of the pg[] elements is done by +* sendfile_swapin(). +*/ + } else { + /* +* Restore the valid page pointers. They are already +* unbusied, but still wired. For error != 0 case, +* sendfile_swapin() handles unbusy. +* +* XXXKIB since pages are only wired, and we do not +* own the object lock, other users might have +* invalidated them in meantime. Similarly, after we +* unbusied the swapped-in pages, they can become +* invalid under us. +*/ + for (i = 0; i < count; i++) { + if (pa[i] == bogus_page) { + pa[i] = vm_page_relookup(sfio->obj, + sfio->pindex0 + i + (sfio->pa - pa)); + KASSERT(pa[i] != NULL, + ("%s: page %p[%d] disappeared", + __func__, pa, i)); + } else { + vm_page_xunbusy_unchecked(pa[i]); + } + } + } if (!refcount_release(&sfio->nios)) return; @@ -361,11 +387,13 @@ static int sendfile_swapin(vm_object_t obj, struct sf_io *sfio, int *nios, off_t off, off_t len, int npages, int rhpages, int flags) { - vm_page_t *pa = sfio->pa; - int grabbed; + vm_page_t *pa; + int a, count, count1, grabbed, i, j, rv; + pa = sfio->pa; *nios = 0; flags = (flags & SF_NODISKIO) ? VM_ALLOC_NOWAIT : 0; + sfio->pindex0 = OFF_TO_IDX(off); /* * First grab all the pages and wire them. Note that we grab @@ -380,9 +408,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i rhpages = 0; } - for (int i = 0; i < npages;) { - int j, a, count, rv; - + for (i = 0; i < npages;) { /* Skip valid pages. */ if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK, xfsize(i, npages, off, len))) { @@ -422,19 +448,41 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i count = min(a + 1, npages - i); /* -* We should not pagein into a valid page, thus we first trim -* any valid pages off the end of request, and substitute -* to bogus_page those, that are in the middle. +* We should not pagein into a valid page because +* there might be still unfinished write tracked by +* e.g. a buffer, thus we substitute any valid pages +*
svn commit: r359470 - head/sys/kern
Author: kib Date: Mon Mar 30 22:01:36 2020 New Revision: 359470 URL: https://svnweb.freebsd.org/changeset/base/359470 Log: kern_sendfile.c: do not release sfio reference on error. It is already done by sendfile_iodone(), now consistently for all errors. This de-facto reverts r358597, after r359466. Reviewed by: glebius, markj Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D24038 Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c == --- head/sys/kern/kern_sendfile.c Mon Mar 30 21:57:28 2020 (r359469) +++ head/sys/kern/kern_sendfile.c Mon Mar 30 22:01:36 2020 (r359470) @@ -469,7 +469,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i __func__, pa, j)); vm_page_unwire(pa[j], PQ_INACTIVE); } - refcount_release(&sfio->nios); return (EIO); } ___ 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: r359465 - in head: lib/libc/sys share/man/man9
Author: jhb Date: Mon Mar 30 21:44:00 2020 New Revision: 359465 URL: https://svnweb.freebsd.org/changeset/base/359465 Log: Document EINTEGRITY errors for many system calls. EINTEGRITY was previously documented as a UFS-specific error for mount(2). This documents EINTEGRITY as a filesystem-independent error that may be reported by the backing store of a filesystem. While here, document EIO as a filesystem-independent error for both mount(2) and posix_fadvise(2). EIO was previously only documented for UFS for mount(2). Reviewed by: mckusick Suggested by: mckusick MFC after:2 weeks Sponsored by: Chelsio Communications Differential Revision:https://reviews.freebsd.org/D24168 Modified: head/lib/libc/sys/access.2 head/lib/libc/sys/acct.2 head/lib/libc/sys/bind.2 head/lib/libc/sys/chdir.2 head/lib/libc/sys/chflags.2 head/lib/libc/sys/chmod.2 head/lib/libc/sys/chown.2 head/lib/libc/sys/chroot.2 head/lib/libc/sys/copy_file_range.2 head/lib/libc/sys/execve.2 head/lib/libc/sys/fhlink.2 head/lib/libc/sys/fhreadlink.2 head/lib/libc/sys/fsync.2 head/lib/libc/sys/getdirentries.2 head/lib/libc/sys/getfh.2 head/lib/libc/sys/getfsstat.2 head/lib/libc/sys/ktrace.2 head/lib/libc/sys/link.2 head/lib/libc/sys/mkdir.2 head/lib/libc/sys/mkfifo.2 head/lib/libc/sys/mknod.2 head/lib/libc/sys/mount.2 head/lib/libc/sys/open.2 head/lib/libc/sys/pathconf.2 head/lib/libc/sys/posix_fadvise.2 head/lib/libc/sys/posix_fallocate.2 head/lib/libc/sys/quotactl.2 head/lib/libc/sys/read.2 head/lib/libc/sys/readlink.2 head/lib/libc/sys/rename.2 head/lib/libc/sys/rmdir.2 head/lib/libc/sys/sendfile.2 head/lib/libc/sys/stat.2 head/lib/libc/sys/statfs.2 head/lib/libc/sys/swapon.2 head/lib/libc/sys/symlink.2 head/lib/libc/sys/truncate.2 head/lib/libc/sys/undelete.2 head/lib/libc/sys/unlink.2 head/lib/libc/sys/utimensat.2 head/lib/libc/sys/utimes.2 head/lib/libc/sys/write.2 head/share/man/man9/VOP_COPY_FILE_RANGE.9 head/share/man/man9/VOP_READDIR.9 head/share/man/man9/VOP_READLINK.9 head/share/man/man9/g_data.9 Modified: head/lib/libc/sys/access.2 == --- head/lib/libc/sys/access.2 Mon Mar 30 21:42:46 2020(r359464) +++ head/lib/libc/sys/access.2 Mon Mar 30 21:44:00 2020(r359465) @@ -28,7 +28,7 @@ .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" -.Dd November 11, 2018 +.Dd March 30, 2020 .Dt ACCESS 2 .Os .Sh NAME @@ -175,6 +175,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Pp Also, the Modified: head/lib/libc/sys/acct.2 == --- head/lib/libc/sys/acct.2Mon Mar 30 21:42:46 2020(r359464) +++ head/lib/libc/sys/acct.2Mon Mar 30 21:44:00 2020(r359465) @@ -28,7 +28,7 @@ .\" @(#)acct.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 17, 2004 +.Dd March 30, 2020 .Dt ACCT 2 .Os .Sh NAME @@ -119,6 +119,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr acct 5 , Modified: head/lib/libc/sys/bind.2 == --- head/lib/libc/sys/bind.2Mon Mar 30 21:42:46 2020(r359464) +++ head/lib/libc/sys/bind.2Mon Mar 30 21:44:00 2020(r359465) @@ -28,7 +28,7 @@ .\" @(#)bind.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 18, 2016 +.Dd March 30, 2020 .Dt BIND 2 .Os .Sh NAME @@ -122,6 +122,8 @@ A prefix component of the path name does not exist. Too many symbolic links were encountered in translating the pathname. .It Bq Er EIO An I/O error occurred while making the directory entry or allocating the inode. +.It Bq Er EINTEGRITY +Corrupted data was detected while reading from the file system. .It Bq Er EROFS The name would reside on a read-only file system. .It Bq Er EISDIR Modified: head/lib/libc/sys/chdir.2 == --- head/lib/libc/sys/chdir.2 Mon Mar 30 21:42:46 2020(r359464) +++ head/lib/libc/sys/chdir.2 Mon Mar 30 21:44:00 2020(r359465) @@ -28,7 +28,7 @@ .\" @(#)chdir.28.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd March 30, 2020 .Dt CHDIR 2 .Os .Sh NAME @@ -96,6 +96,8 @@ argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. +.It Bq Er EINTEGRITY +Corrupted da
svn commit: r359466 - in head/sys: kern ufs/ffs vm
Author: kib Date: Mon Mar 30 21:44:30 2020 New Revision: 359466 URL: https://svnweb.freebsd.org/changeset/base/359466 Log: VOP_GETPAGES_ASYNC(): consistently call iodone() callback in case of error. Reviewed by: glebius, markj Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D24038 Modified: head/sys/kern/vfs_default.c head/sys/ufs/ffs/ffs_vnops.c head/sys/vm/vnode_pager.c Modified: head/sys/kern/vfs_default.c == --- head/sys/kern/vfs_default.c Mon Mar 30 21:44:00 2020(r359465) +++ head/sys/kern/vfs_default.c Mon Mar 30 21:44:30 2020(r359466) @@ -765,7 +765,8 @@ vop_stdgetpages_async(struct vop_getpages_async_args * error = VOP_GETPAGES(ap->a_vp, ap->a_m, ap->a_count, ap->a_rbehind, ap->a_rahead); - ap->a_iodone(ap->a_arg, ap->a_m, ap->a_count, error); + if (ap->a_iodone != NULL) + ap->a_iodone(ap->a_arg, ap->a_m, ap->a_count, error); return (error); } Modified: head/sys/ufs/ffs/ffs_vnops.c == --- head/sys/ufs/ffs/ffs_vnops.cMon Mar 30 21:44:00 2020 (r359465) +++ head/sys/ufs/ffs/ffs_vnops.cMon Mar 30 21:44:30 2020 (r359466) @@ -1780,18 +1780,25 @@ ffs_getpages_async(struct vop_getpages_async_args *ap) { struct vnode *vp; struct ufsmount *um; + bool do_iodone; int error; vp = ap->a_vp; um = VFSTOUFS(vp->v_mount); + do_iodone = true; - if (um->um_devvp->v_bufobj.bo_bsize <= PAGE_SIZE) - return (vnode_pager_generic_getpages(vp, ap->a_m, ap->a_count, - ap->a_rbehind, ap->a_rahead, ap->a_iodone, ap->a_arg)); - - error = vfs_bio_getpages(vp, ap->a_m, ap->a_count, ap->a_rbehind, - ap->a_rahead, ffs_gbp_getblkno, ffs_gbp_getblksz); - ap->a_iodone(ap->a_arg, ap->a_m, ap->a_count, error); + if (um->um_devvp->v_bufobj.bo_bsize <= PAGE_SIZE) { + error = vnode_pager_generic_getpages(vp, ap->a_m, ap->a_count, + ap->a_rbehind, ap->a_rahead, ap->a_iodone, ap->a_arg); + if (error == 0) + do_iodone = false; + } else { + error = vfs_bio_getpages(vp, ap->a_m, ap->a_count, + ap->a_rbehind, ap->a_rahead, ffs_gbp_getblkno, + ffs_gbp_getblksz); + } + if (do_iodone && ap->a_iodone != NULL) + ap->a_iodone(ap->a_arg, ap->a_m, ap->a_count, error); return (error); } Modified: head/sys/vm/vnode_pager.c == --- head/sys/vm/vnode_pager.c Mon Mar 30 21:44:00 2020(r359465) +++ head/sys/vm/vnode_pager.c Mon Mar 30 21:44:30 2020(r359466) @@ -776,9 +776,13 @@ vnode_pager_local_getpages(struct vop_getpages_args *a int vnode_pager_local_getpages_async(struct vop_getpages_async_args *ap) { + int error; - return (vnode_pager_generic_getpages(ap->a_vp, ap->a_m, ap->a_count, - ap->a_rbehind, ap->a_rahead, ap->a_iodone, ap->a_arg)); + error = vnode_pager_generic_getpages(ap->a_vp, ap->a_m, ap->a_count, + ap->a_rbehind, ap->a_rahead, ap->a_iodone, ap->a_arg); + if (error != 0 && ap->a_iodone != NULL) + ap->a_iodone(ap->a_arg, ap->a_m, ap->a_count, error); + return (error); } /* ___ 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: r359468 - head/sys/kern
Author: kib Date: Mon Mar 30 21:50:51 2020 New Revision: 359468 URL: https://svnweb.freebsd.org/changeset/base/359468 Log: kern_sendfile.c: add specific malloc type. Now sfio leaks are more easily seen in the malloc statistics than e.g. just wired or busy pages leak. Reviewed by: glebius, markj Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D24038 Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c == --- head/sys/kern/kern_sendfile.c Mon Mar 30 21:48:47 2020 (r359467) +++ head/sys/kern/kern_sendfile.c Mon Mar 30 21:50:51 2020 (r359468) @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); #include #include +static MALLOC_DEFINE(M_SENDFILE, "sendfile", "sendfile dynamic memory"); + #defineEXT_FLAG_SYNC EXT_FLAG_VENDOR1 #defineEXT_FLAG_NOCACHEEXT_FLAG_VENDOR2 #defineEXT_FLAG_CACHE_LAST EXT_FLAG_VENDOR3 @@ -283,7 +285,7 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i * to the socket yet. */ MPASS((curthread->td_pflags & TDP_KTHREAD) == 0); - free(sfio, M_TEMP); + free(sfio, M_SENDFILE); return; } @@ -338,7 +340,7 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i out_with_ref: #endif CURVNET_RESTORE(); - free(sfio, M_TEMP); + free(sfio, M_SENDFILE); } /* @@ -640,7 +642,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *h SFSTAT_ADD(sf_rhpages_requested, SF_READAHEAD(flags)); if (flags & SF_SYNC) { - sfs = malloc(sizeof *sfs, M_TEMP, M_WAITOK | M_ZERO); + sfs = malloc(sizeof(*sfs), M_SENDFILE, M_WAITOK | M_ZERO); mtx_init(&sfs->mtx, "sendfile", NULL, MTX_DEF); cv_init(&sfs->cv, "sendfile"); } @@ -826,7 +828,7 @@ retry_space: npages, rhpages); sfio = malloc(sizeof(struct sf_io) + - npages * sizeof(vm_page_t), M_TEMP, M_WAITOK); + npages * sizeof(vm_page_t), M_SENDFILE, M_WAITOK); refcount_init(&sfio->nios, 1); sfio->obj = obj; sfio->error = 0; @@ -1135,7 +1137,7 @@ out: KASSERT(sfs->count == 0, ("sendfile sync still busy")); cv_destroy(&sfs->cv); mtx_destroy(&sfs->mtx); - free(sfs, M_TEMP); + free(sfs, M_SENDFILE); } #ifdef KERN_TLS if (tls != 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: r359464 - head/sys/kern
Author: kib Date: Mon Mar 30 21:42:46 2020 New Revision: 359464 URL: https://svnweb.freebsd.org/changeset/base/359464 Log: buffer pager: skip bogus pages. We cannot validate bogus page by reading a buffer. PR: 244713 Reviewed by: glebius, markj Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D24038 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c == --- head/sys/kern/vfs_bio.c Mon Mar 30 21:40:35 2020(r359463) +++ head/sys/kern/vfs_bio.c Mon Mar 30 21:42:46 2020(r359464) @@ -5154,12 +5154,16 @@ vfs_bio_getpages(struct vnode *vp, vm_page_t *ma, int br_flags = (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMAPPED_BUFS) != 0) ? GB_UNMAPPED : 0; again: - for (i = 0; i < count; i++) - vm_page_busy_downgrade(ma[i]); + for (i = 0; i < count; i++) { + if (ma[i] != bogus_page) + vm_page_busy_downgrade(ma[i]); + } lbnp = -1; for (i = 0; i < count; i++) { m = ma[i]; + if (m == bogus_page) + continue; /* * Pages are shared busy and the object lock is not @@ -5228,6 +5232,8 @@ end_pages: redo = false; for (i = 0; i < count; i++) { + if (ma[i] == bogus_page) + continue; if (vm_page_busy_tryupgrade(ma[i]) == 0) { vm_page_sunbusy(ma[i]); ma[i] = vm_page_grab_unlocked(object, ma[i]->pindex, ___ 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: r359462 - head/lib/libc/gen
Author: emaste Date: Mon Mar 30 21:25:00 2020 New Revision: 359462 URL: https://svnweb.freebsd.org/changeset/base/359462 Log: libc: unconditionalize _NLIST_DO_ELF Suggested by: brooks, imp Modified: head/lib/libc/gen/nlist.c Modified: head/lib/libc/gen/nlist.c == --- head/lib/libc/gen/nlist.c Mon Mar 30 20:20:15 2020(r359461) +++ head/lib/libc/gen/nlist.c Mon Mar 30 21:25:00 2020(r359462) @@ -47,12 +47,8 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" -#define _NLIST_DO_ELF - -#ifdef _NLIST_DO_ELF #include #include -#endif int __fdnlist(int, struct nlist *); int __elf_fdnlist(int, struct nlist *); @@ -74,9 +70,7 @@ nlist(const char *name, struct nlist *list) static struct nlist_handlers { int (*fn)(int fd, struct nlist *list); } nlist_fn[] = { -#ifdef _NLIST_DO_ELF { __elf_fdnlist }, -#endif }; int @@ -95,7 +89,6 @@ __fdnlist(int fd, struct nlist *list) #defineISLAST(p) (p->n_un.n_name == 0 || p->n_un.n_name[0] == 0) -#ifdef _NLIST_DO_ELF static void elf_sym_to_nlist(struct nlist *, Elf_Sym *, Elf_Shdr *, int); /* @@ -299,4 +292,3 @@ elf_sym_to_nlist(struct nlist *nl, Elf_Sym *s, Elf_Shd ELF_ST_BIND(s->st_info) == STB_WEAK) nl->n_type |= N_EXT; } -#endif /* _NLIST_DO_ELF */ ___ 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: r359460 - head/lib/libc/gen
Author: emaste Date: Mon Mar 30 20:15:19 2020 New Revision: 359460 URL: https://svnweb.freebsd.org/changeset/base/359460 Log: nlist: retire long-obsolete aout support Reviewed by: brooks, kib Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D24229 Modified: head/lib/libc/gen/Symbol.map head/lib/libc/gen/nlist.3 head/lib/libc/gen/nlist.c Modified: head/lib/libc/gen/Symbol.map == --- head/lib/libc/gen/Symbol.mapMon Mar 30 20:08:26 2020 (r359459) +++ head/lib/libc/gen/Symbol.mapMon Mar 30 20:15:19 2020 (r359460) @@ -510,7 +510,6 @@ FBSDprivate_1.0 { /* __pw_match_entry; */ /* __pw_parse_entry; */ __fdnlist; /* used by libkvm */ - /* __aout_fdnlist; */ /* __elf_is_okay__; */ /* __elf_fdnlist; */ __opendir2; Modified: head/lib/libc/gen/nlist.3 == --- head/lib/libc/gen/nlist.3 Mon Mar 30 20:08:26 2020(r359459) +++ head/lib/libc/gen/nlist.3 Mon Mar 30 20:15:19 2020(r359460) @@ -69,7 +69,6 @@ if the file .Fa filename does not exist or is not executable, the returned value is \-1. .Sh SEE ALSO -.Xr a.out 5 , .Xr elf 5 .Sh HISTORY A Modified: head/lib/libc/gen/nlist.c == --- head/lib/libc/gen/nlist.c Mon Mar 30 20:08:26 2020(r359459) +++ head/lib/libc/gen/nlist.c Mon Mar 30 20:15:19 2020(r359460) @@ -47,10 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" -/* i386 is the only current FreeBSD architecture that used a.out format. */ -#ifdef __i386__ -#define _NLIST_DO_AOUT -#endif #define _NLIST_DO_ELF #ifdef _NLIST_DO_ELF @@ -59,7 +55,6 @@ __FBSDID("$FreeBSD$"); #endif int __fdnlist(int, struct nlist *); -int __aout_fdnlist(int, struct nlist *); int __elf_fdnlist(int, struct nlist *); int __elf_is_okay__(Elf_Ehdr *); @@ -79,9 +74,6 @@ nlist(const char *name, struct nlist *list) static struct nlist_handlers { int (*fn)(int fd, struct nlist *list); } nlist_fn[] = { -#ifdef _NLIST_DO_AOUT - { __aout_fdnlist }, -#endif #ifdef _NLIST_DO_ELF { __elf_fdnlist }, #endif @@ -102,100 +94,6 @@ __fdnlist(int fd, struct nlist *list) } #defineISLAST(p) (p->n_un.n_name == 0 || p->n_un.n_name[0] == 0) - -#ifdef _NLIST_DO_AOUT -int -__aout_fdnlist(int fd, struct nlist *list) -{ - struct nlist *p, *symtab; - caddr_t strtab, a_out_mmap; - off_t stroff, symoff; - u_long symsize; - int nent; - struct exec * exec; - struct stat st; - - /* check that file is at least as large as struct exec! */ - if ((_fstat(fd, &st) < 0) || (st.st_size < sizeof(struct exec))) - return (-1); - - /* Check for files too large to mmap. */ - if (st.st_size > SIZE_T_MAX) { - errno = EFBIG; - return (-1); - } - - /* -* Map the whole a.out file into our address space. -* We then find the string table withing this area. -* We do not just mmap the string table, as it probably -* does not start at a page boundary - we save ourselves a -* lot of nastiness by mmapping the whole file. -* -* This gives us an easy way to randomly access all the strings, -* without making the memory allocation permanent as with -* malloc/free (i.e., munmap will return it to the system). -*/ - a_out_mmap = mmap(NULL, (size_t)st.st_size, PROT_READ, MAP_PRIVATE, fd, (off_t)0); - if (a_out_mmap == MAP_FAILED) - return (-1); - - exec = (struct exec *)a_out_mmap; - if (N_BADMAG(*exec)) { - munmap(a_out_mmap, (size_t)st.st_size); - return (-1); - } - - symoff = N_SYMOFF(*exec); - symsize = exec->a_syms; - stroff = symoff + symsize; - - /* find the string table in our mmapped area */ - strtab = a_out_mmap + stroff; - symtab = (struct nlist *)(a_out_mmap + symoff); - - /* -* clean out any left-over information for all valid entries. -* Type and value defined to be 0 if not found; historical -* versions cleared other and desc as well. Also figure out -* the largest string length so don't read any more of the -* string table than we have to. -* -* XXX clearing anything other than n_type and n_value violates -* the semantics given in the man page. -*/ - nent = 0; - for (p = list; !ISLAST(p); ++p) { - p->n_type = 0; - p->n_other = 0; - p->n_desc = 0; - p->n_value = 0; - ++nent; - } - - while (symsize > 0) { -
svn commit: r359461 - in head: . tools/build
Author: emaste Date: Mon Mar 30 20:20:15 2020 New Revision: 359461 URL: https://svnweb.freebsd.org/changeset/base/359461 Log: add shell script for stale dependency hack It's rather awkward to debug issues with the dependency cleanup hacks when implemented via make. Add a cleanup shell script and move the libomp hack there as an initial example. Reviewed by: brooks MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D24228 Added: head/tools/build/depend-cleanup.sh (contents, props changed) Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Mon Mar 30 20:15:19 2020(r359460) +++ head/Makefile.inc1 Mon Mar 30 20:20:15 2020(r359461) @@ -924,17 +924,8 @@ _sanity_check: .PHONY .MAKE # replacing generated files. Handle these cases here in an ad-hoc fashion. _cleanobj_fast_depend_hack: .PHONY @echo ">>> Deleting stale dependencies..."; + sh ${.CURDIR}/tools/build/depend-cleanup.sh ${OBJTOP} # Date SVN Rev Syscalls/Changes -# 20200310 r358851 rename of openmp's ittnotify_static.c to .cpp -.for f in ittnotify_static - @if [ -e "${OBJTOP}/lib/libomp/.depend.${f}.pico" ] && \ - egrep -qw '${f}\.c' ${OBJTOP}/lib/libomp/.depend.${f}.pico; then \ - echo "Removing stale dependencies for ${f}"; \ - rm -f ${OBJTOP}/lib/libomp/.depend.${f}.* \ - ${OBJTOP}/obj-lib32/lib/libomp/.depend.${f}.* \ - ${LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libomp/.depend.${f}.*}; \ - fi -.endfor # Syscall stubs rewritten in C and obsolete MD assembly implementations # 20191009 r353340 removal of opensolaris_atomic.S (also r353381) .if ${MACHINE} != i386 Added: head/tools/build/depend-cleanup.sh == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/depend-cleanup.sh Mon Mar 30 20:20:15 2020 (r359461) @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Our current make(1)-based approach to dependency tracking cannot cope with +# certain source tree changes, including: +# - removing source files +# - replacing generated files with files committed to the tree +# - changing file extensions (e.g. a C source file rewritten in C++) +# +# We handle those cases here in an ad-hoc fashion by looking for the known- +# bad case in the main .depend file, and if found deleting all of the related +# .depend files (including for example the lib32 version). + +OBJTOP=$1 +if [ ! -d "$OBJTOP" ]; then + echo "usage: $(basename $0) objtop" >&2 + exit 1 +fi + +# $1 directory +# $2 source filename w/o extension +# $3 source extension +clean_dep() +{ + if [ -e "$OBJTOP"/$1/.depend.$2.pico ] && \ + egrep -qw "$2\.$3" "$OBJTOP"/$1/.depend.$2.pico; then \ + echo "Removing stale dependencies for $2.$3"; \ + rm -f "$OBJTOP"/$1/.depend.$2.* \ + "$OBJTOP"/obj-lib32/$1/.depend.$2.* + fi +} + +# Date Rev Description +# 20200310 r358851 rename of openmp's ittnotify_static.c to .cpp +clean_dep lib/libomp ittnotify_static c ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r359459 - head/share/man/man5
On Mon, 30 Mar 2020 at 16:09, Ed Maste wrote: > > Author: emaste > Date: Mon Mar 30 20:08:26 2020 > New Revision: 359459 > URL: https://svnweb.freebsd.org/changeset/base/359459 > > Log: > regen src.conf.5 after WITHOUT_GDB_LIBEXEC removal r359454 Oops, copied the wrong revision number, it should be r359457. I don't think it's worth reverting and recommitting a generated file to correct this though. ___ 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: r359459 - head/share/man/man5
Author: emaste Date: Mon Mar 30 20:08:26 2020 New Revision: 359459 URL: https://svnweb.freebsd.org/changeset/base/359459 Log: regen src.conf.5 after WITHOUT_GDB_LIBEXEC removal r359454 ... and a number of other changes since the last regen. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Mon Mar 30 20:07:25 2020 (r359458) +++ head/share/man/man5/src.conf.5 Mon Mar 30 20:08:26 2020 (r359459) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd March 9, 2020 +.Dd March 30, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -177,8 +177,7 @@ flag set to indicate that the run-time loader should p processing at process startup rather than on demand. .It Va WITHOUT_BINUTILS Do not build or install GNU -.Xr as 1 , -.Xr ld.bfd 1 , and +.Xr as 1 and .Xr objdump 1 as part of the normal system build. @@ -189,25 +188,24 @@ arm64/aarch64, riscv/riscv64 and riscv/riscv64sf. Build and install GNU .Xr as 1 on i386 and amd64, -.Xr objdump 1 , and -.Xr ld.bfd 1 -on powerpc as part of the normal system build. +.Xr objdump 1 +as part of the normal system build. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc and powerpc/powerpc64. +amd64/amd64, arm/armv6, arm/armv7, i386/i386, mips/mips, mips/mips64, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_BINUTILS_BOOTSTRAP Do not build GNU binutils as part of the bootstrap process. .Pp This is a default setting on -arm/armv6, arm/armv7, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, arm64/aarch64, mips/mips, mips/mips64, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_BINUTILS_BOOTSTRAP Build GNU binutils as part of the bootstrap process. .Pp This is a default setting on -amd64/amd64, i386/i386, powerpc/powerpc and powerpc/powerpc64. +amd64/amd64 and i386/i386. .It Va WITHOUT_BLACKLIST Set this if you do not want to build .Xr blacklistd 8 @@ -356,14 +354,6 @@ Set to not build the Clang C/C++ compiler during the b the build. To be able to build the system, either gcc or clang bootstrap must be enabled unless an alternate compiler is provided via XCC. -.Pp -This is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf and mips/mips64hf. -.It Va WITH_CLANG_BOOTSTRAP -Set to build the Clang C/C++ compiler during the bootstrap phase of the build. -.Pp -This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_CLANG_EXTRAS Set to build additional clang and llvm tools, such as bugpoint and clang-format. @@ -376,18 +366,6 @@ Do not install links to the Clang C/C++ compiler as .Pa /usr/bin/c++ and .Pa /usr/bin/cpp . -.Pp -This is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf and mips/mips64hf. -.It Va WITH_CLANG_IS_CC -Install links to the Clang C/C++ compiler as -.Pa /usr/bin/cc , -.Pa /usr/bin/c++ -and -.Pa /usr/bin/cpp . -.Pp -This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_CPP Set to not build .Xr cpp 1 . @@ -458,7 +436,7 @@ Set to not build .Xr cxgbetool 8 .Pp This is a default setting on -arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. +arm/armv6, arm/armv7, mips/mips, mips/mips64, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_CXGBETOOL Set to build .Xr cxgbetool 8 @@ -619,7 +597,7 @@ and .Xr efivar 8 . .Pp This is a default setting on -mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. +mips/mips, mips/mips64, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. .It Va WITH_EFI Set to build .Xr efivar 3 @@ -698,12 +676,7 @@ Set to build .Xr gdb 1 . .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc and powerpc/powerpc64. -.It Va WITH
svn commit: r359458 - head/share/vt/fonts
Author: tsoome Date: Mon Mar 30 20:07:25 2020 New Revision: 359458 URL: https://svnweb.freebsd.org/changeset/base/359458 Log: gallant: pound sign (0xa3) is a bit broken. Add extra glyphs. I did add some more glyphs to provide box drawing and set of additional glyphs to provide better support for some code pages. Still does not quite match terminus. Modified: head/share/vt/fonts/gallant.hex Modified: head/share/vt/fonts/gallant.hex == --- head/share/vt/fonts/gallant.hex Mon Mar 30 20:05:09 2020 (r359457) +++ head/share/vt/fonts/gallant.hex Mon Mar 30 20:07:25 2020 (r359458) @@ -131,7 +131,7 @@ 007f:aaa05550aaa05550aaa05550aaa05550aaa05550aaa05550aaa05550aaa05550aaa05550aaa05550aaa05550 00a1:0600060006000600060006000600060006000600060006000600 00a2:01000100030002001f003780258064006c006800788039801f001000300020002000 -00a3:06000c00100010003000300030003e007c0018001800180018003f203fe031c0 +00a3:0f801cc018c01800180018007e007e0018001800180018003e207fe061c0 00a4:602077403b8011c030c030c038801dc02ee04060 00a5:f07060203040188018800d0006003fc006003fc00600060006000f00 00a6:060006000600060006000600060006000600060006000600060006000600060006000600 @@ -224,3 +224,282 @@ 00fd:03800f001c00f0f0602030403040188018800d000d000600060004000c00080078007000 00fe:e00060006000600060006f8071c060e06060606060606060604070807f006000600060006000f000 00ff:19801980f0f0602030403040188018800d000d000600060004000c00080078007000 +0100:1f801f80060006000b000b0009001180118010803fc020c0204040604060e0f0 +0101:0fc00fc00f8018c010c003c01cc030c030c030c039c01ee0 +0102:1b001b000e00060006000b000b0009001180118010803fc020c0204040604060e0f0 +0103:0d800d8007000f8018c010c003c01cc030c030c030c039c01ee0 +0104:060006000b000b0009001180118010803fc020c0204040604060e0f000c00180030001e0 +0105:0f8018c010c003c01cc030c030c030c039c01ee000c00180030001e0 +0106:030006000c000fc01060202020006000600060006000600060002000302018400f80 +0107:030006000c001f8031c020c06000600060006000704030c01f80 +0108:07000d800fc01060202020006000600060006000600060002000302018400f80 +0109:04000e001b0031801f8031c020c06000600060006000704030c01f80 +010a:060006000fc01060202020006000600060006000600060002000302018400f80 +010b:060006001f8031c020c06000600060006000704030c01f80 +010c:18c00d8007000fc01060202020006000600060006000600060002000302018400f80 +010d:31801b000e0004001f8031c020c06000600060006000704030c01f80 +010e:31801b000e00ff0061c060c06060606060606060606060606060606060406180fe00 +010f:31801b000e6004e00060006000600f6031e020e0606060606060606070e039601e70 +0110:ff0061c060c0606060606060fc60606060606060606060406180fe00 +0111:006000e0006007f000600f6031e020e0606060606060606070e039601e70 +0112:1f801f807fc0304030403000300030803f803080300030003000302030207fe0 +0113:1f801f800f0030c0606060607fe060006000300018600f80 +0114:0d800d8007007fc0304030403000300030803f803080300030003000302030207fe0 +0115:0d800d8007000f0030c0606060607fe060006000300018600f80 +0116:060006007fc0304030403000300030803f803080300030003000302030207fe0 +0117:060006000f0030c0606060607fe060006000300018600f80 +0118:7fc0304030403000300030803f803080300030003000302030207fe000c00180030001e0 +0119:0f0030c0606060607fe060006000300018600f8006000c0018000f00 +011a:18c00d8007007fc0304030403000300030803f803080300030003000302030207fe0 +011b:18c00d80070002000f0030c0606060607fe060006000300018600f80 +011c:07000d800fc0106020202000600060006000600061f060602060306018600f80 +011d:020007000d8018c01f2031e060c060c060c031803f0060007fc03fe02060402040207fc03f80 +011e:0d800d8007000fc0106020202000600060006000600061f060602060306018600f80 +011f:1b001b000e001f2031e060c060c060c031803f0060007fc03fe02060402040207fc03f80 +0120:030003000fc0106020202000600060006000600061f060602060306018600f80 +0121:060006001f2031e060c060c060c031803f0060007fc03f
svn commit: r359454 - head/share/man/man5
Author: emaste Date: Mon Mar 30 19:10:12 2020 New Revision: 359454 URL: https://svnweb.freebsd.org/changeset/base/359454 Log: elf.5: table markup fixes Suggested by 0mp in review D23982. Submitted by: 0mp Modified: head/share/man/man5/elf.5 Modified: head/share/man/man5/elf.5 == --- head/share/man/man5/elf.5 Mon Mar 30 18:43:05 2020(r359453) +++ head/share/man/man5/elf.5 Mon Mar 30 19:10:12 2020(r359454) @@ -1277,24 +1277,24 @@ This member specifies a constant addend used to comput stored into the relocatable field. .El .Ss Note Section -ELF note sections consist of entries with the following format. -.Bl -column -offset indent "Field" "Size" "Description" -.It Sy Field Ta Sy Size Ta Sy Description -.It namesz Ta 32 bits Ta Size of "name" -.It descsz Ta 32 bits Ta Size of "desc" -.It type Ta 32 bits Ta OS-dependent note type -.It name Ta namesz Ta Null-terminated originator name -.It desc Ta descsz Ta OS-dependent note data +ELF note sections consist of entries with the following format: +.Bl -column -offset indent "namesz" "32 bits" "Null-terminated originator name" +.Sy Field Ta Sy SizeTa Sy Description +.It Va namesz Ta 32 bitsTa Size of "name" +.It Va descsz Ta 32 bitsTa Size of "desc" +.It Va type Ta 32 bitsTa OS-dependent note type +.It Va name Ta Va namesz Ta Null-terminated originator name +.It Va desc Ta Va descsz Ta OS-dependent note data .El .Pp The -.Sy name +.Va name and -.Sy desc +.Va desc fields are padded to ensure 4-byte alignemnt. -.Sy namesz +.Va namesz and -.Sy descsz +.Va descsz specify the unpadded length. .Sh SEE ALSO .Xr as 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: r359453 - head/libexec/flua
Author: kevans Date: Mon Mar 30 18:43:05 2020 New Revision: 359453 URL: https://svnweb.freebsd.org/changeset/base/359453 Log: flua: enable readline bits, courtesy of libedit This is a nicer experience when attempting to run ad-hoc lua bits in the flua REPL. PR: 245121 MFC after:1 week Modified: head/libexec/flua/Makefile Modified: head/libexec/flua/Makefile == --- head/libexec/flua/Makefile Mon Mar 30 18:25:43 2020(r359452) +++ head/libexec/flua/Makefile Mon Mar 30 18:43:05 2020(r359453) @@ -24,4 +24,9 @@ SRCS+=lfs.c lposix.c CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" +# readline bits +CFLAGS+= -DLUA_USE_READLINE +CFLAGS+= -I${SRCTOP}/lib/libedit -I${SRCTOP}/contrib/libedit +LIBADD+= edit + .include ___ 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: r359452 - head/sys/fs/cuse
Author: hselasky Date: Mon Mar 30 18:25:43 2020 New Revision: 359452 URL: https://svnweb.freebsd.org/changeset/base/359452 Log: Fine grain locking inside the cuse(3) kernel module. Implement one mutex per cuse(3) server instance which also cover the clients belonging to the given server instance. This should significantly reduce the mutex congestion inside the cuse(3) kernel module when multiple servers are in use. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/fs/cuse/cuse.c Modified: head/sys/fs/cuse/cuse.c == --- head/sys/fs/cuse/cuse.c Mon Mar 30 18:24:07 2020(r359451) +++ head/sys/fs/cuse/cuse.c Mon Mar 30 18:25:43 2020(r359452) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2010-2017 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2010-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -114,6 +114,7 @@ struct cuse_server { TAILQ_HEAD(, cuse_server_dev) hdev; TAILQ_HEAD(, cuse_client) hcli; TAILQ_HEAD(, cuse_memory) hmem; + struct mtx mtx; struct cv cv; struct selinfo selinfo; pid_t pid; @@ -145,7 +146,7 @@ struct cuse_client { static MALLOC_DEFINE(M_CUSE, "cuse", "CUSE memory"); static TAILQ_HEAD(, cuse_server) cuse_server_head; -static struct mtx cuse_mtx; +static struct mtx cuse_global_mtx; static struct cdev *cuse_dev; static struct cuse_server *cuse_alloc_unit[CUSE_DEVICES_MAX]; static int cuse_alloc_unit_id[CUSE_DEVICES_MAX]; @@ -216,18 +217,30 @@ static void cuse_client_is_closing(struct cuse_client static int cuse_free_unit_by_id_locked(struct cuse_server *, int); static void -cuse_lock(void) +cuse_global_lock(void) { - mtx_lock(&cuse_mtx); + mtx_lock(&cuse_global_mtx); } static void -cuse_unlock(void) +cuse_global_unlock(void) { - mtx_unlock(&cuse_mtx); + mtx_unlock(&cuse_global_mtx); } static void +cuse_server_lock(struct cuse_server *pcs) +{ + mtx_lock(&pcs->mtx); +} + +static void +cuse_server_unlock(struct cuse_server *pcs) +{ + mtx_unlock(&pcs->mtx); +} + +static void cuse_cmd_lock(struct cuse_client_command *pccmd) { sx_xlock(&pccmd->sx); @@ -244,7 +257,7 @@ cuse_kern_init(void *arg) { TAILQ_INIT(&cuse_server_head); - mtx_init(&cuse_mtx, "cuse-mtx", NULL, MTX_DEF); + mtx_init(&cuse_global_mtx, "cuse-global-mtx", NULL, MTX_DEF); cuse_dev = make_dev(&cuse_server_devsw, 0, UID_ROOT, GID_OPERATOR, 0600, "cuse"); @@ -267,9 +280,9 @@ cuse_kern_uninit(void *arg) pause("DRAIN", 2 * hz); - cuse_lock(); + cuse_global_lock(); ptr = TAILQ_FIRST(&cuse_server_head); - cuse_unlock(); + cuse_global_unlock(); if (ptr == NULL) break; @@ -278,7 +291,7 @@ cuse_kern_uninit(void *arg) if (cuse_dev != NULL) destroy_dev(cuse_dev); - mtx_destroy(&cuse_mtx); + mtx_destroy(&cuse_global_mtx); } SYSUNINIT(cuse_kern_uninit, SI_SUB_DEVFS, SI_ORDER_ANY, cuse_kern_uninit, 0); @@ -293,14 +306,10 @@ cuse_server_get(struct cuse_server **ppcs) *ppcs = NULL; return (error); } - /* check if closing */ - cuse_lock(); if (pcs->is_closing) { - cuse_unlock(); *ppcs = NULL; return (EINVAL); } - cuse_unlock(); *ppcs = pcs; return (0); } @@ -426,14 +435,14 @@ cuse_server_alloc_memory(struct cuse_server *pcs, uint goto error_0; } - cuse_lock(); + cuse_server_lock(pcs); /* check if allocation number already exists */ TAILQ_FOREACH(temp, &pcs->hmem, entry) { if (temp->alloc_nr == alloc_nr) break; } if (temp != NULL) { - cuse_unlock(); + cuse_server_unlock(pcs); error = EBUSY; goto error_1; } @@ -441,7 +450,7 @@ cuse_server_alloc_memory(struct cuse_server *pcs, uint mem->page_count = page_count; mem->alloc_nr = alloc_nr; TAILQ_INSERT_TAIL(&pcs->hmem, mem, entry); - cuse_unlock(); + cuse_server_unlock(pcs); return (0); @@ -457,17 +466,17 @@ cuse_server_free_memory(struct cuse_server *pcs, uint3 { struct cuse_memory *mem; - cuse_lock(); + cuse_server_lock(pcs); TAILQ_FOREACH(mem, &pcs->hmem, entry) { if (mem->alloc_nr == alloc_nr) break; } if (mem == NULL) { - cuse_unlock(); + cuse_server_unlock(pcs);
svn commit: r359451 - head/sys/kern
Author: emaste Date: Mon Mar 30 18:24:07 2020 New Revision: 359451 URL: https://svnweb.freebsd.org/changeset/base/359451 Log: capabilities.conf: provide information about capmode permitted syscalls Reviewed by: jhb (earlier) MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D24118 Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf == --- head/sys/kern/capabilities.conf Mon Mar 30 18:15:36 2020 (r359450) +++ head/sys/kern/capabilities.conf Mon Mar 30 18:24:07 2020 (r359451) @@ -28,6 +28,11 @@ ## ## List of system calls enabled in capability mode, one name per line. ## +## System calls listed here operate either fully or partially in the absence +## of global namespaces or ambient authority. In capability mode system calls +## that operate only on global namespaces or require ambient authority have no +## utility and thus are not permitted. +## ## Notes: ## - sys_exit(2), abort2(2) and close(2) are very important. ## - Sorted alphabetically, please keep it that way. ___ 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: r359450 - head/sys/security/audit
Author: csjp Date: Mon Mar 30 18:15:36 2020 New Revision: 359450 URL: https://svnweb.freebsd.org/changeset/base/359450 Log: Make sure we convert internal audit records for thr_new into BSM records. MFC after:2 weeks Modified: head/sys/security/audit/audit_bsm.c Modified: head/sys/security/audit/audit_bsm.c == --- head/sys/security/audit/audit_bsm.c Mon Mar 30 17:38:13 2020 (r359449) +++ head/sys/security/audit/audit_bsm.c Mon Mar 30 18:15:36 2020 (r359450) @@ -1746,6 +1746,9 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_rec case AUE_CAP_GETMODE: break; + case AUE_THR_NEW: + break; + case AUE_NULL: default: printf("BSM conversion requested for unknown event %d\n", ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r359446 - head/sys/dev/sound/usb
Author: hselasky Date: Mon Mar 30 16:50:32 2020 New Revision: 359446 URL: https://svnweb.freebsd.org/changeset/base/359446 Log: Add support for multiple playback and recording devices per physical USB audio device. This requires some structural refactoring inside the driver, mostly about converting existing audio channel structures into arrays. The main audio mixer is provided by the first PCM instance. The non-first audio instances may only have a software mixer for PCM playback. Tested by:Horse Ma MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/usb/uaudio.c head/sys/dev/sound/usb/uaudio.h head/sys/dev/sound/usb/uaudio_pcm.c Modified: head/sys/dev/sound/usb/uaudio.c == --- head/sys/dev/sound/usb/uaudio.c Mon Mar 30 16:32:55 2020 (r359445) +++ head/sys/dev/sound/usb/uaudio.c Mon Mar 30 16:50:32 2020 (r359446) @@ -262,6 +262,8 @@ struct uaudio_chan { #defineCHAN_OP_START 1 #defineCHAN_OP_STOP 2 #defineCHAN_OP_DRAIN 3 + + uint8_t iface_index; }; #defineUMIDI_EMB_JACK_MAX 16 /* units */ @@ -347,37 +349,45 @@ struct uaudio_hid { #defineUAUDIO_SPDIF_OUT_96K0x04/* Out sample rate = 96K */ #defineUAUDIO_SPDIF_IN_MIX 0x10/* Input mix enable */ +#defineUAUDIO_MAX_CHILD 2 + +struct uaudio_softc_child { + device_t pcm_device; + struct mtx *mixer_lock; + struct snd_mixer *mixer_dev; + + uint32_t mix_info; + uint32_t recsrc_info; + + uint8_t pcm_registered:1; + uint8_t mixer_init:1; +}; + struct uaudio_softc { struct sbuf sc_sndstat; struct sndcard_func sc_sndcard_func; - struct uaudio_chan sc_rec_chan; - struct uaudio_chan sc_play_chan; + struct uaudio_chan sc_rec_chan[UAUDIO_MAX_CHILD]; + struct uaudio_chan sc_play_chan[UAUDIO_MAX_CHILD]; struct umidi_chan sc_midi_chan; struct uaudio_hid sc_hid; struct uaudio_search_result sc_mixer_clocks; struct uaudio_mixer_node sc_mixer_node; struct uaudio_configure_msg sc_config_msg[2]; + struct uaudio_softc_child sc_child[UAUDIO_MAX_CHILD]; - struct mtx *sc_mixer_lock; - struct snd_mixer *sc_mixer_dev; struct usb_device *sc_udev; struct usb_xfer *sc_mixer_xfer[1]; struct uaudio_mixer_node *sc_mixer_root; struct uaudio_mixer_node *sc_mixer_curr; int (*sc_set_spdif_fn) (struct uaudio_softc *, int); - uint32_t sc_mix_info; - uint32_t sc_recsrc_info; - uint16_t sc_audio_rev; uint16_t sc_mixer_count; - uint8_t sc_sndstat_valid; uint8_t sc_mixer_iface_index; uint8_t sc_mixer_iface_no; uint8_t sc_mixer_chan; - uint8_t sc_pcm_registered:1; - uint8_t sc_mixer_init:1; + uint8_t sc_sndstat_valid:1; uint8_t sc_uq_audio_swap_lr:1; uint8_t sc_uq_au_inp_async:1; uint8_t sc_uq_au_no_xu:1; @@ -477,7 +487,7 @@ static usb_proc_callback_t uaudio_configure_msg; static int uaudio_mixer_sysctl_handler(SYSCTL_HANDLER_ARGS); static void uaudio_mixer_ctl_free(struct uaudio_softc *); -static void uaudio_mixer_register_sysctl(struct uaudio_softc *, device_t); +static void uaudio_mixer_register_sysctl(struct uaudio_softc *, device_t, unsigned); static void uaudio_mixer_reload_all(struct uaudio_softc *); static void uaudio_mixer_controls_create_ftu(struct uaudio_softc *); @@ -537,7 +547,7 @@ static void uaudio_mixer_add_ctl(struct uaudio_softc * static voiduaudio_mixer_fill_info(struct uaudio_softc *, struct usb_device *, void *); static int uaudio_mixer_signext(uint8_t, int); -static voiduaudio_mixer_init(struct uaudio_softc *); +static voiduaudio_mixer_init(struct uaudio_softc *, unsigned); static uint8_t umidi_convert_to_usb(struct umidi_sub_chan *, uint8_t, uint8_t); static struct umidi_sub_chan *umidi_sub_by_fifo(struct usb_fifo *); static voidumidi_start_read(struct usb_fifo *); @@ -827,6 +837,33 @@ static const STRUCT_USB_HOST_ID __used uaudio_devs[] = USB_IFACE_SUBCLASS(UISUBCLASS_MIDISTREAM),}, }; +static unsigned +uaudio_get_child_index_by_dev(struct uaudio_softc *sc, device_t dev) +{ + unsigned i; + + for (i = 0; i != UAUDIO_MAX_CHILD; i++) { + if (dev == sc->sc_child[i].pcm_device) + return (i); + } + panic("uaudio_get_child_index_dev: Invalid device: %p\n", dev); + return (0); +} + +static unsigned +uaudio_get_child_index_by_chan(struct uaudio_softc *sc, struct uaudio_chan *ch) +{ + unsigned i; + + for (i = 0; i != UAUDIO_MAX_CHILD; i++) { + if ((sc->sc_play_chan + i) == ch || + (sc->sc_rec_chan + i) == ch) + return (i); + } + panic("u
svn commit: r359449 - head/usr.sbin/bluetooth/hccontrol
Author: emaste Date: Mon Mar 30 17:38:13 2020 New Revision: 359449 URL: https://svnweb.freebsd.org/changeset/base/359449 Log: correct 'disble' typo in hccontrol PR: 245125 Submitted by: Marc Veldman MFC after:1 week Modified: head/usr.sbin/bluetooth/hccontrol/le.c Modified: head/usr.sbin/bluetooth/hccontrol/le.c == --- head/usr.sbin/bluetooth/hccontrol/le.c Mon Mar 30 17:11:21 2020 (r359448) +++ head/usr.sbin/bluetooth/hccontrol/le.c Mon Mar 30 17:38:13 2020 (r359449) @@ -306,7 +306,7 @@ int le_enable(int s, int argc, char *argv[]) set_event_mask(s, NG_HCI_EVENT_MASK_DEFAULT | NG_HCI_EVENT_MASK_LE); set_le_event_mask(s, NG_HCI_LE_EVENT_MASK_ALL); - } else if (strcasecmp(argv[0], "disble") == 0) + } else if (strcasecmp(argv[0], "disable") == 0) set_event_mask(s, NG_HCI_EVENT_MASK_DEFAULT); else return USAGE; ___ 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: r359445 - head/sys/powerpc/booke
Author: jhibbits Date: Mon Mar 30 16:32:55 2020 New Revision: 359445 URL: https://svnweb.freebsd.org/changeset/base/359445 Log: powerpc/pmap: Replace a logical TAILQ_FOREACH_SAFE with the real thing No functional change, just cleanup. Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c == --- head/sys/powerpc/booke/pmap.c Mon Mar 30 16:24:05 2020 (r359444) +++ head/sys/powerpc/booke/pmap.c Mon Mar 30 16:32:55 2020 (r359445) @@ -1597,9 +1597,7 @@ mmu_booke_remove_all(mmu_t mmu, vm_page_t m) uint8_t hold_flag; rw_wlock(&pvh_global_lock); - for (pv = TAILQ_FIRST(&m->md.pv_list); pv != NULL; pv = pvn) { - pvn = TAILQ_NEXT(pv, pv_link); - + TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_link, pvn) { PMAP_LOCK(pv->pv_pmap); hold_flag = PTBL_HOLD_FLAG(pv->pv_pmap); pte_remove(mmu, pv->pv_pmap, pv->pv_va, hold_flag); ___ 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: r359444 - head/share/mk
Author: jhibbits Date: Mon Mar 30 16:24:05 2020 New Revision: 359444 URL: https://svnweb.freebsd.org/changeset/base/359444 Log: powerpc: --secure-plt only needs to pass to ld.bfd, not ld.lld ld.lld only supports secure-plt for powerpc, so no need to pass the argument in. Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk == --- head/share/mk/bsd.cpu.mkMon Mar 30 16:22:16 2020(r359443) +++ head/share/mk/bsd.cpu.mkMon Mar 30 16:24:05 2020(r359444) @@ -340,7 +340,7 @@ CFLAGS += -mfloat-abi=softfp .endif .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe" -LDFLAGS+= -Wl,--secure-plt +LDFLAGS.bfd+= -Wl,--secure-plt .endif .if ${MACHINE_ARCH} == "powerpcspe" ___ 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: r359443 - head/contrib/bmake
Author: kevans Date: Mon Mar 30 16:22:16 2020 New Revision: 359443 URL: https://svnweb.freebsd.org/changeset/base/359443 Log: MFV r359442: bmake: import -fno-common fix build back from upstream sjg@ committed the local patch previously committed upstream; pull it in to vendor/ to ease any potential stress of future imports. Modified: head/contrib/bmake/main.c head/contrib/bmake/make.h Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/main.c == --- head/contrib/bmake/main.c Mon Mar 30 16:20:04 2020(r359442) +++ head/contrib/bmake/main.c Mon Mar 30 16:22:16 2020(r359443) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $ */ +/* $NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -199,7 +199,7 @@ char *makeDependfile; pid_t myPid; int makelevel; -FILE *debug_file; +FILE *debug_file; Boolean forceJobs = FALSE; Modified: head/contrib/bmake/make.h == --- head/contrib/bmake/make.h Mon Mar 30 16:20:04 2020(r359442) +++ head/contrib/bmake/make.h Mon Mar 30 16:22:16 2020(r359443) @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.104 2018/02/12 21:38:09 sjg Exp $ */ +/* $NetBSD: make.h,v 1.105 2020/03/30 02:41:06 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 ___ 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: r359440 - head/sys/dev/sound/pcm
Author: hselasky Date: Mon Mar 30 15:36:38 2020 New Revision: 359440 URL: https://svnweb.freebsd.org/changeset/base/359440 Log: Implement new mixer API to return the device pointer based on the mixer pointer. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/pcm/mixer.c head/sys/dev/sound/pcm/mixer.h Modified: head/sys/dev/sound/pcm/mixer.c == --- head/sys/dev/sound/pcm/mixer.c Mon Mar 30 15:29:39 2020 (r359439) +++ head/sys/dev/sound/pcm/mixer.c Mon Mar 30 15:36:38 2020 (r359440) @@ -1032,6 +1032,14 @@ mix_get_type(struct snd_mixer *m) return (m->type); } +device_t +mix_get_dev(struct snd_mixer *m) +{ + KASSERT(m != NULL, ("NULL snd_mixer")); + + return (m->dev); +} + /* --- */ static int Modified: head/sys/dev/sound/pcm/mixer.h == --- head/sys/dev/sound/pcm/mixer.h Mon Mar 30 15:29:39 2020 (r359439) +++ head/sys/dev/sound/pcm/mixer.h Mon Mar 30 15:36:38 2020 (r359440) @@ -56,6 +56,7 @@ int mix_get(struct snd_mixer *m, u_int dev); int mix_setrecsrc(struct snd_mixer *m, u_int32_t src); u_int32_t mix_getrecsrc(struct snd_mixer *m); int mix_get_type(struct snd_mixer *m); +device_t mix_get_dev(struct snd_mixer *m); void mix_setdevs(struct snd_mixer *m, u_int32_t v); void mix_setrecdevs(struct snd_mixer *m, u_int32_t v); ___ 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: r359441 - in head/sys: arm/nvidia/drm2 dev/bnxt dev/bxe dev/etherswitch/mtkswitch dev/hptnr dev/nvme dev/ocs_fc dev/pms/RefTisa/discovery/dm dev/pms/RefTisa/sallsdk/spc dev/pms/RefTisa/...
Author: emaste Date: Mon Mar 30 16:04:25 2020 New Revision: 359441 URL: https://svnweb.freebsd.org/changeset/base/359441 Log: remove extraneous double ;s in sys/ Modified: head/sys/arm/nvidia/drm2/tegra_dc.c head/sys/arm/nvidia/drm2/tegra_hdmi.c head/sys/dev/bnxt/bnxt_hwrm.c head/sys/dev/bnxt/bnxt_sysctl.c head/sys/dev/bxe/bxe.c head/sys/dev/etherswitch/mtkswitch/mtkswitch_mt7620.c head/sys/dev/hptnr/hptnr_os_bsd.c head/sys/dev/nvme/nvme_qpair.c head/sys/dev/ocs_fc/ocs_hw_queues.c head/sys/dev/ocs_fc/ocs_io.c head/sys/dev/ocs_fc/ocs_mgmt.c head/sys/dev/ocs_fc/ocs_node.c head/sys/dev/pms/RefTisa/discovery/dm/dmdisc.c head/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c head/sys/dev/pms/RefTisa/tisa/sassata/common/ossacmnapi.c head/sys/dev/pms/RefTisa/tisa/sassata/common/tdmisc.c head/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itddisc.c head/sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c head/sys/dev/qlxgbe/ql_hw.c head/sys/dev/smartpqi/smartpqi_queue.c head/sys/dev/smartpqi/smartpqi_request.c head/sys/dev/vnic/thunder_bgx.c head/sys/net/if_me.c Modified: head/sys/arm/nvidia/drm2/tegra_dc.c == --- head/sys/arm/nvidia/drm2/tegra_dc.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/arm/nvidia/drm2/tegra_dc.c Mon Mar 30 16:04:25 2020 (r359441) @@ -384,7 +384,7 @@ dc_setup_window(struct dc_softc *sc, unsigned int inde v_size = win->src_w; } - h_offset = win->src_x * bpp;; + h_offset = win->src_x * bpp; v_offset = win->src_y; if (win->flip_x) { h_offset += win->src_w * bpp - 1; Modified: head/sys/arm/nvidia/drm2/tegra_hdmi.c == --- head/sys/arm/nvidia/drm2/tegra_hdmi.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/arm/nvidia/drm2/tegra_hdmi.c Mon Mar 30 16:04:25 2020 (r359441) @@ -341,7 +341,7 @@ static void avi_setup_infoframe(struct hdmi_softc *sc, struct drm_display_mode *mode) { struct hdmi_avi_infoframe frame; - uint8_t buf[17], *hdr, *pb;; + uint8_t buf[17], *hdr, *pb; ssize_t rv; rv = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode); Modified: head/sys/dev/bnxt/bnxt_hwrm.c == --- head/sys/dev/bnxt/bnxt_hwrm.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/bnxt/bnxt_hwrm.c Mon Mar 30 16:04:25 2020 (r359441) @@ -861,7 +861,7 @@ bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt_softc *softc, struct hwrm_cfa_l2_set_rx_mask_input req = {0}; struct bnxt_vlan_tag *tag; uint32_t *tags; - uint32_t num_vlan_tags = 0;; + uint32_t num_vlan_tags = 0; uint32_t i; uint32_t mask = vnic->rx_mask; int rc; Modified: head/sys/dev/bnxt/bnxt_sysctl.c == --- head/sys/dev/bnxt/bnxt_sysctl.c Mon Mar 30 15:36:38 2020 (r359440) +++ head/sys/dev/bnxt/bnxt_sysctl.c Mon Mar 30 16:04:25 2020 (r359441) @@ -1204,7 +1204,7 @@ bnxt_create_config_sysctls_pre(struct bnxt_softc *soft struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(softc->dev); struct sysctl_oid_list *children; - children = SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev));; + children = SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev)); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "rss_key", CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, @@ -1409,7 +1409,7 @@ bnxt_create_config_sysctls_post(struct bnxt_softc *sof struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(softc->dev); struct sysctl_oid_list *children; - children = SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev));; + children = SYSCTL_CHILDREN(device_get_sysctl_tree(softc->dev)); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "vlan_only", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, softc, 0, Modified: head/sys/dev/bxe/bxe.c == --- head/sys/dev/bxe/bxe.c Mon Mar 30 15:36:38 2020(r359440) +++ head/sys/dev/bxe/bxe.c Mon Mar 30 16:04:25 2020(r359441) @@ -15939,7 +15939,7 @@ static void bxe_force_link_reset(struct bxe_softc *sc) static int bxe_sysctl_pauseparam(SYSCTL_HANDLER_ARGS) { -struct bxe_softc *sc = (struct bxe_softc *)arg1;; +struct bxe_softc *sc = (struct bxe_softc *)arg1; uint32_t cfg_idx = bxe_get_link_cfg_idx(sc); int rc = 0; int error; Modified: head/sys/dev/etherswitch/mtkswitch/mtkswitch_mt7620.c == ---
svn commit: r359439 - head/sys/dev/usb/input
Author: hselasky Date: Mon Mar 30 15:29:39 2020 New Revision: 359439 URL: https://svnweb.freebsd.org/changeset/base/359439 Log: Evaluate modifier keys before the regular keys, so that if a modifier key is pressed at the same time as a regular key, that means key with modifier is output. Some automated USB keyboards like Yubikeys need this. This fixes a regression issue after r357861. Reported by: Adam McDougall PR: 224592 PR: 233884 MFC after:3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c == --- head/sys/dev/usb/input/ukbd.c Mon Mar 30 14:24:03 2020 (r359438) +++ head/sys/dev/usb/input/ukbd.c Mon Mar 30 15:29:39 2020 (r359439) @@ -499,6 +499,21 @@ ukbd_interrupt(struct ukbd_softc *sc) UKBD_LOCK_ASSERT(); + /* Check for modifier key changes first */ + for (key = 0xe0; key != 0xe8; key++) { + const uint64_t mask = 1ULL << (key % 64); + const uint64_t delta = + sc->sc_odata.bitmap[key / 64] ^ + sc->sc_ndata.bitmap[key / 64]; + + if (delta & mask) { + if (sc->sc_odata.bitmap[key / 64] & mask) + ukbd_put_key(sc, key | KEY_RELEASE); + else + ukbd_put_key(sc, key | KEY_PRESS); + } + } + /* Check for key changes */ for (key = 0; key != UKBD_NKEYCODE; key++) { const uint64_t mask = 1ULL << (key % 64); @@ -509,6 +524,8 @@ ukbd_interrupt(struct ukbd_softc *sc) if (mask == 1 && delta == 0) { key += 63; continue; /* skip empty areas */ + } else if (ukbd_is_modifier_key(key)) { + continue; } else if (delta & mask) { if (sc->sc_odata.bitmap[key / 64] & mask) { ukbd_put_key(sc, key | KEY_RELEASE); @@ -518,9 +535,6 @@ ukbd_interrupt(struct ukbd_softc *sc) sc->sc_repeat_key = 0; } else { ukbd_put_key(sc, key | KEY_PRESS); - - if (ukbd_is_modifier_key(key)) - continue; sc->sc_co_basetime = sbinuptime(); sc->sc_delay = sc->sc_kbd.kb_delay1; ___ 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: r359436 - in head/sys: kern net sys
Author: markj Date: Mon Mar 30 14:22:52 2020 New Revision: 359436 URL: https://svnweb.freebsd.org/changeset/base/359436 Log: Simplify taskqgroup inititialization. taskqgroup initialization was broken into two steps: 1. allocate the taskqgroup structure, at SI_SUB_TASKQ; 2. initialize taskqueues, start taskqueue threads, enqueue "binder" tasks to bind threads to specific CPUs, at SI_SUB_SMP. Step 2 tries to handle the case where tasks have already been attached to a queue, by migrating them to their intended queue. In particular, tasks can't be enqueued before step 2 has completed. This breaks NFS mountroot on systems using an iflib-based driver when EARLY_AP_STARTUP is not defined, since mountroot happens before SI_SUB_SMP in this case. Simplify initialization: do all initialization except for CPU binding at SI_SUB_TASKQ. This means that until CPU binding is completed, group tasks may be executed on a CPU other than that to which they were bound, but this should not be a problem for existing users of the taskqgroup KPIs. Reported by: sbruno Tested by:bdragon, sbruno MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D24188 Modified: head/sys/kern/subr_gtaskqueue.c head/sys/net/iflib.c head/sys/sys/gtaskqueue.h Modified: head/sys/kern/subr_gtaskqueue.c == --- head/sys/kern/subr_gtaskqueue.c Mon Mar 30 14:03:35 2020 (r359435) +++ head/sys/kern/subr_gtaskqueue.c Mon Mar 30 14:22:52 2020 (r359436) @@ -170,7 +170,7 @@ gtaskqueue_terminate(struct thread **pp, struct gtaskq } } -static void +static void __unused gtaskqueue_free(struct gtaskqueue *queue) { @@ -591,18 +591,16 @@ gtaskqueue_create_fast(const char *name, int mflags, } struct taskqgroup_cpu { - LIST_HEAD(, grouptask) tgc_tasks; - struct gtaskqueue *tgc_taskq; - int tgc_cnt; - int tgc_cpu; + LIST_HEAD(, grouptask) tgc_tasks; + struct gtaskqueue *tgc_taskq; + int tgc_cnt; + int tgc_cpu; }; struct taskqgroup { struct taskqgroup_cpu tqg_queue[MAXCPU]; struct mtx tqg_lock; const char *tqg_name; - int tqg_adjusting; - int tqg_stride; int tqg_cnt; }; @@ -625,13 +623,6 @@ taskqgroup_cpu_create(struct taskqgroup *qgroup, int i qcpu->tgc_cpu = cpu; } -static void -taskqgroup_cpu_remove(struct taskqgroup *qgroup, int idx) -{ - - gtaskqueue_free(qgroup->tqg_queue[idx].tgc_taskq); -} - /* * Find the taskq with least # of tasks that doesn't currently have any * other queues from the uniq identifier. @@ -644,22 +635,22 @@ taskqgroup_find(struct taskqgroup *qgroup, void *uniq) int strict; mtx_assert(&qgroup->tqg_lock, MA_OWNED); - if (qgroup->tqg_cnt == 0) - return (0); - idx = -1; - mincnt = INT_MAX; + KASSERT(qgroup->tqg_cnt != 0, + ("qgroup %s has no queues", qgroup->tqg_name)); + /* -* Two passes; First scan for a queue with the least tasks that +* Two passes: first scan for a queue with the least tasks that * does not already service this uniq id. If that fails simply find -* the queue with the least total tasks; +* the queue with the least total tasks. */ - for (strict = 1; mincnt == INT_MAX; strict = 0) { + for (idx = -1, mincnt = INT_MAX, strict = 1; mincnt == INT_MAX; + strict = 0) { for (i = 0; i < qgroup->tqg_cnt; i++) { if (qgroup->tqg_queue[i].tgc_cnt > mincnt) continue; if (strict) { - LIST_FOREACH(n, - &qgroup->tqg_queue[i].tgc_tasks, gt_list) + LIST_FOREACH(n, &qgroup->tqg_queue[i].tgc_tasks, + gt_list) if (n->gt_uniq == uniq) break; if (n != NULL) @@ -675,37 +666,15 @@ taskqgroup_find(struct taskqgroup *qgroup, void *uniq) return (idx); } -/* - * smp_started is unusable since it is not set for UP kernels or even for - * SMP kernels when there is 1 CPU. This is usually handled by adding a - * (mp_ncpus == 1) test, but that would be broken here since we need to - * to synchronize with the SI_SUB_SMP ordering. Even in the pure SMP case - * smp_started only gives a fuzzy ordering relative to SI_SUB_SMP. - * - * So maintain our own flag. It must be set after all CPUs are started - * and before SI_SUB_SMP:SI_ORDER_ANY so that the SYSINIT for delayed - * adjustment is properly delayed. SI_ORDER_FOURTH is
svn commit: r359438 - in head/sys: dev/hwpmc kern netinet netinet6 sys
Author: markj Date: Mon Mar 30 14:24:03 2020 New Revision: 359438 URL: https://svnweb.freebsd.org/changeset/base/359438 Log: Remove the "config" taskqgroup and its KPIs. Equivalent functionality is already provided by taskqueue(9), just use that instead. MFC after:2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/hwpmc/hwpmc_mod.c head/sys/kern/subr_gtaskqueue.c head/sys/netinet/in_mcast.c head/sys/netinet6/in6_mcast.c head/sys/sys/gtaskqueue.h Modified: head/sys/dev/hwpmc/hwpmc_mod.c == --- head/sys/dev/hwpmc/hwpmc_mod.c Mon Mar 30 14:23:08 2020 (r359437) +++ head/sys/dev/hwpmc/hwpmc_mod.c Mon Mar 30 14:24:03 2020 (r359438) @@ -36,9 +36,9 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include -#include #include #include #include @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include /* needs to be after */ @@ -187,7 +187,7 @@ static int pmc_threadfreelist_entries=0; /* * Task to free thread descriptors */ -static struct grouptask free_gtask; +static struct task free_task; /* * A map of row indices to classdep structures. @@ -2413,15 +2413,15 @@ pmc_thread_descriptor_pool_free(struct pmc_thread *pt) LIST_INSERT_HEAD(&pmc_threadfreelist, pt, pt_next); pmc_threadfreelist_entries++; if (pmc_threadfreelist_entries > pmc_threadfreelist_max) - GROUPTASK_ENQUEUE(&free_gtask); + taskqueue_enqueue(taskqueue_fast, &free_task); mtx_unlock_spin(&pmc_threadfreelist_mtx); } /* - * A callout to manage the free list. + * An asynchronous task to manage the free list. */ static void -pmc_thread_descriptor_pool_free_task(void *arg __unused) +pmc_thread_descriptor_pool_free_task(void *arg __unused, int pending __unused) { struct pmc_thread *pt; LIST_HEAD(, pmc_thread) tmplist; @@ -5717,11 +5717,8 @@ pmc_initialize(void) mtx_init(&pmc_threadfreelist_mtx, "pmc-threadfreelist", "pmc-leaf", MTX_SPIN); - /* -* Initialize the callout to monitor the thread free list. -* This callout will also handle the initial population of the list. -*/ - taskqgroup_config_gtask_init(NULL, &free_gtask, pmc_thread_descriptor_pool_free_task, "thread descriptor pool free task"); + /* Initialize the task to prune the thread free list. */ + TASK_INIT(&free_task, 0, pmc_thread_descriptor_pool_free_task, NULL); /* register process {exit,fork,exec} handlers */ pmc_exit_tag = EVENTHANDLER_REGISTER(process_exit, @@ -5820,6 +5817,7 @@ pmc_cleanup(void) } /* reclaim allocated data structures */ + taskqueue_drain(taskqueue_fast, &free_task); mtx_destroy(&pmc_threadfreelist_mtx); pmc_thread_descriptor_pool_drain(); @@ -5827,7 +5825,6 @@ pmc_cleanup(void) mtx_pool_destroy(&pmc_mtxpool); mtx_destroy(&pmc_processhash_mtx); - taskqgroup_config_gtask_deinit(&free_gtask); if (pmc_processhash) { #ifdef HWPMC_DEBUG struct pmc_process *pp; Modified: head/sys/kern/subr_gtaskqueue.c == --- head/sys/kern/subr_gtaskqueue.c Mon Mar 30 14:23:08 2020 (r359437) +++ head/sys/kern/subr_gtaskqueue.c Mon Mar 30 14:24:03 2020 (r359438) @@ -55,7 +55,6 @@ static inttask_is_running(struct gtaskqueue *queue, s static voidgtaskqueue_drain_locked(struct gtaskqueue *queue, struct gtask *gtask); TASKQGROUP_DEFINE(softirq, mp_ncpus, 1); -TASKQGROUP_DEFINE(config, 1, 1); struct gtaskqueue_busy { struct gtask*tb_running; @@ -817,21 +816,4 @@ taskqgroup_create(const char *name, int cnt, int strid void taskqgroup_destroy(struct taskqgroup *qgroup) { - -} - -void -taskqgroup_config_gtask_init(void *ctx, struct grouptask *gtask, gtask_fn_t *fn, -const char *name) -{ - - GROUPTASK_INIT(gtask, 0, fn, ctx); - taskqgroup_attach(qgroup_config, gtask, gtask, NULL, NULL, name); -} - -void -taskqgroup_config_gtask_deinit(struct grouptask *gtask) -{ - - taskqgroup_detach(qgroup_config, gtask); } Modified: head/sys/netinet/in_mcast.c == --- head/sys/netinet/in_mcast.c Mon Mar 30 14:23:08 2020(r359437) +++ head/sys/netinet/in_mcast.c Mon Mar 30 14:24:03 2020(r359438) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -224,24 +223,17 @@ inm_is_ifp_detached(const struct in_multi *inm) } #endif -static struct grouptask free_gtask; -static struct in_multi_head inm_free_list; -static void inm_release_task(void *arg __unused); -static void inm_init(void) +stat
svn commit: r359437 - head/sys/dev/hwpmc
Author: markj Date: Mon Mar 30 14:23:08 2020 New Revision: 359437 URL: https://svnweb.freebsd.org/changeset/base/359437 Log: Fix accounting of hwpmc's thread descriptor freelist. MFC after:1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c == --- head/sys/dev/hwpmc/hwpmc_mod.c Mon Mar 30 14:22:52 2020 (r359436) +++ head/sys/dev/hwpmc/hwpmc_mod.c Mon Mar 30 14:23:08 2020 (r359437) @@ -2428,12 +2428,13 @@ pmc_thread_descriptor_pool_free_task(void *arg __unuse int delta; LIST_INIT(&tmplist); + /* Determine what changes, if any, we need to make. */ mtx_lock_spin(&pmc_threadfreelist_mtx); delta = pmc_threadfreelist_entries - pmc_threadfreelist_max; - while (delta > 0 && - (pt = LIST_FIRST(&pmc_threadfreelist)) != NULL) { + while (delta > 0 && (pt = LIST_FIRST(&pmc_threadfreelist)) != NULL) { delta--; + pmc_threadfreelist_entries--; LIST_REMOVE(pt, pt_next); LIST_INSERT_HEAD(&tmplist, pt, pt_next); } ___ 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: r359435 - head/sys/fs/fuse
Author: asomers Date: Mon Mar 30 14:03:35 2020 New Revision: 359435 URL: https://svnweb.freebsd.org/changeset/base/359435 Log: fusefs: add a dtrace probe that fires after mounting is complete This probe is useful for showing the protocol options negotiated with a FUSE server. MFC after:2 weeks Modified: head/sys/fs/fuse/fuse_internal.c Modified: head/sys/fs/fuse/fuse_internal.c == --- head/sys/fs/fuse/fuse_internal.cMon Mar 30 03:26:52 2020 (r359434) +++ head/sys/fs/fuse/fuse_internal.cMon Mar 30 14:03:35 2020 (r359435) @@ -959,6 +959,8 @@ fuse_internal_vnode_disappear(struct vnode *vp) /* fuse start/stop */ +SDT_PROBE_DEFINE2(fusefs, , internal, init_done, + "struct fuse_data*", "struct fuse_init_out*"); int fuse_internal_init_callback(struct fuse_ticket *tick, struct uio *uio) { @@ -1043,6 +1045,7 @@ out: } FUSE_LOCK(); data->dataflags |= FSESS_INITED; + SDT_PROBE2(fusefs, , internal, init_done, data, fiio); wakeup(&data->ticketer); FUSE_UNLOCK(); ___ 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"