freebsd-dev/sys
Marcel Moolenaar 3bdfa17c6c When switching the RSE to use the kernel stack as backing store, keep
the RNAT bit index constant. The net effect of this is that there's
no discontinuity WRT NaT collections which greatly simplifies certain
operations. The cost of this is that there can be up to 504 bytes of
unused stack between the true base of the kernel stack and the start
of the RSE backing store. The cost of adjusting the backing store
pointer to keep the RNAT bit index constant, for each kernel entry,
is negligible.

The primary reasons for this change are:
1. Asynchronuous contexts in KSE processes have the disadvantage of
   having to copy the dirty registers from the kernel stack onto the
   user stack. The implementation we had so far copied the registers
   one at a time without calculating NaT collection values. A process
   that used speculation would not work. Now that the RNAT bit index
   is constant, we can block-copy the registers from the kernel stack
   to the user stack without having to worry about NaT collections.
   They will be in the right place on the user stack.
2. The ndirty field in the trapframe is now also usable in userland.
   This was previously not the case because ndirty also includes the
   space occupied by NaT collections. The value could be off by 8,
   depending on the discontinuity. Now that the RNAT bit index is
   contants, we have exactly the same number of NaT collection points
   on the kernel stack as we would have had on the user stack if we
   didn't switch backing stores.
3. Debuggers and other applications that use ptrace(2) can now copy
   the dirty registers from the kernel stack (using ptrace(2)) and
   copy them whereever they want them (onto the user stack of the
   inferior as might be the case for gdb) without having to worry
   about NaT collections in the same way the kernel doesn't have to
   worry about them.

There's a second order effect caused by the randomization of the
base of the backing store, for it depends on the number of dirty
registers the processor happened to have at the time of entry into
the kernel. The second order effect is that the RSE will have a
better cache utilization as compared to having the backing store
always aligned at page boundaries. This has not been measured and
may be in practice only minimally beneficial, if at all measurable.
2003-10-28 19:38:26 +00:00
..
alpha Add a stub cpu_idle() function for sparc64, alpha, powerpc. This is a 2003-10-19 02:36:07 +00:00
amd64 Oops. Remove some rather noisy debug printfs that slipped in there 2003-10-28 01:06:37 +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 Directly call the 'reboot' word instead of indirectly evaluating it. 2003-10-28 17:18:42 +00:00
cam In camperiphdone(), make sure we check for fatal errors and bail out 2003-10-27 06:15:55 +00:00
coda Include <sys/mutex.h>. Don't depend on namespace pollution in <sys/vnode.h>. 2003-10-05 07:44:45 +00:00
compat Reject negative ngrp arguments in linux_setgroups() and linux_setgroups16(); 2003-10-21 11:00:33 +00:00
conf speedup stream socket recv handling by tracking the tail of 2003-10-28 05:47:40 +00:00
contrib Allow access to the field if it is within the region size rounded up 2003-10-22 22:30:57 +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 This should allow us to boot with DMA enabled on unknown PCI ATA 2003-10-28 19:01:48 +00:00
fs Remember to check the DE_WHITEOUT flag in the case where a cloned 2003-10-20 15:08:10 +00:00
geom Close the right consumers if we run into trouble opening them all. 2003-10-24 18:47:31 +00:00
gnu DuH! 2003-10-18 14:10:28 +00:00
i4b Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
i386 Fix pmap_unmapdev() to call pmap_kremove() instead of implementing it 2003-10-27 22:15:02 +00:00
ia64 When switching the RSE to use the kernel stack as backing store, keep 2003-10-28 19:38:26 +00:00
isa Look at the equipment list for amd64 as well as i386 for autodetecting 2003-10-23 05:52:52 +00:00
isofs/cd9660 DuH! 2003-10-18 14:10:28 +00:00
kern speedup stream socket recv handling by tracking the tail of 2003-10-28 05:47:40 +00:00
libkern - Support for multibyte charsets in LIBICONV. 2003-09-26 20:26:25 +00:00
modules Add dumb console driver and related bits. 2003-10-24 15:44:10 +00:00
net Delay if_lo module intialization until domain list has been 2003-10-27 04:16:32 +00:00
net80211 fix station mode breakage (repeat after me: "test every change, no 2003-10-17 23:59:11 +00:00
netatalk Remove unnecessary casts to (caddr_t) for if_broadcastaddr. 2003-10-23 17:48:53 +00:00
netatm The number of prefixes can never be negative so use an u_int for this. 2003-07-29 13:46:43 +00:00
netgraph Netgraph part of the NgATM signalling AA layer. These nodes can 2003-10-24 07:39:11 +00:00
netinet speedup stream socket recv handling by tracking the tail of 2003-10-28 05:47:40 +00:00
netinet6 make sure to accept only IPv6 packet. 2003-10-28 16:45:29 +00:00
netipsec MFp4: portability work, general cleanup, locking fixes 2003-09-29 22:57:43 +00:00
netipx Fix a bunch of off-by-one errors in the range checking code. 2003-09-11 21:40:21 +00:00
netkey mib name was changed by fixing a spelling. 2003-10-28 16:16:04 +00:00
netnatm Remove the last vestiges of ATM raw mode. This has not been useful for a 2003-08-06 14:34:38 +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 DuH! 2003-10-18 14:10:28 +00:00
nfsserver When grabbing vnodes to service NFS requests, make sure to call 2003-10-24 18:36:49 +00:00
opencrypto falloc allocates a file structure and adds it to the file descriptor 2003-10-19 20:41:07 +00:00
pc98 MFi386: revision 1.577. 2003-10-19 11:35:44 +00:00
pccard Change all SYSCTLS which are readonly and have a related TUNABLE 2003-10-21 18:28:36 +00:00
pci Add simple support for AGP 3.0 including enabling 8x mode. The simple 2003-10-23 18:08:56 +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 Make MAC_EXTERNALIZE() and MAC_INTERNALIZE() simply take the object 2003-10-25 15:28: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 speedup stream socket recv handling by tracking the tail of 2003-10-28 05:47:40 +00:00
tools Changes for new SMP-safe kobj method dispatch algorithm. 2003-10-16 13:29:26 +00:00
ufs Move the P_COWINPROGRESS flag from being a per-process p_flag to being a 2003-10-23 21:14:08 +00:00
vm - Complete the synchronization of accesses to the swblock hash table. 2003-10-27 05:58:15 +00:00
Makefile Revert exclusion for amd64 that stopped boot/ being built. 2003-06-26 03:52:48 +00:00