summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-13testsuites/validation/tc-timecounter-get.cqual-43Sebastian Huber
2021-10-13testsuites/validation/tc-timecounter-install.cSebastian Huber
2021-10-13testsuites/unit/tc-config.cSebastian Huber
2021-10-13testsuites/validation/tc-timer-server-fire-after.cSebastian Huber
2021-10-13testsuites/validation/tr-tq-timeout-priority-inherit.cSebastian Huber
2021-10-13validation: Test timecounterSebastian Huber
2021-10-12rtems: Add new clock manager directivesSebastian Huber
Update #4527.
2021-10-12score: Optimize timehand updates for non-SMPSebastian Huber
In uniprocessor configurations, the timehand updates are done with interrupts disabled. So, it is impossible to observe a generation number of zero.
2021-10-12score: Port large time delta support to RTEMSSebastian Huber
2021-10-12score: Initialize timehand generation to UINT_MAXSebastian Huber
This leads to a timehand generation overflow right at the system start and helps to get code coverage in test programs.
2021-10-12score: Disable NTP adjustementsSebastian Huber
Since the ntp_update_second() does nothing nobody can change the th_adjustment to a non-zero value. Remove this member and disable the related code blocks. Update #2348.
2021-10-12Remove "All Rights Reserved" fromEd Maste
FreeBSD Foundation sys/ copyrights These ones were unambiguous cases where the Foundation was the only listed copyright holder (in the associated license block). Sponsored by: The FreeBSD Foundation
2021-10-12kern: clarify boot timeWarner Losh
In FreeBSD, the current time is computed from uptime + boottime. Uptime is a continuous, smooth function that's monotonically increasing. To effect changes to the current time, boottime is adjusted. boottime is mutable and shouldn't be cached against future need. Document the current implementation, with the caveat that we may stop stepping boottime on resume in the future and will step uptime instead (noted in the commit message, but not in the code). Sponsored by: Netflix Reviewed by: phk, rpokala Differential Revision: https://reviews.freebsd.org/D30116
2021-10-12Make kern.timecounter.hardware tunableKonstantin Belousov
Noted and reviewed by: kevans MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D29122
2021-10-12Add ddb 'show timecounter' command.Konstantin Belousov
MFC after: 1 week Sponsored by: The FreeBSD Foundation
2021-10-12Changes that improve DTrace FBT reliabilityRobert Watson
on freebsd/arm64: - Implement a dtrace_getnanouptime(), matching the existing dtrace_getnanotime(), to avoid DTrace calling out to a potentially instrumentable function. (These should probably both be under KDTRACE_HOOKS. Also, it's not clear to me that they are correct implementations for the DTrace thread time functions they are used in .. fixes for another commit.) - Don't allow FBT to instrument functions involved in EL1 exception handling that are involved in FBT trap processing: handle_el1h_sync() and do_el1h_sync(). - Don't allow FBT to instrument DDB and KDB functions, as that makes it rather harder to debug FBT problems. Prior to these changes, use of FBT on FreeBSD/arm64 rapidly led to kernel panics due to recursion in DTrace. Reliable FBT on FreeBSD/arm64 is reliant on another change from @andrew to have the aarch64 instrumentor more carefully check that instructions it replaces are against the stack pointer, which can otherwise lead to memory corruption. That change remains under review. MFC after: 2 weeks Reviewed by: andrew, kp, markj (earlier version), jrtc27 (earlier version) Differential revision: https://reviews.freebsd.org/D27766
2021-10-12Remove double-calls to tc_get_timecount()Konstantin Belousov
to warm timecounters. It seems that second call does not add any useful state change for all implemented timecounters. Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
2021-10-12Mark more nodes as CTLFLAG_MPSAFEPawel Biernacki
or CTLFLAG_NEEDGIANT (17 of many) r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718
2021-10-12Consolidate read code for timecountersKonstantin Belousov
and fix possible overflow in bintime()/binuptime(). The algorithm to read the consistent snapshot of current timehand is repeated in each accessor, including the details proper rollup detection and synchronization with the writer. In fact there are only two different kind of readers: one for bintime()/binuptime() which has to do the in-place calculation, and another kind which fetches some member from struct timehand. Extract the logic into type-checked macros, GETTHBINTIME() for bintime calculation, and GETTHMEMBER() for safe read of a structure' member. This way, the synchronization is only written in bintime_off() and getthmember(). In bintime_off(), use overflow-safe calculation of th_scale * delta(timecounter). In tc_windup, pre-calculate the min delta value which overflows and require slow algorithm, into the new timehands th_large_delta member. This part with overflow fix was written by Bruce Evans. Reported by: Mark Millard <marklmi@yahoo.com> (the overflow issue) Tested by: pho Discussed with: emaste Sponsored by: The FreeBSD Foundation (kib) MFC after: 3 weeks
2021-10-12Remove duplicated empty lines from kern/*.cMateusz Guzik
No functional changes.
2021-10-12Initialize timehands linkage much earlier.Konstantin Belousov
Reported and tested by: trasz Sponsored by: The FreeBSD Foundation MFC after: 1 week
2021-10-12Make timehands count selectable at boottime.Konstantin Belousov
Tested by: O'Connor, Daniel <darius@dons.net.au> Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D21563 This patch was modified by Sebastian Huber <sebastian.huber@embedded-brains.de> to adjust it for RTEMS. See comment in the patch.
2021-10-12Instead of using an incomplete list of platformsOlivier Houchard
that uses 64bits time_t in 32bits mode, special case amd64, as i386 is the only arch that still uses 32bits time_t.
2021-10-12Create a new macro for static DPCPU data.Andrew Turner
On arm64 (and possible other architectures) we are unable to use static DPCPU data in kernel modules. This is because the compiler will generate PC-relative accesses, however the runtime-linker expects to be able to relocate these. In preparation to fix this create two macros depending on if the data is global or static. Reviewed by: bz, emaste, markj Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D16140
2021-10-12tc: bcopy -> memcpyMateusz Guzik
2021-10-12Move most of the contents of opt_compat.hBrooks Davis
to opt_global.h. opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is closer to "just about everywhere" than "only some files" per the guidance in sys/conf/options. Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h is created on all architectures. Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the set of compiled files. Reviewed by: kib, cem, jhb, jtl Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14941
2021-10-12score: Remove FreeBSD identifierSebastian Huber
2021-10-12Use atomic_load(9) to read ppsinfo sequence numbers.Konstantin Belousov
In this case volatile qualifiers enusre that a compiler does not optimize the accesses out. Reviewed by: alc, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13534
2021-10-12SPDX: use the Beerware identifier.Pedro F. Giffuni
2021-10-12testsuites/validation/tr-tq-timeout-priority-inherit.cSebastian Huber
2021-10-12testsuites/validation/tc-score-tq-smp.cSebastian Huber
2021-10-12testsuites/validation/tc-cpuuse.cSebastian Huber
2021-10-12tx-supportSebastian Huber
2021-10-12testsuites/validation/ts-config.hSebastian Huber
2021-10-12testsuites/validation/tc-ratemon-get-status.cSebastian Huber
2021-10-12testsuites/unit/tc-ratemon-statistics.cSebastian Huber
2021-10-12rtems: Fix rate monotonic statisticsSebastian Huber
The rate monotonic period statistics were affected by rtems_cpu_usage_reset(). The logic to detect and work around a CPU usage reset was broken. The Thread_Contol::cpu_time_used is changed to contain the processor time used throughout the entire lifetime of the thread. The new member Thread_Contol::cpu_time_used_at_last_reset is added to contain the processor time used at the time of the last reset through rtems_cpu_usage_reset(). This decouples the resets of the CPU usage and the rate monotonic period statistics. Update #4528.
2021-10-12score: Simplify _Watchdog_Next_first()Sebastian Huber
2021-10-08validation: Refine thread queue timeoutsSebastian Huber
2021-10-08validation: Refine thread queue surrenderSebastian Huber
2021-10-08validation: Priority inherit enqueue runnerSebastian Huber
2021-10-08unit: Add red-black tree testsSebastian Huber
2021-10-08validation/unit: Rate monotonic managerSebastian Huber
2021-10-08validation: Test rate monotonic timeoutSebastian Huber
2021-10-08validation: Test rtems_cpu_usage_reset()Sebastian Huber
2021-10-08Replace Doxygen main pageSebastian Huber
2021-10-08bsps/leon3: Fix group membershipsSebastian Huber
Update #3706.
2021-10-08validation: rtems_semaphore_release()Sebastian Huber
2021-10-08validation: Test helping with suspendedSebastian Huber
2021-10-08FIXME split getconfigmax.cSebastian Huber