This replaces the current ioctl processing with a direct call path
from geom_dev() where the ioctl arrives (from SPECFS) to any directly
connected GEOM class.
The inverse of the above is no longer supported. This is the
situation were you have one or more intervening GEOM classes, for
instance a BSDlabel on top of a MBR or PC98. If you want to issue
MBR or PC98 specific ioctls, you will need to issue them on a MBR
or PC98 providers.
This paves the way for inviting CD's, FD's and other special cases
inside GEOM.
Commands submitted through the management interface won't have scatter/
gather lists. Stop ignoring them and instead call the callback directly.
This unbreaks the management interface.
Don't try to enable io or memory access for non-standard resource
addresses. This stops resource allocations for e.g. amdpm failing - this
has its own special ways of enabling access.
Use pmap_steal_memory() for the msgbuf instead of trying to squeeze
it in the last chunk (phys_avail block). The last chunk very often is
not larger than one or two pages, resulting in a msgbuf that's too
small to hold a complete verbose boot.
Note that pmap_steal_memory() will bzero the memory it "allocates".
Consequently, ia64 will never preserve previous msgbufs. This is not
a noticable difference in practice. If the msgbuf could be reused,
it was invariably too small to have anything preserved anyway.
- Fragmentation is handled by the function m_fragment, which can
be called from whereever fragmentation is needed. Note that this
function is wrapped in #ifdef MBUF_STRESS_TEST to discourage non-testing
use.
- m_fragment works slightly differently from the old fragmentation
code in that it allocates a seperate mbuf cluster for each fragment.
This defeats dma_map_load_mbuf/buffer's feature of coalescing adjacent
fragments. While that is a nice feature in practice, it nerfed the
usefulness of mbuf_stress_test.
- Add two modes of random fragmentation. Chains with fragments all of
the same random length and chains with fragments that are each uniquely
random in length may now be requested.
sam [Mon, 1 Sep 2003 05:35:55 +0000 (05:35 +0000)]
Locking and misc cleanups; most of which I've been running for >4 months:
o add locking
o strip irrelevant spl's
o split malloc types to better account for memory use
o remove unused IPSEC_NONBLOCK_ACQUIRE code
o remove dead code
sam [Mon, 1 Sep 2003 05:12:36 +0000 (05:12 +0000)]
add locking
NB: There is a known LOR on the forwarding path; this needs to be resolved
together with a similar issue in the bridge. For the moment it is
believed to be benign.
sam [Mon, 1 Sep 2003 05:01:55 +0000 (05:01 +0000)]
o interlock domain list when adding domains
o remove irrlevant spl
Notes:
1. We don't lock domain list traversals as this is safe until we start
removing domains.
2. The calculation of max_datalen in net_init_domain appears safe as
noone depends on max_hdr and max_datalen having consistent values.
3. Giant is still held for fast and slow timeouts; this must stay until
each timeout routine is properly locked (coming soon).
kan [Mon, 1 Sep 2003 04:12:18 +0000 (04:12 +0000)]
Eliminate last three uses of varargs.h in the tree. These three files
were including varargs.h file but did not use any of its macros,
so they escaped the clean-up before.
Build the submit.cf file instead of installing the version that ships
with the vendor sendmail distribution. By doing so, we avoid mergemaster
warnings after every 'make' in /etc/mail/.
Reported by: Jeremy Chadwick <koitsu@parodius.com>
MFC after: 3 days
X-MFC after: and re approval
kan [Mon, 1 Sep 2003 03:28:25 +0000 (03:28 +0000)]
Add a new machine independent varargs.h and use it as a central place
to announce the demise of varargs support in GCC versions 3.3+ and to
direct users to stdarg.h instead.
Fall back to machine/varargs.h for older GCC versions.
eliminate casts from the DMAADDR macro. This depends upon bus_addr_t being
a type that you can do arithmetic with. This eliminates many warnings when
compiling with PAE.
Use direct mapped KVA for the sf_buf allocator, as made possible
by the previous commit. While here, fix a typo, reformat comments
and fix a long line.
jeff [Sun, 31 Aug 2003 08:50:11 +0000 (08:50 +0000)]
- Define a new flag for getblk(): GB_NOCREAT. This flag causes getblk() to
bail out if the buffer is not already present.
- The buffer returned by incore() is not locked and should not be sent to
brelse(). Use getblk() with the new GB_NOCREAT flag to preserve the
desired semantics.
jeff [Sun, 31 Aug 2003 07:29:34 +0000 (07:29 +0000)]
- Don't acquire the vnode interlock in drain_output(). Instead, require the
caller to acquire it. This permits drain_output() to be done atomically
with other operations as well as reducing the number of lock operations.
- Assert that the proper locks are held in drain_output().
- Change getdirtybuf() to accept a mutex as an argument. This mutex is used
to protect the vnode's buf list and the BKGRDWAIT flag. This lock is
dropped when we successfully acquire a buffer and held on return
otherwise. These semantics reduce the number of cumbersome cases in
calling code.
- Pass the mtx from getdirtybuf() into interlocked_sleep() and allow this
mutex to be used as the interlock argument to BUF_LOCK() in the LOCKBUF
case of interlocked_sleep().
- Change the return value of getdirtybuf() to be the resulting locked buffer
or NULL otherwise. This is for callers who pass in a list head that
requires a lock. It is necessary since the lock that protects the list
head must be dropped in getdirtybuf() so that we don't have a lock order
reversal with the buf queues lock in bremfree().
- Adjust all callers of getdirtybuf() to match the new semantics.
- Add a comment in indir_trunc() that points at unlocked access to a buf.
This may also be one of the last instances of incore() in the tree.
marcel [Sat, 30 Aug 2003 21:25:23 +0000 (21:25 +0000)]
Introduce MAP_ENTRY_GROWS_DOWN and MAP_ENTRY_GROWS_UP to allow for
growable (stack) entries that not only grow down, but also grow up.
Have vm_map_growstack() take these flags into account when growing
an entry.
This is the first step in adding support for upward growable stacks.
It is a required feature on ia64 to support the register stack (or
rstack as I like to call it -- it also means reverse stack). We do
not currently create rstacks, so the upward growing is not exercised
and the change should be a functional no-op.
ru [Sat, 30 Aug 2003 13:48:16 +0000 (13:48 +0000)]
Revert rev. 1.378, and restore the correct arithmetic expression
syntax. The
make buildworld
mv /usr/include /usr/include.old
make installworld
issue has been fixed a month ago in Makefile,v 1.285, and there
is no valid reason to continue to keep the wrong syntax here --
buildworld takes care of upgrading a make for you if necessary.
But if you find yourself in an environment with an old make(1)
binary that breaks on this, and this is because you attempted
to run a target other than buildworld, don't whine but try again
with -DALWAYS_CHECK_MAKE defined -- it should do the trick.
Otherwise, if you still have a problem, please report it as a
bug and attach the ``make -dl ...'' output.
phk [Sat, 30 Aug 2003 11:33:25 +0000 (11:33 +0000)]
Continue the objectification of the swapdev backends:
Remove the vnode and dev_t fields and replace them with a void *.
Introduce separate strategy functions for devices and regular (NFS)
vnodes.
For devices we don't need the vnode v_numoutput stuff.
Add a generic swaponsomething() function to add a swapdevice and
split the remainder of swaponvp() into swaponvp() and swapondev()
which calls this backend.
alc [Fri, 29 Aug 2003 20:04:10 +0000 (20:04 +0000)]
Migrate the sf_buf allocator that is used by sendfile(2) and zero-copy
sockets into machine-dependent files. The rationale for this
migration is illustrated by the modified amd64 allocator. It uses the
amd64's direct map to avoid emphemeral mappings in the kernel's
address space. On an SMP, the emphemeral mappings result in an IPI
for TLB shootdown for each transmitted page. Yuck.
Maintainers of other 64-bit platforms with direct maps should be able
to use the amd64 allocator as a reference implementation.
rwatson [Fri, 29 Aug 2003 19:27:09 +0000 (19:27 +0000)]
More checking of M_PREPEND() return values: pass through link-layer
Appletalk code. These changes are untested since I don't have
an Appletalk environment.
simon [Fri, 29 Aug 2003 17:59:01 +0000 (17:59 +0000)]
- Update the page title to include information about which cards
are supported by the driver.
- Use a list to specify which cards are supported.
- Add the 3c592/3c597 EISA cards to the list of supported cards.