phk [Tue, 28 Jan 2003 09:47:50 +0000 (09:47 +0000)]
Use a void * to carry the private data for return-call'ed ioctl requests.
Amongst other things this avoids a complex workaround in the userland
regression bits.
jeff [Tue, 28 Jan 2003 09:28:20 +0000 (09:28 +0000)]
- Fix the ksq_load calculation. It now reflects the number of entries on the
run queue for each cpu.
- Introduce kse stealing into the sched_choose() code. This helps balance
cpus better in cases where process turnover is high. This implementation
is fairly trivial and will likely be only a temporary measure until
something more sophisticated has been written.
tjr [Tue, 28 Jan 2003 09:21:42 +0000 (09:21 +0000)]
Do not allow a cached vnode to be shared among multiple mounts of the same
kind of pseudofs-based filesystem. Fixes (at least) one problem where
when procfs is mounted mupltiple times, trying to unmount one will often
cause the wrong one to get unmounted, and other problem where mounting
one procfs on top of another caused the kernel to lock up.
jmallett [Tue, 28 Jan 2003 02:42:01 +0000 (02:42 +0000)]
Fix problems with how libufs was used, with regard to mounted/active fs's,
in the new world order of libufs, where we also do statfs, and add a missing
close.
gad [Tue, 28 Jan 2003 01:21:57 +0000 (01:21 +0000)]
Changes so the 'pw' command will allow '$' as the last character in a userid
or group name (mainly for the benefit of samba). This pretty much rewrites
he pw_checkname() routine, but should work exactly the same except for the
above change, and that error messages are somewhat more informative.
PR: 28733 46890
Inspired by: example patch written by Terry Lambert
Reviewed by: no objections on freebsd-arch and freebsd-current
MFC plans: no plans, but will do if people want it in stable.
mbr [Mon, 27 Jan 2003 22:43:23 +0000 (22:43 +0000)]
Make this work in the !INET6 case -- if we mismatch the AF, don't return a
bogus (uninitialized) structure. Also, ignore v4 ifa's with no broadcast
address (rather than core dumping).
mbr [Mon, 27 Jan 2003 22:19:32 +0000 (22:19 +0000)]
Reset the record lenght and received bytes once a record
is finished. This fixes clients doing two RPCs over the
same connection at the same time. Without this fix, we
could end with a reply to old data.
Submitted by: Frank van der Linden <fvdl@netbsd.org>
Reviewed by: rwatson
Obtained from: NetBSD
jake [Mon, 27 Jan 2003 18:39:09 +0000 (18:39 +0000)]
Add the sabtty children devices as unordered. Use the unit numbr of
the sabtty device to create its description so that they will be
unique for machines with multiple sab chips.
fenner [Mon, 27 Jan 2003 18:16:32 +0000 (18:16 +0000)]
Don't try to fseek before the beginning of the file; POSIX requires that
this return an error.
This re-enables display of the first entry in /var/account/acct instead
of the error "lastcomm: /var/account/acct: Invalid argument"
sos [Mon, 27 Jan 2003 09:04:29 +0000 (09:04 +0000)]
Update the code that deals with disk enclosures:
Properly handle the newer Promise SuperSwap 1000 enclosures.
Print out what kind of enclosure was found in the probe.
Misc cleanups in the enclosure handling code.
phk [Mon, 27 Jan 2003 07:58:18 +0000 (07:58 +0000)]
Implement MDIOCLIST which returns the unit numbers of configured md(4)
devices.
We use the md_pad[] array and if there are more units than its size the
last returned unit number will be -1, but the number of units returned
is correct.
jake [Mon, 27 Jan 2003 04:42:17 +0000 (04:42 +0000)]
Change ofwcons to use the output-device property from the firmware for the
name of the device that it creates. Update /etc/ttys accordingly.
An alias is created for the old name so that old /etc/ttys will continue to
work, but due to aliases being implemented as symlinks in devfs you cannot
login as root when using the alias device.
ache [Mon, 27 Jan 2003 03:39:33 +0000 (03:39 +0000)]
Now return NULLified struct in case of empty config file
(previous variant return NULL pointer for both empty file case and error case,
so caller can't sense error properly).
It not affect existen programs because property_find() now returns NULL
for both NULL pointer and NULLified struct.
jmallett [Mon, 27 Jan 2003 01:57:15 +0000 (01:57 +0000)]
If we don't know where the sblock is (e.g. filling out a blank disk), then
get it from the fs structure. Really libufs should have interfaces to generate
both what we export, and what we import, based on eachother, and this should
be full of redundant code to make sure everything is right... But really, we
don't even deal with checksums, so plenty of room to improve.
alc [Mon, 27 Jan 2003 01:12:35 +0000 (01:12 +0000)]
Simplify vm_object_page_remove(): The object's memq is now ordered. The
two cases that existed before for performance optimization purposes can
be reduced to one.
julian [Mon, 27 Jan 2003 00:00:06 +0000 (00:00 +0000)]
Unbreak SMP cases for these architectures.
statclock_process() changed arguments.
note: it may be worth checking if curkse is needed on these architectures..
(and if so, why?)
markm [Sun, 26 Jan 2003 23:01:36 +0000 (23:01 +0000)]
Remove the get_term() function. It pretty much can't work for
FreeBSD, and makes ugly diffs with the other crt1.c's. Leave
behind a comment (words supplied by Thomas Moestl) that explain
the issue.
phk [Sun, 26 Jan 2003 21:54:36 +0000 (21:54 +0000)]
Implement DIOCBSDBB ioctl which overwrites first BBSIZE bytes of BSD
labeled disk.
This is complicated by the fact that BBSIZE is greater than the
PAGE_SIZE limit ioctl inflicts on arguments which are automatically
copied in.
As long as we don't need access to userland memory (copyin/out) we
can deal with the ioctl using g_callme() which executes it from the
GEOM event thread.
Once we need copyin/out, we need to return the bio with EDIRIOCTL
in order to make geom_dev call us back in the original process context
where copyin will work.
Unfortunately, that results in us getting called with Giant, so
we have to DROP_GIANT/PICKUP_GIANT around the code where we diddle
GEOMs internals.
Sometimes you just can't win...
... But it does make geom_bsd.c an almost complete example of the
GEOM beastiarium.
simokawa [Sun, 26 Jan 2003 15:39:04 +0000 (15:39 +0000)]
- Improve IT/IR DMA queue management.
- Improve debug message for mbuf handling.
- Wait 1 sec for DMA stop in fwohci_i{t,r}x_disable() before freeing buffers.
phk [Sun, 26 Jan 2003 14:35:53 +0000 (14:35 +0000)]
Drop the silly notion that i386 has two bootstrap files now that sys/boot
creates a single file named just "boot".
Apart from the fact that the option "-s" is now gone and that "-b" should
be pointed at /boot/boot instead of /boot/boot1, this patch should be
a no-op.
phk [Sun, 26 Jan 2003 13:50:11 +0000 (13:50 +0000)]
Remove #if checks for NUMBOOT==0, it's not relevant for any architecture
and if we get such an architecture, we can just avoid using the relevant
options.
davidxu [Sun, 26 Jan 2003 11:41:35 +0000 (11:41 +0000)]
Move UPCALL related data structure out of kse, introduce a new
data structure called kse_upcall to manage UPCALL. All KSE binding
and loaning code are gone.
A thread owns an upcall can collect all completed syscall contexts in
its ksegrp, turn itself into UPCALL mode, and takes those contexts back
to userland. Any thread without upcall structure has to export their
contexts and exit at user boundary.
Any thread running in user mode owns an upcall structure, when it enters
kernel, if the kse mailbox's current thread pointer is not NULL, then
when the thread is blocked in kernel, a new UPCALL thread is created and
the upcall structure is transfered to the new UPCALL thread. if the kse
mailbox's current thread pointer is NULL, then when a thread is blocked
in kernel, no UPCALL thread will be created.
Each upcall always has an owner thread. Userland can remove an upcall by
calling kse_exit, when all upcalls in ksegrp are removed, the group is
atomatically shutdown. An upcall owner thread also exits when process is
in exiting state. when an owner thread exits, the upcall it owns is also
removed.
KSE is a pure scheduler entity. it represents a virtual cpu. when a thread
is running, it always has a KSE associated with it. scheduler is free to
assign a KSE to thread according thread priority, if thread priority is changed,
KSE can be moved from one thread to another.
When a ksegrp is created, there is always N KSEs created in the group. the
N is the number of physical cpu in the current system. This makes it is
possible that even an userland UTS is single CPU safe, threads in kernel still
can execute on different cpu in parallel. Userland calls kse_create to add more
upcall structures into ksegrp to increase concurrent in userland itself, kernel
is not restricted by number of upcalls userland provides.
The code hasn't been tested under SMP by author due to lack of hardware.