freebsd-skq/sys
bde 24c8af8da8 Finish the fix for overflow in calcru1().
The previous fix was unnecessarily very slow up to 105 hours where the
simple formula used previously worked, and unnecessarily slow by a factor
of about 5/3 up to 388 days, and didn't work above 388 days.  388 days is
not a long time, since it is a reasonable uptime, and for processes the
times being calculated are aggregated over all threads, so with N CPUs
running the same thread a runtime of 388 days is reachable after only
388 / N physical days.

The PRs document overflow at 388 days, but don't try to fix it.

Use the simple formula up to 76 hours.  Then use a complicated general
method that reduces to the simple formula up to a bit less than 105
hours, then reduces to the previous method without its extra work up
to almost 388 days, then does more complicated reductions, usually
many bits at a time so that this is not slow.  This works up to half
of maximum representable time (292271 years), with accumulated rounding
errors of at most 32 usec.

amd64 can do all this with no avoidable rounding errors in an inline
asm with 2 instructions, but this is too special to use.  __uint128_t
can do the same with 100's of instructions on 64-bit arches.  Long
doubles with at least 64 bits of precision are the easiest method to
use on i386 userland, but are hard to use in the kernel.

PR:		76972 and duplicates
Reviewed by:	kib
2019-02-14 19:07:08 +00:00
..
amd64 Implement Address Space Layout Randomization (ASLR) 2019-02-10 17:19:45 +00:00
arm Enable enabling ASLR on non-x86 architectures. 2019-02-14 14:44:53 +00:00
arm64 Enable enabling ASLR on non-x86 architectures. 2019-02-14 14:44:53 +00:00
bsm Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
cam Fix panic message. 2019-02-13 00:10:12 +00:00
cddl s/Maximal/Maximum/ in sysctl description. 2019-02-04 20:09:22 +00:00
compat Make taskqgroup_attach{,_cpu}(9) work across architectures 2019-02-12 21:23:59 +00:00
conf Fix flags used when compiling kern_kcov.c and subr_coverage.c. 2019-02-11 15:38:05 +00:00
contrib Remove empty files 2019-02-12 08:16:05 +00:00
crypto Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
ddb ddb: Print the thread's pcb in 'show thread' 2019-02-09 21:08:19 +00:00
dev ixl: Fix panic caused by bug exposed by r344062 2019-02-14 18:02:37 +00:00
dts Adapt FreeBSD specific DT stub for Jetson TK1 board to be consistent with 2019-02-06 06:03:44 +00:00
fs Un null_vptocnp(), cache vp->v_mount and use it for null_nodeget() call. 2019-02-08 08:20:18 +00:00
gdb
geom geom_uzip(4): set 'gp != NULL' assertion on top of the function 2019-01-26 17:17:25 +00:00
gnu Import DTS from Linux 4.20 2019-01-11 09:40:34 +00:00
i386 Provide userspace versions of do_cpuid() and cpuid_count() on i386. 2019-02-14 13:53:11 +00:00
isa Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
kern Finish the fix for overflow in calcru1(). 2019-02-14 19:07:08 +00:00
kgssapi OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
libkern mcount: tidy up ANSIfication 2018-10-20 22:39:35 +00:00
mips Enable enabling ASLR on non-x86 architectures. 2019-02-14 14:44:53 +00:00
modules With r344062 in place, hwpmc_mod.c generally needs bus_if.h and 2019-02-12 23:39:18 +00:00
net This commit adds the missing release mechanism for the 2019-02-13 14:57:59 +00:00
net80211 net80211(4): hide casts for 'i_seq' field offset calculation inside 2019-02-10 23:58:56 +00:00
netgraph Remove remnants of byte order manipulation, back when FreeBSD stack 2019-02-09 03:00:00 +00:00
netinet In r335015 PCB destroing was made deferred using epoch_call(). 2019-02-13 15:46:05 +00:00
netinet6 New pfil(9) KPI together with newborn pfil API and control utility. 2019-01-31 23:01:03 +00:00
netipsec Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netpfil Remove `set' field from state structure and use set from parent rule. 2019-02-11 18:10:55 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs
nfsclient
nfsserver
nlm
ofed Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
opencrypto As struct cryptop is wrapped in #ifdef _KERNEL, userland doesn't 2019-02-10 21:27:03 +00:00
powerpc [PPC64] Fix mismatch between thread flags and MSR 2019-02-14 15:15:32 +00:00
riscv Enable enabling ASLR on non-x86 architectures. 2019-02-14 14:44:53 +00:00
rpc Add kern.rpc.gss.client_max, to make it possible to bump it easily. 2018-12-15 11:32:11 +00:00
security Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
sparc64 Enable enabling ASLR on non-x86 architectures. 2019-02-14 14:44:53 +00:00
sys Make taskqgroup_attach{,_cpu}(9) work across architectures 2019-02-12 21:23:59 +00:00
teken My recent fix for programmable function keys in syscons only worked 2019-02-05 16:59:29 +00:00
tests Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
tools make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH 2018-12-14 23:53:28 +00:00
ufs This bug was introduced with the change to use softdep_bp_to_mp() in 2019-01-28 21:36:45 +00:00
vm Make anon clustering more compatible. 2019-02-14 15:45:53 +00:00
x86 Port sysctl kern.elf32.read_exec from amd64 to i386. 2019-02-07 02:17:34 +00:00
xdr
xen xen: introduce a new way to setup event channel upcall 2019-01-30 11:34:52 +00:00
Makefile