jeff [Tue, 10 Aug 2004 07:52:21 +0000 (07:52 +0000)]
- Use a new flag, KEF_XFERABLE, to record with certainty that this kse had
contributed to the transferable load count. This prevents any potential
problems with sched_pin() being used around calls to setrunqueue().
- Change the sched_add() load balancing algorithm to try to migrate on
wakeup. This attempts to place threads that communicate with each other
on the same CPU.
- Don't clear the idle counts in kseq_transfer(), let the cpus do that when
they call sched_add() from kseq_assign().
- Correct a few out of date comments.
- Make sure the ke_cpu field is correct when we preempt.
- Call kseq_assign() from sched_clock() to catch any assignments that were
done without IPI. Presently all assignments are done with an IPI, but I'm
trying a patch that limits that.
- Don't migrate a thread if it is still runnable in sched_add(). Previously,
this could only happen for KSE threads, but due to changes to
sched_switch() all threads went through this path.
- Remove some code that was added with preemption but is not necessary.
marcel [Tue, 10 Aug 2004 05:43:40 +0000 (05:43 +0000)]
Favor building the cdrtools port over fetching the package. There
hasn't been any package build for ia64 for a long time and in this
case it means that the cdrtools package on the FTP sites is one that
doesn't have mkisofs. This breaks the release build. By trying to
build the port first, we protect ourselves a bit more against this.
murray [Tue, 10 Aug 2004 05:34:23 +0000 (05:34 +0000)]
Update wording regarding geography to match the man page and web site.
Specifically, change the second level menu title from 'Country' to
'Country or Region', since e.g. Hong Kong is not a country.
csjp [Tue, 10 Aug 2004 01:49:46 +0000 (01:49 +0000)]
By default, the watch utility will attempt to open /dev/snp0, if
another process already has /dev/snp0 open, the snp(4) will return
EBUSY, in which case watch will try to open /dev/snp1..9. Currently
watch does not check errno to see if the failure was a result of EBUSY.
This results in watch making futile attempts to open snp0..snp9 even
though devices may not exist or the caller does not have permissions
to access the device.
In addition to this, it attempts to setup the screen for snooping even
though it may not ever get an snp device.
So this patch does two things
1) Checks errno for EBUSY, if open(2) fails for another reason
print that reason and exit.
2) setup the terminal for snooping after the snp descriptor has
been obtained.
scottl [Tue, 10 Aug 2004 00:26:25 +0000 (00:26 +0000)]
Add a temporary debugging hack to detect a deadlock in setrunqueue(). This
is here so that we can gather stats on the nature of the recent rash of
hard lockups, and in this particular case panic the machine instead of
letting it deadlock forever.
davidxu [Mon, 9 Aug 2004 23:57:59 +0000 (23:57 +0000)]
In syscall, always make a copy of parameters from trapframe, this
becauses some syscalls using set_mcontext can sneakily change
parameters and later when those syscalls references parameters,
they will wrongly use register values in mcontext_t.
simon [Mon, 9 Aug 2004 21:50:10 +0000 (21:50 +0000)]
During FTP installs, when installing Postfix as an alternate MTA, the
install of Postfix fails since Postfix 1 is picked from INDEX instead
of Postfix 2.
The problem is that the package_add function matches multiple Postfix
packages and then installs a "random" version (the last one found in
INDEX). This does not occur with a CD-ROM install since there is only
one Postfix package on the CD-ROM.
The correct solution to this would be to check the origin field from
INDEX instead of the package name, but due to the way sysinstall is
made that is not trivial, so instead work around the problem by
hard-coding the Postfix major and minor revision (for the current
stable version) to install directly into the package_add call.
PR: misc/65426
Reported by: Harold Kachelmyer <bugs@princessharold.net>
Approved by: trhodes
anholt [Mon, 9 Aug 2004 21:01:49 +0000 (21:01 +0000)]
Minimal fix to prevent crashes when an AGP v2 card is used with the new v3 VIA
chipsets, based on Linux's via-agp.c. On boot, the system selects which AGP
version to use based on the inserted card. If v2 was chosen, the chipset
needs to be programmed with the v2 registers still. Also included in kern/69953
are changes to make the programming of the v3 registers match linux, but that
will be left out until the need to do so is confirmed (want specs or a tester).
PR: kern/69953
Submitted by: Oleg Sharoiko <os@rsu.ru>
Tested by: Oleg Sharoiko <os@rsu.ru>, Geoff Speicher <geoff@speicher.org>
(full version from PR)
marcel [Mon, 9 Aug 2004 20:44:41 +0000 (20:44 +0000)]
Better preserve the original protection for the mappings we maintain.
The hardware always gives read access for privilege level 0, which
means that we cannot use the hardware access rights and privilege
level in the PTE to test whether there's a change in protection. So,
we save the original vm_prot_t in the PTE as well.
Add pmap_pte_prot() to set the proper access rights and privilege
level on the PTE given a pmap and the requested protection.
The above allows us to compare the protection in pmap_extract_and_hold()
which was missing. While in pmap_extract_and_hold(), add pmap locking.
While here, clean up most (i.e. all but one) PTE macros we inherited
from alpha. They were either unused, used inconsistently, badly named
or simply weren't beneficial. We save the wired and managed state of
the PTE in distinct (bit) fields.
julian [Mon, 9 Aug 2004 20:36:03 +0000 (20:36 +0000)]
Make kg->kg_runnable actually count runnable threads in the ksegrp run queue
instead of only doing it sometimes.. This is not used outdide of debugging code
in the current code, but that will probably change.
green [Mon, 9 Aug 2004 19:52:29 +0000 (19:52 +0000)]
Revamp VM map wiring.
* Allow no-fault wiring/unwiring to succeed for consistency;
however, the wired count remains at zero, so it's a special case.
* Fix issues inside vm_map_wire() and vm_map_unwire() where the
exact state of user wiring (one or zero) and system wiring
(zero or more) could be confused; for example, system unwiring
could succeed in removing a user wire, instead of being an
error.
* Require all mappings to be unwired before they are deleted.
When VM space is still wired upon deletion, it will be waited
upon for the following unwire. This makes vslock(9) work
rather than allowing kernel-locked memory to be deleted
out from underneath of its consumer as it would before.
harti [Mon, 9 Aug 2004 19:18:19 +0000 (19:18 +0000)]
Fix a 4.X -> 5.X upgrade problem: crunchgen used to emit a line 'MAKE=make'
or 'env MAKEOBJDIRPREFIX=... make' depending on the setting of
MAKEOBJDIRPREFIX in the environment. In any case this line kills the
original value of ${MAKE}. When during buildworld a new make is built (as
is the case during the upgrade) this causes a wrong make to be picked up
(the first one in the path). Use the same technique as Makefile.inc1:
create a MAKEENV variable and a CRUNCHMAKE that calls ${MAKE} with that
MAKEENV prefixed. Use CRUNCHMAKE instead of MAKE throughout the generated
makefile. This leaves the original ${MAKE} undisturbed.
alc [Mon, 9 Aug 2004 18:46:39 +0000 (18:46 +0000)]
Make two changes to vm_fault().
1. Move a comment to its proper place, updating it. (Except for white-
space, this comment had been unchanged since revision 1.1!)
2. Remove spl calls.
green [Mon, 9 Aug 2004 18:46:13 +0000 (18:46 +0000)]
Normalize the VM wiring done with SPARSE_MAPPING: check for errors, and
unmap when done. For whatever reason, SPARSE_MAPPING is not even a
config option, so this is dead code.
alc [Mon, 9 Aug 2004 18:15:46 +0000 (18:15 +0000)]
Remove a stale comment from vm_map_lookup() that pertains to share maps.
(The last vestiges of the share map code were removed in revisions 1.153
and 1.159.)
imp [Mon, 9 Aug 2004 17:36:19 +0000 (17:36 +0000)]
Remove commented out pcic driver. It is too broken to work (even if you
fix the obvious bugs, nastier ones reside below the surfac), and having
it commented out here just encourages people to try it.
harti [Mon, 9 Aug 2004 16:13:54 +0000 (16:13 +0000)]
Make explicit that MAKEOBJDIRPREFIX and MAKOBJDIR must be set
as environment variables and should not be set on make's command
line. They happen to work accidentially as command line variables
too when none of the sub-makes wants to play games with them (because
make is putting command line variables into the environment and will
find them there later on). Makefile.inc1 wants to change
MAKEOBJDIRPREFIX. In this case one cannot set it on the command line.
andre [Mon, 9 Aug 2004 16:12:10 +0000 (16:12 +0000)]
New ipfw option "antispoof":
For incoming packets, the packet's source address is checked if it
belongs to a directly connected network. If the network is directly
connected, then the interface the packet came on in is compared to
the interface the network is connected to. When incoming interface
and directly connected interface are not the same, the packet does
not match.
yar [Mon, 9 Aug 2004 13:43:39 +0000 (13:43 +0000)]
Change the behaviour of `-v' so that, e.g., stepping a month back
on March 31 won't take you to March 2 or 3 (now the result will
be the last day of February.)
In general, now stepping by months from the last days of the current
month A will take you to the very last day of the target month B if
B is shorter than A.
The previous version would just step to March 31 and rely on mktime(3)
to correct the date. Despite its simplicity, such way was counter-intuitive
to users and caused pain to shell script writers.
Noticed by: Igor Timkin <ivt at gamma dot ru>
Approved by: brian
MFC after: 2 weeks
Fix a documentation bug: "make release" uses "make buildworld"
not "make world", as the first step of building the release.
While here, remove another mention of "make world", as the
latter is no longer supported by src/Makefile.
harti [Mon, 9 Aug 2004 11:38:41 +0000 (11:38 +0000)]
Make make recurse into sub-directories and sub-makes when given
two -n flags. If only one -n flag is given the old behaviour
is retained (POLA). In order to make this working for installworld
change the IMAKEENV in this case so that the tools are found
(we have no temporary installation environment in this case).
pjd [Mon, 9 Aug 2004 11:29:42 +0000 (11:29 +0000)]
- Introduce option for hardcoding providers' names into metadata.
It allows to fix problems when last provider's sector is shared between few
providers.
- Bump version number for CONCAT and STRIPE and add code for backward
compatibility.
- Do not bump version number of MIRROR, as it wasn't officially introduced yet.
Even if someone started to play with it, there is no big deal, because
wrong MD5 sum of metadata will deny those providers.
- Update manual pages.
- Add version history to g_(stripe|concat).h files.
pjd [Mon, 9 Aug 2004 11:14:25 +0000 (11:14 +0000)]
Do not use g_wither_geom(9). I doesn't work in the way which is expected
here anymore (after g_wither_washer() was introduced), i.e. geom and consumer
will not be immediately destroyed if possible.
harti [Mon, 9 Aug 2004 10:54:05 +0000 (10:54 +0000)]
Use the '+' flag to make make recurse into sub-directories even when
given -n. For POLA reasons this behaviour is switched on only when
at least two -n flags are given to make. One -n flag keeps the old behaviour
of showing the shell command that would recurse into the sub-directories.
alc [Mon, 9 Aug 2004 06:01:46 +0000 (06:01 +0000)]
Make two changes to vm_fault().
1. Retain the map lock until after the calls to pmap_enter() and
vm_fault_prefault().
2. Remove a stale comment. Submitted by: tegge@
yongari [Mon, 9 Aug 2004 03:13:57 +0000 (03:13 +0000)]
Fix long standing mediaopt setting bugs seen on sparc64. Though
the bug exists in little-endian machine, it was not triggered due
to the difference of memory ordering between little/big endian
machines. Instead of relying on possibly modified value during
function invokcations, use saved copy of ifr.ifr_addr.sa_family.
Also add a comment at the top of ifconfig.c clarifying the issue
so the bug won't re-appear.
des [Sun, 8 Aug 2004 23:14:44 +0000 (23:14 +0000)]
Use fallthrough to simplify the multiplier logic; optimistically add
support for the T multiplier; improve the error message for unrecognized
multipliers.
davidxu [Sun, 8 Aug 2004 22:37:53 +0000 (22:37 +0000)]
1.Use new way to check if a thread is in critical region, defer suspending
if it is true.
2.Add thread_db api td_thr_tls_get_addr to get tls address, the real code
is commented out util tls patch is committed.
davidxu [Sun, 8 Aug 2004 22:32:20 +0000 (22:32 +0000)]
1.Add KSE_INTR_DBSUSPEND command for kse_thr_interrupt to suspend a bound
thread, after the bound thread leaves critical region, the thread should
check debug flag may suspend itself by using the command.
2.Schedule upcall after thread is suspended by debugger
3.Wakeup upcall thread after process suspension.
stefanf [Sun, 8 Aug 2004 20:05:47 +0000 (20:05 +0000)]
Implement C99's standard header <tgmath.h>. It provides type-generic macros
for the <math.h> and <complex.h> functions that have float, double and long
double implementations. Such type-generic macros expand to an actual
function, depending on the types of the macro arguments, eg. if <tgmath.h>
is included, the invocation cos(1.0f) calls the function cosf().
kientzle [Sun, 8 Aug 2004 17:20:23 +0000 (17:20 +0000)]
gtar uses -F for another purpose, so bsdtar no longer treats it as a
synonym for --format. Update the man page to reflect this. While
I'm here, change the man page to document "tar" rather than "bsdtar,"
update some comments about -l compatibility and fix a few grammar nits.
sam [Sun, 8 Aug 2004 17:10:54 +0000 (17:10 +0000)]
Add missing bit of last if_start workaround: mark scan callout
MPSAFE only debug_mpsafenet is 1 so callbacks to send management
frames hold Giant; this is another bandaid on the path to removing Giant.
thomas [Sun, 8 Aug 2004 13:05:03 +0000 (13:05 +0000)]
Include the nanoBSD make.conf in the top-level nanoBSD Makefile, so
all configuration knobs (both system settings and nanoBSD-specific ones)
can be tuned by modifying a single file. Move KERNCONF default value
to make.conf.
Attempt to resolve CFGMASTER like CUSTOMIZE, first relative to ${.CURDIR},
then as an absolute path.
Allow optional additional arguments to be passed to the CUSTOMIZE script.