obrien [Thu, 28 Feb 2002 23:12:44 +0000 (23:12 +0000)]
CPP v3.1 has different rules for processing #lines directives. This
sometimes causes fewer directories to be searched for includes. Thus
we have to be more explicit in our search list.
arr [Thu, 28 Feb 2002 21:52:08 +0000 (21:52 +0000)]
- Move a comment from being on the same line as a #ifdef to the line
following it. This should have gone in the previous commit, but
misviewed Bruce's patch.
matusita [Thu, 28 Feb 2002 16:17:18 +0000 (16:17 +0000)]
Fix "make release.4" breakage.
src/contrib/isc-dhcp/includes/minires/resolv.h has a 'extern' definition
but it makes an error when linking crunched binary just like this:
dhclient.lo: In function `MRres_nquery':
dhclient.lo(.text+0x2dcce): undefined reference to `__h_errno_set'
dhclient.lo(.text+0x2dd5b): undefined reference to `__h_errno_set'
dhclient.lo: In function `MRres_nquerydomain':
dhclient.lo(.text+0x2de53): undefined reference to `__h_errno_set'
The author understands this will be a problem (see comments in resolv.h).
Murray said that the author will fix this, but as a temporary solution,
modifying the source code and not to use __h_errno_set.
BTW, I'm sorry that previous commitlog in src/sbin/dhclient/Makefile should
read "Found by:" instead of "Confirmed by"; I just found that rev 1.15
has a typo so fixed.
Tested on: ushi.jp.FreeBSD.org with today's 5-current source code.
(belive me, "make release.4" works fine now)
iedowse [Thu, 28 Feb 2002 11:22:40 +0000 (11:22 +0000)]
In sosend(), enforce the socket buffer limits regardless of whether
the data was supplied as a uio or an mbuf. Previously the limit was
ignored for mbuf data, and NFS could run the kernel out of mbufs
when an ipfw rule blocked retransmissions.
silby [Thu, 28 Feb 2002 07:41:12 +0000 (07:41 +0000)]
Fix a minor swap leak.
Previously, the UPAGES/KSTACK area of processes/threads would leak memory
at the time that a previously swapped process was terminated. Lukcily, the
leak was only 12K/proc, so it was unlikely to be a major problem unless you
had an undersized swap partition.
benno [Thu, 28 Feb 2002 03:07:48 +0000 (03:07 +0000)]
- When enabling/disabling interrupts, set/clear both PSL_EE and PSL_RI, not
just PSL_EE.
- Make cpu_critical_enter/exit independant of save_intr/restore_intr.
fenner [Wed, 27 Feb 2002 22:45:10 +0000 (22:45 +0000)]
Use SIGUSR1 to propogate SIGURG to the child; security measures prevent
the parent from sending SIGURG itself to the child. This fixes the
problem of occasionally failing to pass the window size.
fenner [Wed, 27 Feb 2002 22:37:22 +0000 (22:37 +0000)]
Use network byte order for the ICMP sequence number. This is only
significant when monitoring packets on another system, since
otherwise the ICMP sequence number is only used by the ping client.
julian [Wed, 27 Feb 2002 21:12:44 +0000 (21:12 +0000)]
Unbreak fore adapters from POV of warnings.
Define the atm_dev_free() routine so that its OK to free stuff that is defined
as volatile. Note this doesn't FORCE the arguemnts to be volatile,
just says that it's not an error if it is..
jhb [Wed, 27 Feb 2002 19:18:10 +0000 (19:18 +0000)]
Use thread0.td_ucred instead of proc0.p_ucred. This change is cosmetic
and isn't strictly required. However, it lowers the number of false
positives found when grep'ing the kernel sources for p_ucred to ensure
proper locking.
jhb [Wed, 27 Feb 2002 19:15:29 +0000 (19:15 +0000)]
- Change namei() to use td_ucred instead of p_ucred.
- Change the hack in access() that uses a temporary credential to set
td_ucred to the temp cred instead of p_ucred.
jhb [Wed, 27 Feb 2002 18:30:01 +0000 (18:30 +0000)]
Temporarily lock Giant while we update td_ucred. The proc lock doesn't
fully protect p_ucred yet so Giant is needed until all the p_ucred
locking is done. This is the original reason td_ucred was not used
immediately after its addition. Unfortunately, not using td_ucred is
not enough to avoid problems. Since p_ucred could be stale, we could
actually be dereferencing a stale pointer to dink with the refcount, so
we really need Giant to avoid foot-shooting. This allows td_ucred to
be safely used as well.
silby [Wed, 27 Feb 2002 18:03:02 +0000 (18:03 +0000)]
Fix a horribly suboptimal algorithm in the vm_daemon.
In order to determine what to page out, the vm_daemon checks
reference bits on all pages belonging to all processes. Unfortunately,
the algorithm used reacted badly with shared pages; each shared page
would be checked once per process sharing it; this caused an O(N^2)
growth of tlb invalidations. The algorithm has been changed so that
each page will be checked only 16 times.
Prior to this change, a fork/sleepbomb of 1300 processes could cause
the vm_daemon to take over 60 seconds to complete, effectively
freezing the system for that time period. With this change
in place, the vm_daemon completes in less than a second. Any system
with hundreds of processes sharing pages should benefit from this change.
Note that the vm_daemon is only run when the system is under extreme
memory pressure. It is likely that many people with loaded systems saw
no symptoms of this problem until they reached the point where swapping
began.
Special thanks go to dillon, peter, and Chuck Cranor, who helped me
get up to speed with vm internals.