| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Update #3175.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement userspace gettimeofday(2) with HPET timecounter.
Right now, userspace (fast) gettimeofday(2) on x86 only works for
RDTSC. For older machines, like Core2, where RDTSC is not C2/C3
invariant, and which fall to HPET hardware, this means that the call
has both the penalty of the syscall and of the uncached hw behind the
QPI or PCIe connection to the sought bridge. Nothing can me done
against the access latency, but the syscall overhead can be removed.
System already provides mappable /dev/hpetX devices, which gives
straight access to the HPET registers page.
Add yet another algorithm to the x86 'vdso' timehands. Libc is updated
to handle both RDTSC and HPET. For HPET, the index of the hpet device
to mmap is passed from kernel to userspace, index might be changed and
libc invalidates its mapping as needed.
Remove cpu_fill_vdso_timehands() KPI, instead require that
timecounters which can be used from userspace, to provide
tc_fill_vdso_timehands{,32}() methods. Merge i386 and amd64
libc/<arch>/sys/__vdso_gettc.c into one source file in the new
libc/x86/sys location. __vdso_gettc() internal interface is changed
to move timecounter algorithm detection into the MD code.
Measurements show that RDTSC even with the syscall overhead is faster
than userspace HPET access. But still, userspace HPET is three-four
times faster than syscall HPET on several Core2 and SandyBridge
machines.
Tested by: Howard Su <howard0su@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Differential revision: https://reviews.freebsd.org/D7473
Update #3175.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide the boottime and bootimebin globals, provide the getboottime(9) and getboottimebin(9) KPI. Change consumers of boottime to use the KPI. The variables were renamed to avoid shadowing issues with local variables of the same name.
Issue is that boottime* should be adjusted from tc_windup(), which
requires them to be members of the timehands structure. As a
preparation, this commit only introduces the interface.
Some uses of boottime were found doubtful, e.g. NLM uses boottime to
identify the system boot instance. Arguably the identity should not
change on the leap second adjustment, but the commit is about the
timekeeping code and the consumers were kept bug-to-bug compatible.
Tested by: pho (as part of the bigger patch)
Reviewed by: jhb (same)
Discussed with: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
X-Differential revision: https://reviews.freebsd.org/D7302
Update #3175.
|
|
|
|
|
|
|
|
|
|
| |
sys/sys: minor spelling fixes.
While the changes are minor, these headers are very visible.
MFC after: 2 weeks
Update #3175.
|
|
|
|
|
|
|
|
|
|
| |
Constify the pointers to eventtimer and timecounter name strings.
The need for this appears as soon as you try to set the names to something
that isn't a "quoted literal". (I'm actually confused why quoted strings
aren't a problem as well, we must have some warning disabled.)
Update #3175.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement a mechanism for making changes in the kernel<->driver PPS interface without breaking ABI or API compatibility with existing drivers.
The existing data structures used to communicate between the kernel and
driver portions of PPS processing contain no spare/padding fields and no
flags field or other straightforward mechanism for communicating changes
in the structures or behaviors of the code. This makes it difficult to
MFC new features added to the PPS facility. ABI compatibility is
important; out-of-tree drivers in module form are known to exist. (Note
that the existing api_version field in the pps_params structure must
contain the value mandated by RFC 2783 and any RFCs that come along after.)
These changes introduce a pair of abi-version fields which are filled in
by the driver and the kernel respectively to indicate the interface
version. The driver sets its version field before calling the new
pps_init_abi() function. That lets the kernel know how much of the
pps_state structure is understood by the driver and it can avoid using
newer fields at the end of the structure that it knows about if the driver
is a lower version. The kernel fills in its version field during the init
call, letting the driver know what features and data the kernel supports.
To implement the new version information in a way that is backwards
compatible with code from before these changes, the high bit of the
lightly-used 'kcmode' field is repurposed as a flag bit that indicates the
driver is aware of the abi versioning scheme. Basically if this bit is
clear that indicates a "version 0" driver and if it is set the driver_abi
field indicates the version.
These changes also move the recently-added 'mtx' field of pps_state from
the middle to the end of the structure, and make the kernel code that uses
this field conditional on the driver being abi version 1 or higher. It
changes the only driver currently supplying the mtx field, usb_serial, to
use pps_init_abi().
Reviewed by: hselasky@
Update #3175.
|
|
|
|
|
|
|
|
|
| |
Add mutex support to the pps_ioctl() API in the kernel. Bump kernel version to reflect structure change.
PR: 196897
MFC after: 1 week
Update #3175.
|
|
|
|
|
|
| |
Use Processor_mask instead.
Update #2514.
|
| |
|
|
|
|
|
|
|
|
| |
The timestamp are based on the uptime. There is no need for a 64-bit
seconds part. The signed 32-bit seconds part of the sbintime_t limits
the uptime to roughly 68 years.
Close #2740.
|
|
|
|
|
|
|
| |
Use the timestamps only for uptime based values. Use struct timespec
for the absolute time values (TOD).
Update #2740.
|
|
|
|
| |
Update #2740.
|
|
|
|
|
|
|
|
| |
POSIX mutexes are now available in all configurations and no longer
depend on --enable-posix.
Update #2514.
Update #3112.
|
|
|
|
|
|
|
|
| |
POSIX condition variables are now available in all configurations and no
longer depend on --enable-posix.
Update #2514.
Update #3113.
|
|
|
|
|
|
|
|
| |
POSIX rwlocks are now available in all configurations and no longer
depend on --enable-posix.
Update #2514.
Update #3115.
|
|
|
|
|
|
|
|
| |
POSIX barriers are now available in all configurations and no longer
depend on --enable-posix.
Update #2514.
Update #3114.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For semaphore object pointer and object validation see
POSIX_SEMAPHORE_VALIDATE_OBJECT().
Destruction or close of a busy semaphore returns an error status. The
object is not flushed.
POSIX semaphores are now available in all configurations and no longer
depend on --enable-posix.
Update #2514.
Update #3116.
|
|
|
|
|
|
| |
Reduce size of pthread_once_t and make it zero-initialized.
Update #3142.
|
|
|
|
|
|
|
|
| |
The internal status codes encode a Classic rtems_status_code and error
codes used by the POSIX and C11/C++11 APIs. In case the POSIX API is
disabled, the C11/C++11 support must still work.
Close #3167.
|
|
|
|
|
|
|
|
| |
Make the RBTree_Node layout independent of RTEMS_DEBUG (and all other
build configuration options). This allows the use of this structure in
Newlib.
Update #3112.
|
|
|
|
|
|
|
| |
Rename struct Scheduler_Control to _Scheduler_Control to allow its use
in standard header files, e.g. <pthread.h>.
Update #3112.
|
|
|
|
| |
Update #3059.
|
|
|
|
| |
Close #2133.
|
|
|
|
| |
Close #2132.
|
|
|
|
| |
Update #3082.
|
|
|
|
| |
This fixes some "variably modified" warnings and a clang compile error.
|
|
|
|
|
|
| |
Add new fatal error INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT.
Update #3077.
|
|
|
|
| |
Update #3077.
|
|
|
|
| |
Update #3059.
|
|
|
|
| |
Close #3071.
|
|
|
|
|
|
|
| |
Ensure that the thread processor affinity fits the new scheduler
instance.
Update #3059.
|
|
|
|
| |
Update #3059.
|
|
|
|
|
|
|
| |
This allows scheduler implementations to easily access
scheduler-specific data.
Update #3059.
|
|
|
|
| |
Update #3059.
|
|
|
|
|
|
|
|
| |
The set of online processors must be a subset of the thread processor
affinity for the schedulers without arbitrary processor affinity support
to avoid problems in case of processor addition and removal.
Update #3059.
|
|
|
|
| |
Update #3059.
|
|
|
|
| |
Update #3059.
|
|
|
|
|
|
|
| |
Replace the simple processor count with the processor set owned by the
scheduler instance.
Update #3059.
|
|
|
|
| |
Update #3059.
|
|
|
|
| |
Update #3059.
|
|
|
|
| |
Update #3059.
|
|
|
|
|
|
|
|
| |
Implement the Processor_mask via <sys/bitset.h>. Provide
_Processor_mask_To_uint32_t() to enable its use in device specific
routines, e.g. interrupt affinity register in an interrupt controller.
Update #3059.
|
|
|
|
| |
Update #3056.
|
|
|
|
| |
Update #3056.
|
|
|
|
|
|
|
| |
In SMP configurations, add a red-black tree node to Scheduler_Node to
enable an EDF scheduler implementation.
Update #3056.
|
|
|
|
|
|
| |
This task variable is superfluous since we use thread-local storage now.
Update #2289.
|
|
|
|
| |
Update #2468.
|
|
|
|
|
|
|
|
| |
The original CPU_COPY() support of Newlib <sys/cpuset.h> had the
parameters in the wrong order. This is fixed in Newlib since
2017-05-22.
Update #3023.
|
| |
|
|
|
|
|
|
|
|
|
| |
Check that no ask help request is registered during unblock and yield
scheduler operations. There is no need to ask for help if a scheduled
thread yields, since this is already covered by the pre-emption
detection.
Update #2556.
|