alc [Sun, 24 Oct 2004 07:12:13 +0000 (07:12 +0000)]
Avoid repeated acquisition and release of the vm object lock inside of
two loops in agp_generic_bind_memory(). As an intended side-effect, all
of the calls to vm_page_wakeup() are now performed with the containing
vm object lock held.
alc [Sun, 24 Oct 2004 06:15:36 +0000 (06:15 +0000)]
Introduce VM_ALLOC_NOBUSY, an option to vm_page_alloc() and vm_page_grab()
that indicates that the caller does not want a page with its busy flag set.
In many places, the global page queues lock is acquired and released just
to clear the busy flag on a just allocated page. Both the allocation of
the page and the clearing of the busy flag occur while the containing vm
object is locked. So, the busy flag might as well never be set.
scottl [Sun, 24 Oct 2004 05:37:23 +0000 (05:37 +0000)]
Import the HighPoint RocketRAID 182x driver. Thanks to HighPoint for
providing the original driver, and thanks to IronSystems for providing
hardware for testing.
davidxu [Sat, 23 Oct 2004 23:28:36 +0000 (23:28 +0000)]
1. Move thread list flags into new separate member, and atomically
put DEAD thread on GC list, this closes a race between pthread_join
and thr_cleanup.
2. Introduce a mutex to protect tcb initialization, tls allocation and
deallocation code in rtld seems no lock protection or it is broken,
under stress testing, memory is corrupted.
ru [Sat, 23 Oct 2004 21:34:41 +0000 (21:34 +0000)]
Expand the scope of the .SHELL specification to also cover
the compat mode of operation and the != operator.
While here, fixed a bug in the .SHELL directive processing
when only the name= attribute is specified and no built-in
shell matches this name, causing null pointer dereference.
phk [Sat, 23 Oct 2004 20:49:17 +0000 (20:49 +0000)]
Add a new per-thread private flag: TDP_GEOM.
This flag gets set whenever the thread posts an event on the GEOM
event queue, and if the flag is set when the thread is prepared
to return to userland from the kernel, g_waitidle() will be called
to make sure that the posted events have completed.
This can replace an insufficient number of g_waitidle() calls in
various other places, and has the advantage of being failsafe: Any
system call which does a VOP_OPEN()/VOP_CLOSE will now correctly
wait for any geom events it posted as part of spoils or tastes.
Assert that topology and Giant is not held in g_waitidle().
andre [Sat, 23 Oct 2004 19:06:43 +0000 (19:06 +0000)]
socreate() does an early abort if either the protocol cannot be found,
or pru_attach is NULL. With loadable protocols the SPACER dummy protocols
have valid function pointers for all methods to functions returning just
EOPNOTSUPP. Thus the early abort check would not detect immediately that
attach is not supported for this protocol. Instead it would correctly
get the EOPNOTSUPP error later on when it calls the protocol specific
attach function.
Add testing against the pru_attach_notsupp() function pointer to the
early abort check as well.
andre [Sat, 23 Oct 2004 18:45:53 +0000 (18:45 +0000)]
o Remove entire section talking about RTF_PRCLONING that got nuked in 5.2
already.
o Better description of IP fastforwarding. It can do the full thing now
including firewalling.
o Reword the description of ICMP redirects.
o Add references to route(4) and pfil(9).
rwatson [Sat, 23 Oct 2004 10:34:27 +0000 (10:34 +0000)]
Add some basic KTR tracing to busdma on i386. This is likely not
the final set of traces -- someone with more busdma background
will probably want to review and expand this, as well as port to
other platforms. This tracing is sufficient to identify key
busdma events on i386, and in particular to draw attention to
bounce buffering events that may have a substantial performance
impact.
mtm [Sat, 23 Oct 2004 08:33:10 +0000 (08:33 +0000)]
Locking cleanups to remove the need for a recursive mutex
o Instead of locking and unlocking all over the place, use
lock assertions to make certain that the bfe lock is held
where necessary.
o Create locked and unlocked versions of bfe_init and bfe_start. These
functions can be called from outside the module and by functions
within the bfe module. The calls from outside the module don't
hold the bfe lock so the unlocked versions called by these functions
simple obtain the bfe lock and call the locked version.
- Fix a typo (scp) in the locking macros that only worked because in all the
instances in which it was called the softc pointer happened to be named 'sc'.
arr [Fri, 22 Oct 2004 22:16:24 +0000 (22:16 +0000)]
- Turn KASSERT()s into warning printf()'s in the g_class_load() routine.
This removes a panic that will occur if you build with GENERIC and
attempt to kldload a GEOM module that is already in the kernel.
rwatson [Fri, 22 Oct 2004 12:12:40 +0000 (12:12 +0000)]
Add an annotation to the comment for sysv_ipc.c to indicate that the
MAC Framework doesn't require checks in ipcperm() because checks
relating to System V IPC will be performed in individual IPC
implementations.
rwatson [Fri, 22 Oct 2004 11:29:30 +0000 (11:29 +0000)]
Expand comments on various sections of the MAC Framework Policy API,
as well as document the properties of the mac_policy_conf structure.
Warn about the ABI risks in changing the structure without careful
consideration.
rwatson [Fri, 22 Oct 2004 11:04:58 +0000 (11:04 +0000)]
When MAC is enabled, warn if getnewvnode() is asked to produce a vnode
without a mountpoint. In this scenario, there's no useful source for
a label on the vnode, since we can't query the mountpoint for the
labeling strategy or default label.
phk [Fri, 22 Oct 2004 09:59:37 +0000 (09:59 +0000)]
Alas, poor SPECFS! -- I knew him, Horatio; A filesystem of infinite
jest, of most excellent fancy: he hath taught me lessons a thousand
times; and now, how abhorred in my imagination it is! my gorge rises
at it. Here were those hacks that I have curs'd I know not how
oft. Where be your kludges now? your workarounds? your layering
violations, that were wont to set the table on a roar?
Move the skeleton of specfs into devfs where it now belongs and
bury the rest.
marcel [Fri, 22 Oct 2004 04:49:09 +0000 (04:49 +0000)]
Seperate ia64 from the pack. The disc1 is overflowing to such extend
that most packages can not be included. It's much easier to list those
that we do want on disc1 for ia64. We only need to list 11 of them.
rwatson [Thu, 21 Oct 2004 18:35:24 +0000 (18:35 +0000)]
Add KTR_GEOM, which allows tracing of basic GEOM I/O events occuring
in the g_up and g_down threads. Each time a bio is propelled up and
down the stack, an event is generating showing the provider, offset,
and length, as well as thread wakeup and work status information.
phk [Thu, 21 Oct 2004 14:42:31 +0000 (14:42 +0000)]
Add BO_* macros parallel to VI_* macros for manipulating the bo_mtx.
Initialize the bo_mtx when we allocate a vnode i getnewvnode() For
now we point to the vnodes interlock mutex, that retains the exact
same locking sematics.
Move v_numoutput from vnode to bufobj. Add renaming macro to
postpone code sweep.
phk [Thu, 21 Oct 2004 12:51:36 +0000 (12:51 +0000)]
Forced commit to get the right commit message:
Add new include file <sys/bufobj.h> which will contain the gory
details on the new buffer-cache object. (see comments in file
about the direction this is moving).
Include it from <sys/vnode.h> for now to avoid munging a lot of files
which can later be munged back.
Embed a bufobj in vnode.
Move the buf splay trees from the vnode to the bufobj.
phk [Thu, 21 Oct 2004 12:24:38 +0000 (12:24 +0000)]
Add new function ttyinitmode() which sets our systemwide default
modes on a tty structure. Both the ".init" and the current settings
are initialized allowing the function to be used both at attach and
open time.
The function takes an argument to decide if echoing should be enabled
by default. Echoing should not be enabled for regular physical
serial ports unless they are consoles, in which case they should
be configured by ttyconsolemode() instead.
rwatson [Thu, 21 Oct 2004 11:21:13 +0000 (11:21 +0000)]
Modify libugidfw(3) to use MBI_* permission flags from mac_bsdextended.h
instead of using the V* permission flags from vnode.h. Remove include
of vnode.h.
rwatson [Thu, 21 Oct 2004 11:19:02 +0000 (11:19 +0000)]
Modify mac_bsdextended policy so that it defines its own vnode access
right bits rather than piggy-backing on the V* rights defined in
vnode.h. The mac_bsdextended bits are given the same values as the V*
bits to make the new kernel module binary compatible with the old
version of libugidfw that uses V* bits. This avoids leaking kernel
API/ABI to user management tools, and in particular should remove the
need for libugidfw to include vnode.h.
alc [Wed, 20 Oct 2004 17:44:40 +0000 (17:44 +0000)]
Modify the vm object locking in do_sendfile() so that the containing object
is locked when vm_page_io_finish() is called on a page. This is to satisfy
a new, post-RELENG_5 assertion in vm_page_io_finish(). (I am in the
process of transitioning the responsibility for synchronizing access to
various fields/flags on the page from the global page queues lock to the
per-object lock.)
keramida [Wed, 20 Oct 2004 16:58:28 +0000 (16:58 +0000)]
Introduce root_rw_mount as a new variable in defaults/rc.conf to
unbreak /etc/rc.d/root for diskless systems that get their root
filesystem from a read-only NFS mount.