freebsd-nq/sys
Bruce Evans b698380f33 Quick fix for scaling of statclock ticks in the SMP case. As explained
in the log message for kern_sched.c 1.83 (which should have been
repo-copied to preserve history for this file), the (4BSD) scheduler
algorithm only works right if stathz is nearly 128 Hz.  The old
commit lock said 64 Hz; the scheduler actually wants nearly 16 Hz
but there was a scale factor of 4 to give the requirement of 64 Hz,
and rev.1.83 changed the scale factor so that the requirement became
128 Hz.  The change of the scale factor was incomplete in the SMP
case.  Then scheduling ticks are provided by smp_ncpu CPUs, and the
scheduler cannot tell the difference between this and 1 CPU providing
scheduling ticks smp_ncpu times faster, so we need another scale
factor of smp_ncp or an algorithm change.

This quick fix uses the scale factor without even trying to optimize
the runtime divisions required for this as is done for the other
scale factor.

The main algorithmic problem is the clamp on the scheduling tick counts.
This was 295; it is now approximately 295 * smp_ncpu.  When the limit
is reached, threads get free timeslices and scheduling becomes very
unfair to the threads that don't hit the limit.  The limit can be
reached and maintained in the worst case if the load average is larger
than (limit / effective_stathz - 1) / 2 = 0.65 now (was just 0.08 with
2 CPUs before this change), so there are algorithmic problems even for
a load average of 1.  Fortunately, the worst case isn't common enough
for the problem to be very noticeable (it is mainly for niced CPU hogs
competing with less nice CPU hogs).
2003-11-09 13:45:54 +00:00
..
alpha Document the lockfunc and lockfuncarg arguments to bus_dma_tag_create() in 2003-11-07 23:29:42 +00:00
amd64 Move a MD 32 bit binary support routine into the MD areas. exec_setregs 2003-11-08 07:43:44 +00:00
arm Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bit 2003-09-25 01:10:26 +00:00
boot Implement PAL_HALT_LIGHT now that the kernel halts the processor 2003-11-09 07:42:16 +00:00
cam - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
coda - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
compat Move a MD 32 bit binary support routine into the MD areas. exec_setregs 2003-11-08 07:43:44 +00:00
conf Rename npx.c to fpu.c (it isn't an extension, its part of the core 2003-11-08 02:40:40 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r122208, 2003-11-07 08:54:27 +00:00
crypto Add a testcase which validates that the same buffer can be passed to 2003-10-19 22:12:23 +00:00
ddb Reworked rev.1.14. Use the ELF symbol type again to summarily reject 2003-09-28 06:02:33 +00:00
dev Fix typo in breaking up requests to size limit. 2003-11-09 10:11:15 +00:00
fs - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
geom Close the right consumers if we run into trouble opening them all. 2003-10-24 18:47:31 +00:00
gnu Fixed a reference to a nonexistent variable in previous commit. Renaming 2003-11-05 11:56:58 +00:00
i4b - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
i386 - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
ia64 Remove the atkbd, psm, sc and vga devices. Most ia64 boxes out there 2003-11-08 23:19:13 +00:00
isa - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
isofs/cd9660 DuH! 2003-10-18 14:10:28 +00:00
kern Quick fix for scaling of statclock ticks in the SMP case. As explained 2003-11-09 13:45:54 +00:00
libkern - Support for multibyte charsets in LIBICONV. 2003-09-26 20:26:25 +00:00
modules Add the Makefile glue for the udf_iconv module. 2003-11-07 09:38:05 +00:00
net - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
net80211 Fix a reversed suser(9) in SIOCG80211:IEEE80211_IOC_WEPKEY which prevents 2003-11-05 04:16:48 +00:00
netatalk o add a flags parameter to netisr_register that is used to specify 2003-11-08 22:28:40 +00:00
netatm o add a flags parameter to netisr_register that is used to specify 2003-11-08 22:28:40 +00:00
netgraph o add a flags parameter to netisr_register that is used to specify 2003-11-08 22:28:40 +00:00
netinet replace explicit changes to rt_refcnt by RT_ADDREF and RT_REMREF 2003-11-08 23:36:32 +00:00
netinet6 replace explicit changes to rt_refcnt by RT_ADDREF and RT_REMREF 2003-11-08 23:36:32 +00:00
netipsec MFp4: portability work, general cleanup, locking fixes 2003-09-29 22:57:43 +00:00
netipx o add a flags parameter to netisr_register that is used to specify 2003-11-08 22:28:40 +00:00
netkey - cleanup SP refcnt issue. 2003-11-04 16:02:05 +00:00
netnatm o add a flags parameter to netisr_register that is used to specify 2003-11-08 22:28:40 +00:00
netncp The present defaults for the open and close for device drivers which 2003-09-27 12:01:01 +00:00
netsmb - Support for multibyte charsets in LIBICONV. 2003-09-26 20:26:25 +00:00
nfs
nfsclient Assert GIANT_REQUIRED where sockets are manipulated. This is 2003-11-07 22:57:09 +00:00
nfsserver Assert GIANT_REQUIRED where sockets are manipulated. This is 2003-11-07 22:57:09 +00:00
opencrypto falloc allocates a file structure and adds it to the file descriptor 2003-10-19 20:41:07 +00:00
pc98 - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
pccard - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
pci Ahh, the joys of badge engineering. Tell the sk driver that the 2003-11-07 22:04:26 +00:00
posix4 sched_setscheduler: Return EINVAL when a invalid policy is specified, 2003-09-13 18:46:24 +00:00
powerpc Add a stub cpu_idle() function for sparc64, alpha, powerpc. This is a 2003-10-19 02:36:07 +00:00
rpc
security Replace a '-' with a ')'. Update copyright. 2003-11-08 00:21:20 +00:00
sparc64 Add a stub cpu_idle() function for sparc64, alpha, powerpc. This is a 2003-10-19 02:36:07 +00:00
sys - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
tools Changes for new SMP-safe kobj method dispatch algorithm. 2003-10-16 13:29:26 +00:00
ufs Remove mntvnode_mtx and replace it with per-mountpoint mutex. 2003-11-05 04:30:08 +00:00
vm - Rename vm_map_clean() to vm_map_sync(). This better reflects the fact 2003-11-09 05:25:35 +00:00
Makefile Revert exclusion for amd64 that stopped boot/ being built. 2003-06-26 03:52:48 +00:00