aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* pmc(3)/hwpmc(4): update supported Intel processors to rely fully on theMatt Macy2018-05-26255-2108/+572
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vendor provided pmu-events tables and sundry cleanups. The vendor pmu-events tables provide counter descriptions, default sample rates, event, umask, and flag values for all the counter configuration permutations. Using this gives us: - much simpler kernel code for the MD component - helpful long and short event descriptions - simpler user code - sample rates that won't overload the system Update man page with newer sample types and remove unused sample type. Squashed commit of the following: commit 4459d43eff815bec08ccc5533dbe5de846f03128 Author: Matt Macy <mmacy@mattmacy.io> Date: Sat May 26 00:06:31 2018 -0700 libpmc: fix pmu function signatures for non amd64 commit a2cb8bbc586c65d41f9b291430a2261ec67b59fe Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:38:11 2018 -0700 pmcstat: fix indentation of usage commit f686954b15ff56a833ac80404898977cb80a265b Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:19:49 2018 -0700 pmclog(3): add callchain and pmcallocatedyn, remove pcsample commit 73e13a0d2e9498c81c150d14d022050cee7511bb Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:19:00 2018 -0700 pmclog.h: GC pcsample field commit 3e93ffd65da641fa657539dad3c48e281f8b5798 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:05:57 2018 -0700 hwpmc: make Intel core CPUs use external event tables commit 634f5fae1e1644ac324003136c66cd9c619d1c93 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 22:00:06 2018 -0700 pmclog: update log record types, bump PMC_MAJOR - explicitly make log record types a multiple of 8 bytes - hook in pmu event types for pmc_allocate records - remove references to no longer PCSAMPLE record commit 83d84fcd2d65bdf6ddcb2e155a22f0cfa2a9c225 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 21:52:10 2018 -0700 libpmc: add support for having vendor table driven pmc_allocate commit 9e6ad63c40c2fce8404847ace5078ca6cb33a736 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 19:11:33 2018 -0700 hwpmc_core: add accessors for EVSEL & UMASK, make IAP_UMASK useful to user commit 859dceb93daa6419a48c794db99b6758e5b041c9 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 19:09:45 2018 -0700 pmcstat: update usage and man page as well as make -L consistent with pmccontrol commit 79c7d8597e28c2eb13f5f9113e65ec2792ca57b1 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 18:07:03 2018 -0700 pmu_util: add support for all current intel event keywords commit d8089c7f6a6c8527f38324252b1ffb47004694c6 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 17:45:00 2018 -0700 add description for new arguments commit 058336740bab53c62ec88a3a026ea848cf3878c6 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 17:38:15 2018 -0700 libpmc: move pmu_events table and pmu_utils out of libpmcstat so that they can be used by pmc_allocate commit 049b66b382e2f833c3f47bc8df9e750cb265709f Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 16:12:41 2018 -0700 pmcstat: hook pmu_events counter description utility routines in commit f5e01e7b37a691dc045e1aa16b3ebdd162515de8 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 16:11:59 2018 -0700 pmu_events: add utility routines for listing counters and their descriptions commit cba4d4f8907f772279f86f18f915e0d74d33ac56 Author: Matt Macy <mmacy@mattmacy.io> Date: Fri May 25 16:09:50 2018 -0700 pmu-events: expand out skylake regex to simplify string matches Notes: svn path=/head/; revision=334242
* kern_cpuset: fix small leak on error pathEric van Gyzen2018-05-261-5/+7
| | | | | | | | | | | The "mask" was leaked on some error paths. Reported by: Coverity CID: 1384683 Sponsored by: Dell EMC Notes: svn path=/head/; revision=334240
* if_hn: fix use of uninitialized variableEric van Gyzen2018-05-261-2/+1
| | | | | | | | | | | | | | omcast was used without being initialized in the non-multicast case. The only effect was that the interface's multicast output counter could be incorrect. Reported by: Coverity CID: 1379662 MFC after: 3 days Sponsored by: Dell EMC Notes: svn path=/head/; revision=334239
* kdb_trap: Fix use of uninitialized dataEric van Gyzen2018-05-261-2/+3
| | | | | | | | | | | | In some cases, other_cpus was used without being initialized. Thankfully, it was harmless. Reported by: Coverity CID: 1385265 Sponsored by: Dell EMC Notes: svn path=/head/; revision=334238
* Revert r333493, which was a temporary fix for 11.2-RELEASE, and insteadEdward Tomasz Napierala2018-05-262-2/+1
| | | | | | | | | | | | | | | switch the default kldxref_enable to YES. The reason is that it's required for every image that's being cross-built, as kldxref(8) cannot handle files for non-native architectures. For the one that is not - amd64 - having it on by default doesn't change anything; the script is noop if the linker.hints already exists. MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=334237
* kldstat: align "Size" to the rightEitan Adler2018-05-261-2/+2
| | | | | | | | | | | This change also makes alignment and spacing an explicit number rather than a bunch of spaces. Reviewed by: mmacy Requested by: Yuri Pankov <yuripv@yuripv.net> Notes: svn path=/head/; revision=334236
* On POWER9 clear the HID0_RADIX before enabling the page tablesJustin Hibbits2018-05-262-0/+8
| | | | | | | | | | | | | POWER9 supports Radix page tables in addition to Hashed page tables. When Radix page tables are in use, the TLB is cut in half, so that half of the TLB is used for the page walk cache. This is the default behavior, however FreeBSD currently does not support Radix tables. Clear this bit so that we can use the full TLB. Do this in the MMU logic so that configuration can be localized to the specific translation format. Once we do support Radix tables, the setup for that will be localized to the Radix MMU kobj. Notes: svn path=/head/; revision=334235
* Fix a typo missed in r334232Justin Hibbits2018-05-261-1/+1
| | | | Notes: svn path=/head/; revision=334234
* Use pmap_enter(..., psind=1) in vm_fault_populate() on amd64. WhileAlan Cox2018-05-261-18/+38
| | | | | | | | | | | | | | | superpage mappings were already being created by automatic promotion in vm_fault_populate(), this change reduces the cost of creating those mappings. Essentially, one pmap_enter(..., psind=1) call takes the place of 512 pmap_enter(..., psind=0) calls, and that one pmap_enter(..., psind=1) call eliminates the allocation of a page table page. Reviewed by: kib MFC after: 10 days Differential Revision: https://reviews.freebsd.org/D15572 Notes: svn path=/head/; revision=334233
* Correct a typo for opal temperature sensor type constantJustin Hibbits2018-05-261-2/+2
| | | | Notes: svn path=/head/; revision=334232
* iflib: Add new shared flag: IFLIB_ADMIN_ALWAYS_RUNEric Joyner2018-05-262-2/+6
| | | | | | | | | | | | | | | | | | | | ixl(4)'s nvmupdate utility expects the nvmupdate process to run while the interface is down; these nvm update commands use the admin queue, so the admin queue needs to be able to generate interrupts and be processed while the interface is down. So add a flag that ixl(4) sets that lets the entire admin task run even when the interface is marked down/IFF_DRV_RUNNING isn't set. With this change, nvmupdate should function like it did pre-iflib. Reviewed by: gallatin@, sbruno@ MFC after: 1 week Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D15575 Notes: svn path=/head/; revision=334231
* Only crop the VPN on POWER4 and derivatives for TLBIE operationsJustin Hibbits2018-05-261-1/+14
| | | | | | | | | | | | | | | Summary: PowerISA 2.03 and later require bits 14:65 in the RB register argument, which is the full value of the vpn argument post-shift. Only POWER4, POWER4+, and PPC970* need the upper 16 bits cropped. With this change FreeBSD can boot to multi-user on POWER9. Reviewed by: nwhitehorn Differential Revision: https://reviews.freebsd.org/D15581 Notes: svn path=/head/; revision=334230
* META_MODE: Fix trying to rebuild jevents due to missing .meta file.Bryan Drewery2018-05-251-0/+3
| | | | | | | | | The tool is built separately in buildworld in a subdirectory rather than how other build-tools are done. Subdirectory builds in lib/libpmcstat remain broken since the tool cannot be auto-built from here. Notes: svn path=/head/; revision=334228
* Use proper BTOOLSPATH for build-tools path.Bryan Drewery2018-05-251-5/+1
| | | | Notes: svn path=/head/; revision=334227
* Cleanup styleBryan Drewery2018-05-251-4/+5
| | | | Notes: svn path=/head/; revision=334226
* Support -DNO_CLEAN builds across r334223+r334224.Brooks Davis2018-05-251-1/+2
| | | | Notes: svn path=/head/; revision=334225
* Regen after r334223: make vadvise compat freebsd11.Brooks Davis2018-05-2510-56/+12
| | | | Notes: svn path=/head/; revision=334224
* Make vadvise compat freebsd11.Brooks Davis2018-05-256-19/+53
| | | | | | | | | | | | | The vadvise syscall (aka ovadvise) is undocumented and has always been implmented as returning EINVAL. Put the syscall under COMPAT11 and provide a userspace implementation. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15557 Notes: svn path=/head/; revision=334223
* rtrequest1_fib: we need to always bump the ifaddr refcount when we take a ↵Matt Macy2018-05-251-5/+3
| | | | | | | | | | | | | | reference from an rtentry. r334118 introduced a case when this was not done. While we're here make the intent more obvious by moving the refcount bump down to when we know we'll actually need it. Reported by: markj Notes: svn path=/head/; revision=334222
* rc.subr: Support loading environmental variables from a fileMark Felder2018-05-251-1/+10
| | | | | | | | | | | | | | The current support for setting environment via foo_env="" in rc.conf is not scalable and does not handle envs with spaces in the value. It seems a common pattern for some newer software is to skip configuration files altogether and rely on the env. This is well supported in systemd unit files and may be the inspiration for this trend. MFH: 1 week Differential Revision: https://reviews.freebsd.org/D14453 Notes: svn path=/head/; revision=334221
* We don't need check if str is NULL as free(3) will handle NULLMarcelo Araujo2018-05-251-2/+1
| | | | | | | | | argument. Reported by: kib@ Notes: svn path=/head/; revision=334219
* Fix building GENERIC-MMCCAM on arm64Ilya Bakulin2018-05-251-0/+2
| | | | | | | | | | | | | Since GENERIC includes quite a few drivers now, all MMC drivers should have appropriate MMCCAM-related ifdefs and include opt_mmccam.h so that those ifdefs are actually processed correctly. Reviewed by: manu Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D15569 Notes: svn path=/head/; revision=334218
* cxgbe(4): Suppress a warning about code that is used only with optionsNavdeep Parhar2018-05-251-0/+2
| | | | | | | | | RATELIMIT. Reported by: mmacy@ Notes: svn path=/head/; revision=334217
* After a long discussion about assert(3), we gonna use a HardenedBSDMarcelo Araujo2018-05-251-2/+5
| | | | | | | | | | | approach to chek strdup(3) memory allocation. Submitted by: Shaw Webb <shawn.webb@hardenedbsd.org> Reported by: brooks Obtained from: HardenedBSD Notes: svn path=/head/; revision=334216
* pmcstat(8)Sean Bruno2018-05-252-3/+14
| | | | | | | | | | | - Document per thread filtering. Submitted by: kbowling Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15549 Notes: svn path=/head/; revision=334215
* if_muge: Use lock assertion instead of broken locking in lan78xx_chip_initEd Maste2018-05-251-7/+1
| | | | | | | | | | | | Previously lan78xx_chip_init locked the driver's mutex if not already locked, but unlocked it only in the case of error. This provided a fairly clear indication that the function is already called with the lock held, so just replace it with a lock assertion. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=334213
* if_muge: connect module to the buildEd Maste2018-05-251-0/+1
| | | | | | | | | | | | | | | | Supported Microchip devices: - LAN7515 USB 2 hub and gigabit Ethernet controller w/ PHY - LAN7800 USB 3.0 gigabit Ethernet controller w/ PHY The LAN7515 is the Ethernet controller on the Raspberry Pi 3 B+. This driver has some TODO items outstanding, but basic functionality works. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=334212
* Optimize i386 pmap_extract_and_hold().Konstantin Belousov2018-05-252-5/+19
| | | | | | | | | | | | | | | | | | | | | In particular, stop using pmap_pte() to read non-promoted pte while walking the page table. pmap_pte() needs to shoot down the kernel mapping globally which causes IPI broadcast. Since pmap_extract_and_hold() is used for slow copyin(9), it is very significant hit for the 4/4 kernels. Instead, create single purpose per-processor page frame and use it to locally map page table page inside the critical section, to avoid reuse of the frame by other thread if context switched. Measurement demostrated very significant improvements in any load that utilizes copyin/copyout. Found and benchmarked by: bde Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=334211
* Cleanup. Remove unused instruction and label.Konstantin Belousov2018-05-251-4/+0
| | | | | | | | Tested by: bde Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=334210
* Extend show proc with reaper, sigparent, and vmspace informationBjoern A. Zeeb2018-05-251-0/+11
| | | | | | | | | I have regularly needed the last couple of months. Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=334209
* rctl: correct use of "vmem" instead of "vmemoryuse"Eitan Adler2018-05-251-3/+3
| | | | | | | | | Submitted by: Jamie Landeg-Jones <jamie@catflap.org> PR: 228482 MFC after: 1 month Notes: svn path=/head/; revision=334208
* Add time2posix and posix2time to time.hEitan Adler2018-05-251-0/+2
| | | | | | | | | | | These are documented in `time2posix.3` but the symbols are not actually visible. Since these are not POSIX hide them behind _BSD_VISIBLE. Reviewed by: wollman Differential Revision: https://reviews.freebsd.org/D15530 Notes: svn path=/head/; revision=334207
* Add myself (arrowd) to share/misc/committers-ports.dotGleb Popov2018-05-251-0/+3
| | | | | | | Approved by: tcberner (mentor) Notes: svn path=/head/; revision=334206
* xen: remove dead code from gnttab.hRoger Pau Monné2018-05-251-42/+0
| | | | | | | | | | | | | This code was left over when it was imported from Linux. The original committer thought that those functions would be implemented, so the prototypes where left in place. Delete them at once. Submitted by: pratyush Reviewed by: royger Differential Review: https://reviews.freebsd.org/D15553 Notes: svn path=/head/; revision=334205
* re-synchronize TSC-s on SMP systems after resume, if necessaryAndriy Gapon2018-05-254-4/+35
| | | | | | | | | | | | | | | | | | | | | The TSC-s are checked and synchronized only if they were good originally. That is, invariant, synchronized, etc. This is necessary on an AMD-based system where after a wakeup from STR I see that BSP clock differs from AP clocks by a count that roughly corresponds to one second. The APs are in sync with each other. Not sure if this is a hardware quirk or a firmware bug. This is what I see after a resume with this change: SMP: passed TSC synchronization test after adjustment acpi_timer0: restoring timecounter, ACPI-fast -> TSC-low Reviewed by: kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D15551 Notes: svn path=/head/; revision=334204
* fix zfs_getpages crash when called from sendfile, followup to r329363Andriy Gapon2018-05-251-10/+18
| | | | | | | | | | | | | | | | | | | | | | It turns out that sendfile_swapin() has an optimization where it may insert pointers to bogus_page into the page array that it passes to VOP_GETPAGES. That happens to work with buffer cache, because it extensively uses bogus_page internally, so it has the necessary checks. However, ZFS did not expect bogus_page as VOP_GETPAGES(9) does not document such a (ab)use of bogus_page. So, this commit adds checks and handling of bogus_page. I expect that use of bogus_page with VOP_GETPAGES will get documented sooner rather than later. Reported by: Andrew Reilly <areilly@bigpond.net.au>, delphij Tested by: Andrew Reilly <areilly@bigpond.net.au> Requested by: many MFC after: 1 week Notes: svn path=/head/; revision=334203
* Refactor NVMe CAM integration.Alexander Motin2018-05-259-145/+271
| | | | | | | | | | | | | | | | | | | | | | | | - Remove layering violation, when NVMe SIM code accessed CAM internal device structures to set pointers on controller and namespace data. Instead make NVMe XPT probe fetch the data directly from hardware. - Cleanup NVMe SIM code, fixing support for multiple namespaces per controller (reporting them as LUNs) and adding controller detach support and run-time namespace change notifications. - Add initial support for namespace change async events. So far only in CAM mode, but it allows run-time namespace arrival and departure. - Add missing nvme_notify_fail_consumers() call on controller detach. Together with previous changes this allows NVMe device detach/unplug. Non-CAM mode still requires a lot of love to stay on par, but at least CAM mode code should not stay in the way so much, becoming much more self-sufficient. Reviewed by: imp MFC after: 1 month Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=334200
* Fix a memory leak on topology_parse().Marcelo Araujo2018-05-251-2/+9
| | | | | | | | | | | | | | | | | | | strdup(3) allocates memory for a copy of the string, does the copy and returns a pointer to it. If there is no sufficient memory NULL is returned and the global errno is set to ENOMEM. We do a sanity check to see if it was possible to allocate enough memory. Also as we allocate memory, we need to free this memory used. Or it will going out of scope leaks the storage it points to. Reviewed by: rgrimes MFC after: 3 weeks. X-MFC: r332298 Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D15550 Notes: svn path=/head/; revision=334199
* Remove extra space before parenthesis in src.conf(5)Rebecca Cran2018-05-252-3/+3
| | | | | | | | Reviewed by: eadler Differential Revision: https://reviews.freebsd.org/D15528 Notes: svn path=/head/; revision=334198
* [ath_hal] migrate the shared HAL_RESET_* pieces out into ath_hal.Adrian Chadd2018-05-253-12/+6
| | | | | | | | | I'm in the process of reworking how the reset path works with an eye to better recovery when the chips hang and/or go RF/PHY deaf. This is the first step in a lot of unification and API changes. Notes: svn path=/head/; revision=334197
* MALTA64EL: disable modules until objcopy is fixedMatt Macy2018-05-241-1/+1
| | | | Notes: svn path=/head/; revision=334195
* netipsec/!VIMAGE: don't declare/define spdcache_destroy on non-VIMAGE buildsMatt Macy2018-05-241-2/+4
| | | | | | | this breaks MIPS compiles in universe Notes: svn path=/head/; revision=334194
* CK: update consumers to use CK macros across the boardMatt Macy2018-05-249-43/+44
| | | | | | | | r334189 changed the fields to have names distinct from those in queue.h in order to expose the oversights as compile time errors Notes: svn path=/head/; revision=334193
* Protect bzero call against macro expansionWarner Losh2018-05-241-1/+1
| | | | | | | | | | | Shortly, we'll be moving to defining bzero and memset in terms of __builting_memset. To do that, we can't have macro calls to bzero in the fallback impelmentation of memset. Normal calls to bzero are fine. All 4 architectures that use this have their own copies of bzero, so there's no mutual recursion issue between memset and bcopy. Notes: svn path=/head/; revision=334192
* Fix exit code for mismatches after r333013.Bryan Drewery2018-05-241-3/+5
| | | | | | | | | | The -c flag still does the wrong thing versus the older version due to lack of pipefail support. Reported by: antoine Notes: svn path=/head/; revision=334190
* Import CK as of commit 0f017230ccc86929f56bf44ef2dca93d7df8076b.Olivier Houchard2018-05-241-101/+101
|\ | | | | | | | | | | | | | | This brings us the renaming of fields in ck_queue, so that our own LIST/SLIST/TAILQ/etc won't accidentally work with them. Notes: svn path=/head/; revision=334189
| * Import CK as of commit 0f017230ccc86929f56bf44ef2dca93d7df8076b.vendor/ck/20180524Olivier Houchard2018-05-241-101/+101
| | | | | | | | | | | | | | | | | | This brings us the renaming of fields in ck_queue, so that our own LIST/SLIST/TAILQ/etc won't accidentally work with them. Notes: svn path=/vendor-sys/ck/dist/; revision=334187 svn path=/vendor-sys/ck/20180524/; revision=334188; tag=vendor/ck/20180524
| * Import CK as of commit deca119d14bfffd440770eb67cbdbeaf7b57eb7bvendor/ck/20180517Olivier Houchard2018-05-172-6/+17
| | | | | | | | | | | | | | | | | | This brings us ck_epoch_deferred, which is used by the new facility epoch(9). Notes: svn path=/vendor-sys/ck/dist/; revision=333762 svn path=/vendor-sys/ck/20180517/; revision=333763; tag=vendor/ck/20180517
* | libpmcstat: Don't build pmu tables on !amd64 until the correspondingMatt Macy2018-05-242-4/+3
| | | | | | | | | | | | | | | | | | | | util routines have been written and tested. Currently building them breaks the build on power64 Reported by: emaste Notes: svn path=/head/; revision=334186
* | AF_UNIX: It is possible for UNIX datagram sockets to be connectedMatt Macy2018-05-241-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | to themselves. The updated code assumed that that could not happen and would try to lock the unp mutex twice. There may be a lingering issue here but this fixes it for the reporter. PR: 228458 Reported by: marieheleneka at gmail.com Notes: svn path=/head/; revision=334185