svn commit: r349031 - head/sys/arm64/arm64
Author: alc Date: Fri Jun 14 04:01:08 2019 New Revision: 349031 URL: https://svnweb.freebsd.org/changeset/base/349031 Log: Change the arm64 pmap so that updates to the global count of wired pages are not performed directly by the pmap. Instead, they are performed by vm_page_free_pages_toq(). (This is the same approach that we use on x86.) Reviewed by: kib, markj MFC after:10 days Differential Revision:https://reviews.freebsd.org/D20627 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c == --- head/sys/arm64/arm64/pmap.c Fri Jun 14 03:15:54 2019(r349030) +++ head/sys/arm64/arm64/pmap.c Fri Jun 14 04:01:08 2019(r349031) @@ -1410,8 +1410,6 @@ _pmap_unwire_l3(pmap_t pmap, vm_offset_t va, vm_page_t } pmap_invalidate_page(pmap, va); - vm_wire_sub(1); - /* * Put page on a list so that it is released after * *ALL* TLB shootdown is done @@ -2030,9 +2028,8 @@ next_chunk: SLIST_REMOVE_HEAD(, plinks.s.ss); /* Recycle a freed page table page. */ m_pc->wire_count = 1; - vm_wire_add(1); } - vm_page_free_pages_toq(, false); + vm_page_free_pages_toq(, true); return (m_pc); } @@ -2470,8 +2467,7 @@ pmap_remove_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_ pmap_resident_count_dec(pmap, 1); KASSERT(ml3->wire_count == NL3PG, ("pmap_remove_l2: l3 page wire count error")); - ml3->wire_count = 1; - vm_page_unwire_noq(ml3); + ml3->wire_count = 0; pmap_add_delayed_free_list(ml3, free, FALSE); } } @@ -2624,7 +2620,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t if (lock != NULL) rw_wunlock(lock); PMAP_UNLOCK(pmap); - vm_page_free_pages_toq(, false); + vm_page_free_pages_toq(, true); } /* @@ -2729,7 +2725,7 @@ retry: } vm_page_aflag_clear(m, PGA_WRITEABLE); rw_wunlock(lock); - vm_page_free_pages_toq(, false); + vm_page_free_pages_toq(, true); } /* @@ -3397,7 +3393,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t lockp) != 0) break; } - vm_page_free_pages_toq(, false); + vm_page_free_pages_toq(, true); if (va >= VM_MAXUSER_ADDRESS) { /* * Both pmap_remove_l2() and pmap_remove_l3() will @@ -3425,7 +3421,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t * Invalidate those entries. */ pmap_invalidate_page(pmap, va); - vm_page_free_pages_toq(, false); + vm_page_free_pages_toq(, true); } CTR2(KTR_PMAP, "pmap_enter_l2: failure for va %#lx in pmap %p", @@ -3614,7 +3610,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v SLIST_INIT(); if (pmap_unwire_l3(pmap, va, mpte, )) { pmap_invalidate_page(pmap, va); - vm_page_free_pages_toq(, false); + vm_page_free_pages_toq(, true); } mpte = NULL; } @@ -4097,8 +4093,7 @@ pmap_remove_pages(pmap_t pmap) pmap_resident_count_dec(pmap,1); KASSERT(ml3->wire_count == NL3PG, ("pmap_remove_pages: l3 page wire count error")); - ml3->wire_count = 1; - vm_page_unwire_noq(ml3); + ml3->wire_count = 0; pmap_add_delayed_free_list(ml3, , FALSE); } @@ -4136,7 +4131,7 @@ pmap_remove_pages(pmap_t pmap) if (lock != NULL) rw_wunlock(lock); PMAP_UNLOCK(pmap); - vm_page_free_pages_toq(, false); + vm_page_free_pages_toq(, true); } /* @@ -4596,7 +4591,7 @@ small_mappings: not_cleared < PMAP_TS_REFERENCED_MAX); out: rw_wunlock(lock); - vm_page_free_pages_toq(, false); + vm_page_free_pages_toq(, true); return (cleared + not_cleared); } @@ -5019,7 +5014,7 @@ pmap_demote_l2_abort(pmap_t pmap, vm_offset_t
svn commit: r349030 - head/sys/vm
Author: dougm Date: Fri Jun 14 03:15:54 2019 New Revision: 349030 URL: https://svnweb.freebsd.org/changeset/base/349030 Log: Avoid using the prev field of vm_map_entry_t in two functions that iterate over consecutive vm_map entries, and that can easily just 'remember' the prev value instead of looking it up. Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D20628 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c == --- head/sys/vm/vm_map.cFri Jun 14 01:09:10 2019(r349029) +++ head/sys/vm/vm_map.cFri Jun 14 03:15:54 2019(r349030) @@ -734,18 +734,17 @@ SYSCTL_INT(_debug, OID_AUTO, vmmap_check, CTLFLAG_RWTU static void _vm_map_assert_consistent(vm_map_t map) { - vm_map_entry_t entry; - vm_map_entry_t child; + vm_map_entry_t child, entry, prev; vm_size_t max_left, max_right; if (!enable_vmmap_check) return; - for (entry = map->header.next; entry != >header; - entry = entry->next) { - KASSERT(entry->prev->end <= entry->start, + for (prev = >header; (entry = prev->next) != >header; + prev = entry) { + KASSERT(prev->end <= entry->start, ("map %p prev->end = %jx, start = %jx", map, - (uintmax_t)entry->prev->end, (uintmax_t)entry->start)); + (uintmax_t)prev->end, (uintmax_t)entry->start)); KASSERT(entry->start < entry->end, ("map %p start = %jx, end = %jx", map, (uintmax_t)entry->start, (uintmax_t)entry->end)); @@ -762,7 +761,7 @@ _vm_map_assert_consistent(vm_map_t map) (uintmax_t)entry->start, (uintmax_t)entry->right->start)); child = entry->left; max_left = (child != NULL) ? child->max_free : - entry->start - entry->prev->end; + entry->start - prev->end; child = entry->right; max_right = (child != NULL) ? child->max_free : entry->next->start - entry->end; @@ -4811,15 +4810,15 @@ vm_map_pmap_KBI(vm_map_t map) static void vm_map_print(vm_map_t map) { - vm_map_entry_t entry; + vm_map_entry_t entry, prev; db_iprintf("Task map %p: pmap=%p, nentries=%d, version=%u\n", (void *)map, (void *)map->pmap, map->nentries, map->timestamp); db_indent += 2; - for (entry = map->header.next; entry != >header; - entry = entry->next) { + for (prev = >header; (entry = prev->next) != >header; + prev = entry) { db_iprintf("map entry %p: start=%p, end=%p, eflags=%#x, \n", (void *)entry, (void *)entry->start, (void *)entry->end, entry->eflags); @@ -4830,7 +4829,8 @@ vm_map_print(vm_map_t map) db_iprintf(" prot=%x/%x/%s", entry->protection, entry->max_protection, - inheritance_name[(int)(unsigned char)entry->inheritance]); + inheritance_name[(int)(unsigned char) + entry->inheritance]); if (entry->wired_count != 0) db_printf(", wired"); } @@ -4838,9 +4838,9 @@ vm_map_print(vm_map_t map) db_printf(", share=%p, offset=0x%jx\n", (void *)entry->object.sub_map, (uintmax_t)entry->offset); - if ((entry->prev == >header) || - (entry->prev->object.sub_map != - entry->object.sub_map)) { + if (prev == >header || + prev->object.sub_map != + entry->object.sub_map) { db_indent += 2; vm_map_print((vm_map_t)entry->object.sub_map); db_indent -= 2; @@ -4860,9 +4860,9 @@ vm_map_print(vm_map_t map) (entry->eflags & MAP_ENTRY_NEEDS_COPY) ? "needed" : "done"); db_printf("\n"); - if ((entry->prev == >header) || - (entry->prev->object.vm_object != - entry->object.vm_object)) { + if (prev == >header || + prev->object.vm_object != + entry->object.vm_object) { db_indent += 2; vm_object_print((db_expr_t)(intptr_t) entry->object.vm_object, ___ svn-src-all@freebsd.org
Re: svn commit: r348847 - head/sys/sys
Hi, All! thanks for reply, I will be back in a week and fix it, I am rafting in Eastern Siberia)) чт, 13 июня 2019 г. в 11:43, Tijl Coosemans : > On Wed, 12 Jun 2019 16:51:03 -0600 Warner Losh wrote: > > On Wed, Jun 12, 2019 at 4:49 PM Gleb Smirnoff > wrote: > >> On Mon, Jun 10, 2019 at 11:09:09AM +0200, Tijl Coosemans wrote: > Date: Mon Jun 10 05:28:03 2019 > New Revision: 348847 > URL: https://svnweb.freebsd.org/changeset/base/348847 > > Log: > Use C11 anonymous unions. > > PR: 215202 > Reported by: glebius > MFC after: 2 weeks > > Modified: > head/sys/sys/ucred.h > > Modified: head/sys/sys/ucred.h > > > == > > --- head/sys/sys/ucred.h Mon Jun 10 05:09:34 2019(r348846) > +++ head/sys/sys/ucred.h Mon Jun 10 05:28:03 2019(r348847) > @@ -89,12 +89,11 @@ struct xucred { > gid_t cr_groups[XU_NGROUPS]; /* groups */ > union { > void*_cr_unused1; /* compatibility with old ucred */ > - pid_t _pid; > - } _cr; > + pid_t cr_pid; > + }; > }; > #define XUCRED_VERSION 0 > > -#define cr_pid _cr._pid > /* This can be used for both ucred and xucred structures. */ > #define cr_gid cr_groups[0] > >>> > >>> Isn't this a userland header that should work with non-C11 compilers? > >> > >> It could make sense to keep such low bar for standard headers, but > ucred.h > >> is BSD-specific header and struct xucred is FreeBSD specific. > > > > This is solvable with proper visibility, I'd think.. > > I think "union {" should be replaced with "__extension__ union {". That > seems to kill this warning: > > /usr/include/sys/ucred.h:90:2: warning: anonymous unions are a C11 > extension > [-Wc11-extensions] > union { > ^ > 1 warning generated. > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r349029 - head/sys/kern
Author: mav Date: Fri Jun 14 01:09:10 2019 New Revision: 349029 URL: https://svnweb.freebsd.org/changeset/base/349029 Log: Update td_runtime of running thread on each statclock(). Normally td_runtime is updated on context switch, but there are some kernel threads that due to high absolute priority may run for many seconds without context switches (yes, that is bad, but that is true), which means their td_runtime was not updated all that time, that made them invisible for top other then as some general CPU usage. MFC after:1 week Sponsored by: iXsystems, Inc. Modified: head/sys/kern/kern_clock.c Modified: head/sys/kern/kern_clock.c == --- head/sys/kern/kern_clock.c Fri Jun 14 00:30:52 2019(r349028) +++ head/sys/kern/kern_clock.c Fri Jun 14 01:09:10 2019(r349029) @@ -644,6 +644,7 @@ statclock(int cnt, int usermode) struct proc *p; long rss; long *cp_time; + uint64_t runtime, new_switchtime; td = curthread; p = td->td_proc; @@ -699,6 +700,17 @@ statclock(int cnt, int usermode) "prio:%d", td->td_priority, "stathz:%d", (stathz)?stathz:hz); SDT_PROBE2(sched, , , tick, td, td->td_proc); thread_lock_flags(td, MTX_QUIET); + + /* +* Compute the amount of time during which the current +* thread was running, and add that to its total so far. +*/ + new_switchtime = cpu_ticks(); + runtime = new_switchtime - PCPU_GET(switchtime); + td->td_runtime += runtime; + td->td_incruntime += runtime; + PCPU_SET(switchtime, new_switchtime); + for ( ; cnt > 0; cnt--) sched_clock(td); thread_unlock(td); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r349028 - in releng/11.3/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/hardware en_US.ISO8859-1/installation en_US.ISO8859-1/readme share/xml
Author: gjb Date: Fri Jun 14 00:30:52 2019 New Revision: 349028 URL: https://svnweb.freebsd.org/changeset/base/349028 Log: Post-branch updates to release-related documentation: - Bump copyright years. - Note in parenthesis 11.3 may be the last 11.x release. - Prune stale errata items from 11.2-RELEASE. - Fix mailing list in the readme page. - Bump version numbers accordingly. This has no effect or impact on the in-progress 11.3-RC1 build. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml releng/11.3/release/doc/en_US.ISO8859-1/hardware/article.xml releng/11.3/release/doc/en_US.ISO8859-1/installation/article.xml releng/11.3/release/doc/en_US.ISO8859-1/readme/article.xml releng/11.3/release/doc/share/xml/release.ent Modified: releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml == --- releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml Fri Jun 14 00:09:12 2019(r349027) +++ releng/11.3/release/doc/en_US.ISO8859-1/errata/article.xml Fri Jun 14 00:30:52 2019(r349028) @@ -24,7 +24,7 @@$FreeBSD$ - 2018 +2019 mailto:d...@freebsd.org">The &os; Documentation Project @@ -49,7 +49,8 @@ &os;.This errata document for &os; &release; will be maintained - until the release of &os; &release.next;. + until the release of &os; &release.next; (if + applicable). @@ -96,157 +97,7 @@- - -&os;/&arch.i386; installed on ZFS may crash during boot - when the ZFS pool mount is attempted while booting an - unmodified - -GENERIC kernel.A system tunable has been added as of revision - - -r286584 to make the -kern.kstack_pages tunable configurable - without recompiling the kernel.To mitigate system crashes with such configurations, - choose - -Escape to loader prompt in the - boot menu and enter the following lines from &man.loader.8; - prompt, after anOK :set kern.kstack_pages=4 -boot - -Add this line to - - -/boot/loader.conf for the change to - persist across reboots:kern.kstack_pages=4 -- - -[2017-07-25] &os;/&arch.arm64; currently lacks - EFI real-time clock - (RTC) support, which may cause the system - to boot with the wrong time set. - -As a workaround, either enable &man.ntpdate.8; or - include -ntpd_sync_on_start="YES" in - &man.rc.conf.5;.- - -[2017-07-25] A late issue was discovered with - &os;/&arch.arm64; and "root on - ZFS" installations where the root - ZFS pool would fail to be located. - -There currently is no workaround. -- - -[2017-11-06] An issue with &os; virtual machines with - - -vagrant was discovered that - affects theVirtualBox where the - virtual machine will not start on the initial boot invoked - withvagrant up .The issue is due to the virtual machine - MAC being unset, as &os; does not provide - a default - -Vagrantfile .It has been observed, however, that a subsequent - invocation of -vagrant up will allow the - virtual machine to successfully boot, allowing access via -vagrant ssh .- [2018-06-21] An issue had been discovered late in the - release cycle where removing ZFS vdevs - from a pool under certain conditions would cause a system - crash when &man.zfsd.8; is enabled in - &man.rc.conf.5;. - -At present, it is believed to be limited to removal of - a - -mirror vdev from a pool consisting of - multiplemirror vdevs.See
svn commit: r349027 - in stable/11/sys: conf sys
Author: gjb Date: Fri Jun 14 00:09:12 2019 New Revision: 349027 URL: https://svnweb.freebsd.org/changeset/base/349027 Log: Rename stable/11 from BETA3 to PRERELEASE as releng/11.3 has branched. Bump __FreeBSD_version. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/newvers.sh stable/11/sys/sys/param.h Modified: stable/11/sys/conf/newvers.sh == --- stable/11/sys/conf/newvers.sh Fri Jun 14 00:03:48 2019 (r349026) +++ stable/11/sys/conf/newvers.sh Fri Jun 14 00:09:12 2019 (r349027) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.3" -BRANCH="BETA3" +BRANCH="PRERELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: stable/11/sys/sys/param.h == --- stable/11/sys/sys/param.h Fri Jun 14 00:03:48 2019(r349026) +++ stable/11/sys/sys/param.h Fri Jun 14 00:09:12 2019(r349027) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1102510 /* Master, propagated to newvers */ +#define __FreeBSD_version 1103500 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r349026 - in releng/11.3: release/pkg_repos sys/conf sys/sys
Author: gjb Date: Fri Jun 14 00:03:48 2019 New Revision: 349026 URL: https://svnweb.freebsd.org/changeset/base/349026 Log: Copy stable/11@r349022 to releng/11.3 as part of the 11.3-RELEASE cycle. Update releng/11.3 from BETA3 to RC1. Switch the default dvd1.iso pkg(8) repository from latest to quarterly. Bump __FreeBSD_version. Prune vestigial svn:mergeinfo from the new branch. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Added: - copied from r349022, stable/11/ Directory Properties: releng/11.3/ (props changed) Modified: releng/11.3/release/pkg_repos/release-dvd.conf releng/11.3/sys/conf/newvers.sh releng/11.3/sys/sys/param.h Modified: releng/11.3/release/pkg_repos/release-dvd.conf == --- stable/11/release/pkg_repos/release-dvd.confThu Jun 13 19:51:48 2019(r349022) +++ releng/11.3/release/pkg_repos/release-dvd.conf Fri Jun 14 00:03:48 2019(r349026) @@ -1,6 +1,6 @@ # $FreeBSD$ release: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest;, + url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly;, mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", Modified: releng/11.3/sys/conf/newvers.sh == --- stable/11/sys/conf/newvers.sh Thu Jun 13 19:51:48 2019 (r349022) +++ releng/11.3/sys/conf/newvers.sh Fri Jun 14 00:03:48 2019 (r349026) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.3" -BRANCH="BETA3" +BRANCH="RC1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/11.3/sys/sys/param.h == --- stable/11/sys/sys/param.h Thu Jun 13 19:51:48 2019(r349022) +++ releng/11.3/sys/sys/param.h Fri Jun 14 00:03:48 2019(r349026) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1102510 /* Master, propagated to newvers */ +#define __FreeBSD_version 1103000 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r349025 - head/sys/modules/sdio
Author: imp Date: Thu Jun 13 22:03:53 2019 New Revision: 349025 URL: https://svnweb.freebsd.org/changeset/base/349025 Log: Add opt_cam.h so we can build this outside of a kernel build. Modified: head/sys/modules/sdio/Makefile Modified: head/sys/modules/sdio/Makefile == --- head/sys/modules/sdio/Makefile Thu Jun 13 20:16:26 2019 (r349024) +++ head/sys/modules/sdio/Makefile Thu Jun 13 22:03:53 2019 (r349025) @@ -5,6 +5,6 @@ KMOD= sdio SRCS= sdiob.c sdio_subr.c SRCS+= sdio_if.c -SRCS+= device_if.h bus_if.h sdio_if.h +SRCS+= device_if.h bus_if.h sdio_if.h opt_cam.h .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r349024 - stable/12/usr.bin/mandoc
Author: lwhsu Date: Thu Jun 13 20:16:26 2019 New Revision: 349024 URL: https://svnweb.freebsd.org/changeset/base/349024 Log: MFC r346160: Suppress old gcc warning about null format string This is workaround to make head build on gcc using architectures Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.bin/mandoc/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/mandoc/Makefile == --- stable/12/usr.bin/mandoc/Makefile Thu Jun 13 20:09:07 2019 (r349023) +++ stable/12/usr.bin/mandoc/Makefile Thu Jun 13 20:16:26 2019 (r349024) @@ -97,6 +97,8 @@ SRCS= ${LIB_SRCS} \ WARNS?=3 CFLAGS+= -DHAVE_CONFIG_H \ -I${SRCTOP}/lib/libopenbsd/ +# This can be removed after swtiching to newer gcc +CFLAGS.gcc+= -Wno-format LIBADD=openbsd z .include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r349023 - head/sys/vm
Author: dougm Date: Thu Jun 13 20:09:07 2019 New Revision: 349023 URL: https://svnweb.freebsd.org/changeset/base/349023 Log: Create a function for creating objects to back map entries, and one for giving cred to a map entry backed by an object, and use them instead of the code duplicated inline now. Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D20370 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c == --- head/sys/vm/vm_map.cThu Jun 13 19:51:48 2019(r349022) +++ head/sys/vm/vm_map.cThu Jun 13 20:09:07 2019(r349023) @@ -2109,6 +2109,60 @@ vm_map_simplify_entry(vm_map_t map, vm_map_entry_t ent } /* + * vm_map_entry_back: + * + * Allocate an object to back a map entry. + */ +static inline void +vm_map_entry_back(vm_map_entry_t entry) +{ + vm_object_t object; + + KASSERT(entry->object.vm_object == NULL, + ("map entry %p has backing object", entry)); + KASSERT((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0, + ("map entry %p is a submap", entry)); + object = vm_object_allocate(OBJT_DEFAULT, + atop(entry->end - entry->start)); + entry->object.vm_object = object; + entry->offset = 0; + if (entry->cred != NULL) { + object->cred = entry->cred; + object->charge = entry->end - entry->start; + entry->cred = NULL; + } +} + +/* + * vm_map_entry_charge_object + * + * If there is no object backing this entry, create one. Otherwise, if + * the entry has cred, give it to the backing object. + */ +static inline void +vm_map_entry_charge_object(vm_map_t map, vm_map_entry_t entry) +{ + + VM_MAP_ASSERT_LOCKED(map); + KASSERT((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0, + ("map entry %p is a submap", entry)); + if (entry->object.vm_object == NULL && !map->system_map && + (entry->eflags & MAP_ENTRY_GUARD) == 0) + vm_map_entry_back(entry); + else if (entry->object.vm_object != NULL && + ((entry->eflags & MAP_ENTRY_NEEDS_COPY) == 0) && + entry->cred != NULL) { + VM_OBJECT_WLOCK(entry->object.vm_object); + KASSERT(entry->object.vm_object->cred == NULL, + ("OVERCOMMIT: %s: both cred e %p", __func__, entry)); + entry->object.vm_object->cred = entry->cred; + entry->object.vm_object->charge = entry->end - entry->start; + VM_OBJECT_WUNLOCK(entry->object.vm_object); + entry->cred = NULL; + } +} + +/* * vm_map_clip_start: [ internal use only ] * * Asserts that the given entry begins at or after @@ -2140,38 +2194,7 @@ _vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, * starting address. */ vm_map_simplify_entry(map, entry); - - /* -* If there is no object backing this entry, we might as well create -* one now. If we defer it, an object can get created after the map -* is clipped, and individual objects will be created for the split-up -* map. This is a bit of a hack, but is also about the best place to -* put this improvement. -*/ - if (entry->object.vm_object == NULL && !map->system_map && - (entry->eflags & MAP_ENTRY_GUARD) == 0) { - vm_object_t object; - object = vm_object_allocate(OBJT_DEFAULT, - atop(entry->end - entry->start)); - entry->object.vm_object = object; - entry->offset = 0; - if (entry->cred != NULL) { - object->cred = entry->cred; - object->charge = entry->end - entry->start; - entry->cred = NULL; - } - } else if (entry->object.vm_object != NULL && - ((entry->eflags & MAP_ENTRY_NEEDS_COPY) == 0) && - entry->cred != NULL) { - VM_OBJECT_WLOCK(entry->object.vm_object); - KASSERT(entry->object.vm_object->cred == NULL, - ("OVERCOMMIT: vm_entry_clip_start: both cred e %p", entry)); - entry->object.vm_object->cred = entry->cred; - entry->object.vm_object->charge = entry->end - entry->start; - VM_OBJECT_WUNLOCK(entry->object.vm_object); - entry->cred = NULL; - } - + vm_map_entry_charge_object(map, entry); new_entry = vm_map_entry_create(map); *new_entry = *entry; @@ -,40 +2245,11 @@ _vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, v KASSERT(entry->start < end && entry->end > end, ("_vm_map_clip_end: invalid clip of entry %p", entry)); - /* -* If there is no object backing this entry, we might as well create -* one now. If we
svn commit: r349022 - stable/11/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Thu Jun 13 19:51:48 2019 New Revision: 349022 URL: https://svnweb.freebsd.org/changeset/base/349022 Log: Release notes documentation: - r346296, clang (and friends) 8.0.0. - r346981, WPA 2.8. - r348343, OpenSSL 1.0.2s. - r348607, libarchive(3) updates. - r348980, OpenPAM updates. - r346855, cxgbe(4) hash filters, NAT offloading, SMAC/DMAC swapping filtering. - r346940, cxgbe(4) T4/5/6 firmware update. - r348588, geli(8) weak algorithm deprecation warnings. - r346690, ZFS parallel mounting. - r348753, deprecation warnings enabled. - r346212, NAT64 CLAT support. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 13 19:07:03 2019(r349021) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 13 19:51:48 2019(r349022) @@ -261,9 +261,6 @@ The utility has been updated to version 5.2.4. - The WPA - utilities have been updated to version 2.6. - The utility has been updated to version 5.34. @@ -271,10 +268,6 @@ ELF Tool Chain has been updated to version r3614. - The library has been - updated to version 3.3.3, with additional fixes from - upstream. - The lld utility has been updated to add -z interpose, marking the object file as @@ -284,25 +277,35 @@ updated to fix incorrect date reporting for files. - The clang, + The LUA +has been merged. + + The utilities have been + updated to version 4.2.8p13. + + Timezone data files have been updated to + version 2019a. + + The clang, llvm, lld, lldb, and compiler-rt utilities as well as libc++ have been updated to - upstream version 7.0.1. + upstream version 8.0.0. - The LUA -has been merged. + The WPA + utilities have been updated to version 2.8. - OpenSSL has - been updated to version 1.0.2r. + OpenSSL has + been updated to version 1.0.2s. - The utilities have been - updated to version 4.2.8p13. + The library has been + updated to version 3.3.3, with additional fixes from + upstream. - Timezone data files have been updated to - version 2019a. + OpenPAM has + been updated to the latest upstream version. @@ -405,6 +408,10 @@ ID when logging a process exit. The ID 0 represents processes that are not jailed. + + Warnings for features deprecated in + future releases will now be printed on all + versions. @@ -473,6 +480,17 @@ sponsor="">The driver has been added, providing support for Chelsio T6 cryptography accelerators. + + The driver has been updated + to include support for hash filters, NAT + offloading, and + SMAC/DMAC swapping + filters. + + The T4, T5, and T6 firmware + has been updated to version 1.23.0.0. @@ -517,7 +535,8 @@ General Storage - + Deprecation warnings have been added for + weaker algorithms when creating providers. @@ -533,6 +552,10 @@ issue that could result in a system hang during ZFS vnode reclamation has been fixed. + + The + ZFS filesystem has been updated to + implement parallel mounting. @@ -588,6 +611,11 @@ updated to include new rule options, record-state, set-limit, and defer-action. + + Support for NAT64 + CLAT has been added, as defined in + RFC6877. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r349020 - svnadmin/conf
Author: gjb Date: Thu Jun 13 19:04:49 2019 New Revision: 349020 URL: https://svnweb.freebsd.org/changeset/base/349020 Log: Preemptively add releng/11.3 to the approvers file. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers == --- svnadmin/conf/approvers Thu Jun 13 17:39:32 2019(r349019) +++ svnadmin/conf/approvers Thu Jun 13 19:04:49 2019(r349020) @@ -21,6 +21,7 @@ ^stable/11/re ^release/ re ^releng/12.0/ (security-officer|so) +^releng/11.3/ re ^releng/11.[0-2]/ (security-officer|so) ^releng/10.[0-4]/ (security-officer|so) ^releng/9.[0-3]/ (security-officer|so) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r349019 - head/usr.sbin/bhyve
> Author: vmaffione > Date: Thu Jun 13 17:39:32 2019 > New Revision: 349019 > URL: https://svnweb.freebsd.org/changeset/base/349019 > > Log: > bhyve: move common code to net_utils.c > > Both virtio_net and e82545 network frontends have code to validate and > generate MAC addresses. These functionalities are replicated in the two > files, so we move them in a separate compilation unit. > > Reviewed by:rgrimes, bryanv, imp, kevans > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D20626 You should of waited for a bit longer for additional comments based on the fact you made changes based on other comments. > Added: > head/usr.sbin/bhyve/net_utils.c (contents, props changed) > head/usr.sbin/bhyve/net_utils.h (contents, props changed) > Modified: > head/usr.sbin/bhyve/Makefile > head/usr.sbin/bhyve/pci_e82545.c > head/usr.sbin/bhyve/pci_virtio_net.c > > Modified: head/usr.sbin/bhyve/Makefile > == > --- head/usr.sbin/bhyve/Makefile Thu Jun 13 16:34:55 2019 > (r349018) > +++ head/usr.sbin/bhyve/Makefile Thu Jun 13 17:39:32 2019 > (r349019) > @@ -32,6 +32,7 @@ SRCS= \ > mem.c \ > mevent.c\ > mptbl.c \ > + net_utils.c \ > pci_ahci.c \ > pci_e82545.c\ > pci_emul.c \ > > Added: head/usr.sbin/bhyve/net_utils.c > == > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.sbin/bhyve/net_utils.c Thu Jun 13 17:39:32 2019 > (r349019) > @@ -0,0 +1,83 @@ > +/*- > + * Copyright (c) 2011 NetApp, Inc. The all rights reserved clause must be restored here, please see the review for the reason. Thanks, Rod > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + *notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + *notice, this list of conditions and the following disclaimer in the > + *documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS > + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, > + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT > + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR > + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE > + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, > + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#include "net_utils.h" > +#include "bhyverun.h" > +#include > +#include > +#include > +#include > +#include > + > +int > +net_parsemac(char *mac_str, uint8_t *mac_addr) > +{ > +struct ether_addr *ea; > +char *tmpstr; > +char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; > + > +tmpstr = strsep(_str,"="); > + > +if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { > +ea = ether_aton(mac_str); > + > +if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || > +memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { > + fprintf(stderr, "Invalid MAC %s\n", mac_str); > +return (EINVAL); > +} else > +memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); > +} > + > +return (0); > +} > + > +void > +net_genmac(struct pci_devinst *pi, uint8_t *macaddr) > +{ > + /* > + * The default MAC address is the standard NetApp OUI of 00-a0-98, > + * followed by an MD5 of the PCI slot/func number and dev name > + */ > + MD5_CTX mdctx; > + unsigned char digest[16]; > + char nstr[80]; > + > + snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, > + pi->pi_func, vmname); > + > + MD5Init(); > + MD5Update(, nstr, (unsigned int)strlen(nstr)); > + MD5Final(digest, ); > + > + macaddr[0] = 0x00; > + macaddr[1] = 0xa0; > + macaddr[2] = 0x98; > + macaddr[3] = digest[0]; > + macaddr[4] = digest[1]; > + macaddr[5] = digest[2]; > +} > > Added: head/usr.sbin/bhyve/net_utils.h >
svn commit: r349019 - head/usr.sbin/bhyve
Author: vmaffione Date: Thu Jun 13 17:39:32 2019 New Revision: 349019 URL: https://svnweb.freebsd.org/changeset/base/349019 Log: bhyve: move common code to net_utils.c Both virtio_net and e82545 network frontends have code to validate and generate MAC addresses. These functionalities are replicated in the two files, so we move them in a separate compilation unit. Reviewed by: rgrimes, bryanv, imp, kevans MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D20626 Added: head/usr.sbin/bhyve/net_utils.c (contents, props changed) head/usr.sbin/bhyve/net_utils.h (contents, props changed) Modified: head/usr.sbin/bhyve/Makefile head/usr.sbin/bhyve/pci_e82545.c head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/Makefile == --- head/usr.sbin/bhyve/MakefileThu Jun 13 16:34:55 2019 (r349018) +++ head/usr.sbin/bhyve/MakefileThu Jun 13 17:39:32 2019 (r349019) @@ -32,6 +32,7 @@ SRCS= \ mem.c \ mevent.c\ mptbl.c \ + net_utils.c \ pci_ahci.c \ pci_e82545.c\ pci_emul.c \ Added: head/usr.sbin/bhyve/net_utils.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bhyve/net_utils.c Thu Jun 13 17:39:32 2019 (r349019) @@ -0,0 +1,83 @@ +/*- + * Copyright (c) 2011 NetApp, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include "net_utils.h" +#include "bhyverun.h" +#include +#include +#include +#include +#include + +int +net_parsemac(char *mac_str, uint8_t *mac_addr) +{ +struct ether_addr *ea; +char *tmpstr; +char zero_addr[ETHER_ADDR_LEN] = { 0, 0, 0, 0, 0, 0 }; + +tmpstr = strsep(_str,"="); + +if ((mac_str != NULL) && (!strcmp(tmpstr,"mac"))) { +ea = ether_aton(mac_str); + +if (ea == NULL || ETHER_IS_MULTICAST(ea->octet) || +memcmp(ea->octet, zero_addr, ETHER_ADDR_LEN) == 0) { + fprintf(stderr, "Invalid MAC %s\n", mac_str); +return (EINVAL); +} else +memcpy(mac_addr, ea->octet, ETHER_ADDR_LEN); +} + +return (0); +} + +void +net_genmac(struct pci_devinst *pi, uint8_t *macaddr) +{ + /* +* The default MAC address is the standard NetApp OUI of 00-a0-98, +* followed by an MD5 of the PCI slot/func number and dev name +*/ + MD5_CTX mdctx; + unsigned char digest[16]; + char nstr[80]; + + snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, + pi->pi_func, vmname); + + MD5Init(); + MD5Update(, nstr, (unsigned int)strlen(nstr)); + MD5Final(digest, ); + + macaddr[0] = 0x00; + macaddr[1] = 0xa0; + macaddr[2] = 0x98; + macaddr[3] = digest[0]; + macaddr[4] = digest[1]; + macaddr[5] = digest[2]; +} Added: head/usr.sbin/bhyve/net_utils.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bhyve/net_utils.h Thu Jun 13 17:39:32 2019 (r349019) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2019 Vincenzo Maffione + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions
svn commit: r349018 - stable/12/sys/vm
Author: markj Date: Thu Jun 13 16:34:55 2019 New Revision: 349018 URL: https://svnweb.freebsd.org/changeset/base/349018 Log: MFC r348747: Add sysctls for uma_kmem_{limit,total}. Modified: stable/12/sys/vm/uma_core.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/uma_core.c == --- stable/12/sys/vm/uma_core.c Thu Jun 13 16:34:25 2019(r349017) +++ stable/12/sys/vm/uma_core.c Thu Jun 13 16:34:55 2019(r349018) @@ -144,9 +144,16 @@ static int boot_pages; static struct sx uma_drain_lock; -/* kmem soft limit. */ +/* + * kmem soft limit, initialized by uma_set_limit(). Ensure that early + * allocations don't trigger a wakeup of the reclaim thread. + */ static unsigned long uma_kmem_limit = LONG_MAX; +SYSCTL_ULONG(_vm, OID_AUTO, uma_kmem_limit, CTLFLAG_RD, _kmem_limit, 0, +"UMA kernel memory soft limit"); static unsigned long uma_kmem_total; +SYSCTL_ULONG(_vm, OID_AUTO, uma_kmem_total, CTLFLAG_RD, _kmem_total, 0, +"UMA kernel memory usage"); /* Is the VM done starting up? */ static enum { BOOT_COLD = 0, BOOT_STRAPPED, BOOT_PAGEALLOC, BOOT_BUCKETS, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r349017 - stable/12/sys/vm
Author: markj Date: Thu Jun 13 16:34:25 2019 New Revision: 349017 URL: https://svnweb.freebsd.org/changeset/base/349017 Log: MFC r348746: Remove the volatile qualifer from uma_kmem_total. Modified: stable/12/sys/vm/uma_core.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/uma_core.c == --- stable/12/sys/vm/uma_core.c Thu Jun 13 16:33:55 2019(r349016) +++ stable/12/sys/vm/uma_core.c Thu Jun 13 16:34:25 2019(r349017) @@ -146,7 +146,7 @@ static struct sx uma_drain_lock; /* kmem soft limit. */ static unsigned long uma_kmem_limit = LONG_MAX; -static volatile unsigned long uma_kmem_total; +static unsigned long uma_kmem_total; /* Is the VM done starting up? */ static enum { BOOT_COLD = 0, BOOT_STRAPPED, BOOT_PAGEALLOC, BOOT_BUCKETS, @@ -3857,14 +3857,14 @@ unsigned long uma_size(void) { - return (uma_kmem_total); + return (atomic_load_long(_kmem_total)); } long uma_avail(void) { - return (uma_kmem_limit - uma_kmem_total); + return (uma_kmem_limit - uma_size()); } void ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r349016 - in stable/12/sys: amd64/amd64 cddl/contrib/opensolaris/uts/common/dtrace i386/i386
Author: markj Date: Thu Jun 13 16:33:55 2019 New Revision: 349016 URL: https://svnweb.freebsd.org/changeset/base/349016 Log: MFC r348742: Fix a race between fasttrap and the user breakpoint handler. Modified: stable/12/sys/amd64/amd64/trap.c stable/12/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c stable/12/sys/i386/i386/trap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/trap.c == --- stable/12/sys/amd64/amd64/trap.cThu Jun 13 16:33:01 2019 (r349015) +++ stable/12/sys/amd64/amd64/trap.cThu Jun 13 16:33:55 2019 (r349016) @@ -113,6 +113,10 @@ void dblfault_handler(struct trapframe *frame); static int trap_pfault(struct trapframe *, int); static void trap_fatal(struct trapframe *, vm_offset_t); +#ifdef KDTRACE_HOOKS +static bool trap_user_dtrace(struct trapframe *, +int (**hook)(struct trapframe *)); +#endif #define MAX_TRAP_MSG 32 static char *trap_msg[] = { @@ -284,11 +288,11 @@ trap(struct trapframe *frame) break; case T_BPTFLT: /* bpt instruction fault */ - enable_intr(); #ifdef KDTRACE_HOOKS - if (dtrace_pid_probe_ptr != NULL && - dtrace_pid_probe_ptr(frame) == 0) + if (trap_user_dtrace(frame, _pid_probe_ptr)) return; +#else + enable_intr(); #endif signo = SIGTRAP; ucode = TRAP_BRKPT; @@ -425,9 +429,7 @@ trap(struct trapframe *frame) break; #ifdef KDTRACE_HOOKS case T_DTRACE_RET: - enable_intr(); - if (dtrace_return_probe_ptr != NULL) - dtrace_return_probe_ptr(frame); + (void)trap_user_dtrace(frame, _return_probe_ptr); return; #endif } @@ -947,6 +949,25 @@ trap_fatal(frame, eva) else panic("unknown/reserved trap"); } + +#ifdef KDTRACE_HOOKS +/* + * Invoke a userspace DTrace hook. The hook pointer is cleared when no + * userspace probes are enabled, so we must synchronize with DTrace to ensure + * that a trapping thread is able to call the hook before it is cleared. + */ +static bool +trap_user_dtrace(struct trapframe *frame, int (**hookp)(struct trapframe *)) +{ + int (*hook)(struct trapframe *); + + hook = (int (*)(struct trapframe *))atomic_load_ptr(hookp); + enable_intr(); + if (hook != NULL) + return ((hook)(frame) == 0); + return (false); +} +#endif /* * Double fault handler. Called when a fault occurs while writing Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c == --- stable/12/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Thu Jun 13 16:33:01 2019(r349015) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Thu Jun 13 16:33:55 2019(r349016) @@ -1125,31 +1125,17 @@ fasttrap_enable_callbacks(void) static void fasttrap_disable_callbacks(void) { -#ifdef illumos - ASSERT(MUTEX_HELD(_lock)); -#endif - - mutex_enter(_count_mtx); ASSERT(fasttrap_pid_count > 0); fasttrap_pid_count--; if (fasttrap_pid_count == 0) { -#ifdef illumos - cpu_t *cur, *cpu = CPU; - - for (cur = cpu->cpu_next_onln; cur != cpu; - cur = cur->cpu_next_onln) { - rw_enter(>cpu_ft_lock, RW_WRITER); - } -#endif + /* +* Synchronize with the breakpoint handler, which is careful to +* enable interrupts only after loading the hook pointer. +*/ + dtrace_sync(); dtrace_pid_probe_ptr = NULL; dtrace_return_probe_ptr = NULL; -#ifdef illumos - for (cur = cpu->cpu_next_onln; cur != cpu; - cur = cur->cpu_next_onln) { - rw_exit(>cpu_ft_lock); - } -#endif } mutex_exit(_count_mtx); } Modified: stable/12/sys/i386/i386/trap.c == --- stable/12/sys/i386/i386/trap.c Thu Jun 13 16:33:01 2019 (r349015) +++ stable/12/sys/i386/i386/trap.c Thu Jun 13 16:33:55 2019 (r349016) @@ -116,6 +116,10 @@ void syscall(struct trapframe *frame); static int trap_pfault(struct trapframe *, int, vm_offset_t); static void trap_fatal(struct trapframe *, vm_offset_t); +#ifdef KDTRACE_HOOKS +static bool trap_user_dtrace(struct trapframe *, +int (**hook)(struct trapframe *)); +#endif void dblfault_handler(void); extern inthand_t
svn commit: r349015 - stable/12/sys/net
Author: markj Date: Thu Jun 13 16:33:01 2019 New Revision: 349015 URL: https://svnweb.freebsd.org/changeset/base/349015 Log: MFC r348745, r348751: Conditionalize an in_epoch() call on INVARIANTS. Modified: stable/12/sys/net/if_lagg.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_lagg.c == --- stable/12/sys/net/if_lagg.c Thu Jun 13 16:32:03 2019(r349014) +++ stable/12/sys/net/if_lagg.c Thu Jun 13 16:33:01 2019(r349015) @@ -1857,12 +1857,14 @@ lagg_link_active(struct lagg_softc *sc, struct lagg_po * Search a port which reports an active link state. */ +#ifdef INVARIANTS /* * This is called with either LAGG_RLOCK() held or * LAGG_XLOCK(sc) held. */ if (!in_epoch(net_epoch_preempt)) LAGG_XLOCK_ASSERT(sc); +#endif if (lp == NULL) goto search; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r349014 - in stable/12/sys/compat/linuxkpi/common: include/linux src
Author: markj Date: Thu Jun 13 16:32:03 2019 New Revision: 349014 URL: https://svnweb.freebsd.org/changeset/base/349014 Log: MFC r348743: Make the linuxkpi's alloc_pages() consistently return wired pages. Modified: stable/12/sys/compat/linuxkpi/common/include/linux/gfp.h stable/12/sys/compat/linuxkpi/common/src/linux_page.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/gfp.h == --- stable/12/sys/compat/linuxkpi/common/include/linux/gfp.hThu Jun 13 08:00:32 2019(r349013) +++ stable/12/sys/compat/linuxkpi/common/include/linux/gfp.hThu Jun 13 16:32:03 2019(r349014) @@ -52,12 +52,15 @@ #define__GFP_RETRY_MAYFAIL 0 #define__GFP_MOVABLE 0 #define__GFP_COMP 0 -#define__GFP_KSWAPD_RECLAIM 0 +#define__GFP_KSWAPD_RECLAIM 0 #define__GFP_IO0 #define__GFP_NO_KSWAPD 0 #define__GFP_WAIT M_WAITOK #define__GFP_DMA32 (1U << 24) /* LinuxKPI only */ +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION == 5 +#define__GFP_NOTWIRED (1U << 25) +#endif #define__GFP_BITS_SHIFT 25 #define__GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) #define__GFP_NOFAILM_WAITOK @@ -74,7 +77,7 @@ #defineGFP_TEMPORARY M_NOWAIT #defineGFP_NATIVE_MASK (M_NOWAIT | M_WAITOK | M_USE_RESERVE | M_ZERO) #defineGFP_TRANSHUGE 0 -#defineGFP_TRANSHUGE_LIGHT 0 +#defineGFP_TRANSHUGE_LIGHT 0 CTASSERT((__GFP_DMA32 & GFP_NATIVE_MASK) == 0); CTASSERT((__GFP_BITS_MASK & GFP_NATIVE_MASK) == GFP_NATIVE_MASK); @@ -98,6 +101,9 @@ static inline struct page * alloc_page(gfp_t flags) { +#ifdef __GFP_NOTWIRED + flags |= __GFP_NOTWIRED; +#endif return (linux_alloc_pages(flags, 0)); } @@ -105,6 +111,9 @@ static inline struct page * alloc_pages(gfp_t flags, unsigned int order) { +#ifdef __GFP_NOTWIRED + flags |= __GFP_NOTWIRED; +#endif return (linux_alloc_pages(flags, order)); } @@ -112,6 +121,9 @@ static inline struct page * alloc_pages_node(int node_id, gfp_t flags, unsigned int order) { +#ifdef __GFP_NOTWIRED + flags |= __GFP_NOTWIRED; +#endif return (linux_alloc_pages(flags, order)); } Modified: stable/12/sys/compat/linuxkpi/common/src/linux_page.c == --- stable/12/sys/compat/linuxkpi/common/src/linux_page.c Thu Jun 13 08:00:32 2019(r349013) +++ stable/12/sys/compat/linuxkpi/common/src/linux_page.c Thu Jun 13 16:32:03 2019(r349014) @@ -91,9 +91,14 @@ linux_alloc_pages(gfp_t flags, unsigned int order) if (PMAP_HAS_DMAP) { unsigned long npages = 1UL << order; - int req = (flags & M_ZERO) ? (VM_ALLOC_ZERO | VM_ALLOC_NOOBJ | - VM_ALLOC_NORMAL) : (VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL); + int req = VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_NORMAL; +#ifdef __GFP_NOTWIRED + if ((flags & __GFP_NOTWIRED) != 0) + req &= ~VM_ALLOC_WIRED; +#endif + if ((flags & M_ZERO) != 0) + req |= VM_ALLOC_ZERO; if (order == 0 && (flags & GFP_DMA32) == 0) { page = vm_page_alloc(NULL, 0, req); if (page == NULL) @@ -154,7 +159,8 @@ linux_free_pages(vm_page_t page, unsigned int order) vm_page_t pgo = page + x; vm_page_lock(pgo); - vm_page_free(pgo); + if (vm_page_unwire_noq(pgo)) + vm_page_free(pgo); vm_page_unlock(pgo); } } else { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r348847 - head/sys/sys
On Wed, 12 Jun 2019 16:51:03 -0600 Warner Losh wrote: > On Wed, Jun 12, 2019 at 4:49 PM Gleb Smirnoff wrote: >> On Mon, Jun 10, 2019 at 11:09:09AM +0200, Tijl Coosemans wrote: Date: Mon Jun 10 05:28:03 2019 New Revision: 348847 URL: https://svnweb.freebsd.org/changeset/base/348847 Log: Use C11 anonymous unions. PR: 215202 Reported by: glebius MFC after: 2 weeks Modified: head/sys/sys/ucred.h Modified: head/sys/sys/ucred.h == --- head/sys/sys/ucred.h Mon Jun 10 05:09:34 2019(r348846) +++ head/sys/sys/ucred.h Mon Jun 10 05:28:03 2019(r348847) @@ -89,12 +89,11 @@ struct xucred { gid_t cr_groups[XU_NGROUPS]; /* groups */ union { void*_cr_unused1; /* compatibility with old ucred */ - pid_t _pid; - } _cr; + pid_t cr_pid; + }; }; #define XUCRED_VERSION 0 -#define cr_pid _cr._pid /* This can be used for both ucred and xucred structures. */ #define cr_gid cr_groups[0] >>> >>> Isn't this a userland header that should work with non-C11 compilers? >> >> It could make sense to keep such low bar for standard headers, but ucred.h >> is BSD-specific header and struct xucred is FreeBSD specific. > > This is solvable with proper visibility, I'd think.. I think "union {" should be replaced with "__extension__ union {". That seems to kill this warning: /usr/include/sys/ucred.h:90:2: warning: anonymous unions are a C11 extension [-Wc11-extensions] union { ^ 1 warning generated. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r349013 - in stable/12: contrib/mandoc usr.bin/mandoc
Author: bapt Date: Thu Jun 13 08:00:32 2019 New Revision: 349013 URL: https://svnweb.freebsd.org/changeset/base/349013 Log: MFC r346149: Update mandoc to 1.14.5 Relnotes: yes Added: stable/12/contrib/mandoc/arch.c - copied unchanged from r346149, head/contrib/mandoc/arch.c stable/12/contrib/mandoc/eqn.h - copied unchanged from r346149, head/contrib/mandoc/eqn.h stable/12/contrib/mandoc/eqn_parse.h - copied unchanged from r346149, head/contrib/mandoc/eqn_parse.h stable/12/contrib/mandoc/mandoc_msg.c - copied unchanged from r346149, head/contrib/mandoc/mandoc_msg.c stable/12/contrib/mandoc/mandoc_parse.h - copied unchanged from r346149, head/contrib/mandoc/mandoc_parse.h stable/12/contrib/mandoc/tbl.h - copied unchanged from r346149, head/contrib/mandoc/tbl.h stable/12/contrib/mandoc/tbl_int.h - copied unchanged from r346149, head/contrib/mandoc/tbl_int.h stable/12/contrib/mandoc/tbl_parse.h - copied unchanged from r346149, head/contrib/mandoc/tbl_parse.h Deleted: stable/12/contrib/mandoc/st.in Modified: stable/12/contrib/mandoc/INSTALL stable/12/contrib/mandoc/LICENSE stable/12/contrib/mandoc/Makefile stable/12/contrib/mandoc/Makefile.depend stable/12/contrib/mandoc/NEWS stable/12/contrib/mandoc/TODO stable/12/contrib/mandoc/apropos.1 stable/12/contrib/mandoc/att.c stable/12/contrib/mandoc/cgi.c stable/12/contrib/mandoc/chars.c stable/12/contrib/mandoc/config.h stable/12/contrib/mandoc/configure stable/12/contrib/mandoc/configure.local.example stable/12/contrib/mandoc/dbm.c stable/12/contrib/mandoc/demandoc.c stable/12/contrib/mandoc/eqn.c stable/12/contrib/mandoc/eqn_html.c stable/12/contrib/mandoc/eqn_term.c stable/12/contrib/mandoc/gmdiff stable/12/contrib/mandoc/html.c stable/12/contrib/mandoc/html.h stable/12/contrib/mandoc/lib.c stable/12/contrib/mandoc/lib.in stable/12/contrib/mandoc/libman.h stable/12/contrib/mandoc/libmandoc.h stable/12/contrib/mandoc/libmdoc.h stable/12/contrib/mandoc/main.c stable/12/contrib/mandoc/main.h stable/12/contrib/mandoc/man.1 stable/12/contrib/mandoc/man.7 stable/12/contrib/mandoc/man.c stable/12/contrib/mandoc/man.conf.5 stable/12/contrib/mandoc/man.h stable/12/contrib/mandoc/man_html.c stable/12/contrib/mandoc/man_macro.c stable/12/contrib/mandoc/man_term.c stable/12/contrib/mandoc/man_validate.c stable/12/contrib/mandoc/manconf.h stable/12/contrib/mandoc/mandoc.1 stable/12/contrib/mandoc/mandoc.3 stable/12/contrib/mandoc/mandoc.c stable/12/contrib/mandoc/mandoc.css stable/12/contrib/mandoc/mandoc.h stable/12/contrib/mandoc/mandoc_char.7 stable/12/contrib/mandoc/mandoc_headers.3 stable/12/contrib/mandoc/mandoc_html.3 stable/12/contrib/mandoc/mandocd.c stable/12/contrib/mandoc/mandocdb.c stable/12/contrib/mandoc/manpath.c stable/12/contrib/mandoc/mansearch.c stable/12/contrib/mandoc/mansearch.h stable/12/contrib/mandoc/mdoc.7 stable/12/contrib/mandoc/mdoc.c stable/12/contrib/mandoc/mdoc.h stable/12/contrib/mandoc/mdoc_argv.c stable/12/contrib/mandoc/mdoc_html.c stable/12/contrib/mandoc/mdoc_macro.c stable/12/contrib/mandoc/mdoc_man.c stable/12/contrib/mandoc/mdoc_markdown.c stable/12/contrib/mandoc/mdoc_state.c stable/12/contrib/mandoc/mdoc_term.c stable/12/contrib/mandoc/mdoc_validate.c stable/12/contrib/mandoc/msec.c stable/12/contrib/mandoc/out.c stable/12/contrib/mandoc/out.h stable/12/contrib/mandoc/preconv.c stable/12/contrib/mandoc/read.c stable/12/contrib/mandoc/roff.7 stable/12/contrib/mandoc/roff.c stable/12/contrib/mandoc/roff.h stable/12/contrib/mandoc/roff_html.c stable/12/contrib/mandoc/roff_int.h stable/12/contrib/mandoc/roff_term.c stable/12/contrib/mandoc/roff_validate.c stable/12/contrib/mandoc/st.c stable/12/contrib/mandoc/tag.c stable/12/contrib/mandoc/tag.h stable/12/contrib/mandoc/tbl.3 stable/12/contrib/mandoc/tbl.7 stable/12/contrib/mandoc/tbl.c stable/12/contrib/mandoc/tbl_data.c stable/12/contrib/mandoc/tbl_html.c stable/12/contrib/mandoc/tbl_layout.c stable/12/contrib/mandoc/tbl_opts.c stable/12/contrib/mandoc/tbl_term.c stable/12/contrib/mandoc/term.c stable/12/contrib/mandoc/term.h stable/12/contrib/mandoc/term_ascii.c stable/12/contrib/mandoc/term_tab.c stable/12/contrib/mandoc/test-getsubopt.c stable/12/contrib/mandoc/test-strcasestr.c stable/12/contrib/mandoc/test-stringlist.c stable/12/contrib/mandoc/test-strptime.c stable/12/contrib/mandoc/test-vasprintf.c stable/12/contrib/mandoc/test-wchar.c stable/12/contrib/mandoc/tree.c stable/12/usr.bin/mandoc/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/mandoc/INSTALL == --- stable/12/contrib/mandoc/INSTALLThu Jun 13 07:13:22 2019 (r349012) +++ stable/12/contrib/mandoc/INSTALLThu Jun 13