1994-02-21 05:19:06 +00:00
|
|
|
# from: Makefile.inc,v 1.1 1993/09/03 19:04:23 jtc Exp
|
1999-08-28 00:22:10 +00:00
|
|
|
# $FreeBSD$
|
1994-01-31 12:05:32 +00:00
|
|
|
|
2012-06-22 07:13:30 +00:00
|
|
|
SRCS+= amd64_get_fsbase.c amd64_get_gsbase.c amd64_set_fsbase.c \
|
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
2016-08-17 09:52:09 +00:00
|
|
|
amd64_set_gsbase.c
|
2003-10-23 06:07:09 +00:00
|
|
|
|
2016-08-29 18:47:51 +00:00
|
|
|
MDASM= vfork.S brk.S cerror.S exect.S getcontext.S \
|
2015-07-07 09:25:51 +00:00
|
|
|
sbrk.S setlogin.S sigreturn.S
|
1998-03-09 07:36:56 +00:00
|
|
|
|
|
|
|
# Don't generate default code for these syscalls:
|
2016-09-08 22:38:20 +00:00
|
|
|
NOASM+= vfork.o
|