Commit Graph

104767 Commits

Author SHA1 Message Date
imp
10c37ef567 Modernize description of physio. Make explicit that this creates a
request that's passed to the driver's strategy.
2004-07-10 01:10:17 +00:00
marius
8526267db8 - Add missing <sys/module.h>. [1]
- Remove unused includes.
- Sort includes.

Reported by:	Pyun YongHyeon <yongari@kt-is.co.kr> [1]
2004-07-09 23:12:22 +00:00
alfred
68b0bdace1 document vfs_suser. 2004-07-09 22:33:43 +00:00
emax
8dd322db66 Force commit.
Bluetooth code was maked as non-i386 specific.
Bump __FreeBSD_version to mark this change.

Reviewed by:	kris, ru
Requested by:	obrien
2004-07-09 21:51:14 +00:00
jhb
761713b2ff Check the lock lists to see if they are empty directly rather than
assigning a pointer to the list and then dereferencing the pointer as a
second step.  When the first spin lock is acquired, curthread is not in
a critical section so it may be preempted and would end up using another
CPUs lock list instead of its own.

When this code was in witness_lock() this sequence was safe as curthread
was in a critical section already since witness_lock() is called after the
lock is acquired.

Tested by:	Daniel Lang dl at leo.org
2004-07-09 17:46:27 +00:00
emax
68fab2852b Bump __FreeBSD_version
Reviewed by:	kris, ru
2004-07-09 16:57:24 +00:00
cognet
113a0eae5d Do not bzero() the softc, as newbus does it for us. 2004-07-09 16:56:46 +00:00
tjr
0bea5c0108 Add fast paths for conversion of plain ASCII characters. 2004-07-09 15:46:06 +00:00
tjr
e224905046 Slightly reorganize and simplify. 2004-07-09 15:12:10 +00:00
pjd
2210d0e607 Decrease default stripe size to 4k, as we have "FAST" mode turned on by
default.
2004-07-09 14:41:51 +00:00
pjd
227209a4da Implement "FAST" mode for GEOM_STRIPE class and turn it on by default.
In this mode you can setup even very small stripe size and you can be
sure that only one I/O request will be send to every disks in stripe.
It consumes some more memory, but if allocation fails, it will fall
back to "ECONOMIC" mode.

It is about 10 times faster for small stripe size than "ECONOMIC" mode
and other RAID0 implementations. It is even recommended to use this
mode and small stripe size, so our requests are always splitted.

One can still use "ECONOMIC" mode by setting kern.geom.stripe.fast to 0.
It is also possible to setup maximum memory which "FAST" mode can consume,
by setting kern.geom.stripe.maxmem from /boot/loader.conf.
2004-07-09 14:30:09 +00:00
phk
5be6baa85c Only detach consumers which are attached when we wither stuff away.
Pointed out by:	pjd
2004-07-09 14:06:17 +00:00
phk
98f388939d Add a JFLAG which can be used to speed up universe:
make universe JFLAG=-j12
2004-07-09 13:55:50 +00:00
des
f51d81efae Reduce namespace pollution. 2004-07-09 13:52:42 +00:00
cognet
10b0f934b6 Newbus returns a zeroed softc, so there's no need to call bzero() here. 2004-07-09 13:42:05 +00:00
des
a4be987299 When cleaning house, don't try to remove what isn't there. 2004-07-09 13:15:32 +00:00
des
8369ef54b0 Bump document date.
Reminded by:	ru
2004-07-09 11:44:49 +00:00
des
881a348b52 Accumulate directory entries in a fixed-length sbuf, and uiomove them in
one go before returning.  This avoids calling uiomove() while holding
allproc_lock.

Don't adjust uio->uio_offset manually, uiomove() does that for us.

Don't drop allproc_lock before calling panic().

Suggested by:	alfred
2004-07-09 11:43:37 +00:00
des
af4e696e95 The type and name of sbuf_b{cat,cpy}()'s second argument have changed. 2004-07-09 11:38:59 +00:00
des
9c6b715afb Cosmetic adjustment to previous commit: name the second argument to
sbuf_bcat() and sbuf_bcpy() "buf" rather than "data".
2004-07-09 11:37:44 +00:00
des
3bf01ad1d7 Have sbuf_bcat() and sbuf_bcpy() take a const void * instead of a
const char *, since callers are likely to pass in pointers to all
kinds of structs and whatnot.
2004-07-09 11:35:30 +00:00
grehan
6c7bd73286 - correctly set the return value for the copyin/out fault buffer to 1
so setfault would return correctly when a page fault was invalid
  (e.g. a syscall with a bad parameter).

  This caused an endless DSI loop, seen when running sendmail which
  does a setlogin() call with a NULL pointer.

- introduce KTR_SYSC tracing. expose the syscallnames[] array to
  make the tracing more readable.
2004-07-09 11:00:41 +00:00
ru
933877b657 Fixed markup. 2004-07-09 10:08:03 +00:00
das
8a3f24c8d0 Remove the declaration of isnan() from this file. It is no longer
needed as of math.h v1.40, and its prototype is incorrect here.
2004-07-09 10:01:10 +00:00
ru
83e9f64836 Polished markup. 2004-07-09 09:22:36 +00:00
harti
e6739c645d Use and explicite 'sh' to run the scripts, because they may be checked
out non-executable.
2004-07-09 08:59:15 +00:00
ru
4f3bf456c2 Fixed markup and punctuation. 2004-07-09 07:26:15 +00:00
das
6a3f3bc649 Bump document date for recent changes.
Prodded by:	ru
2004-07-09 06:37:44 +00:00
ru
6b3ad34607 Markup nit picking.
Reviewed by:	joerg
2004-07-09 06:16:43 +00:00
alc
b5e3777efc Eliminate struct shm_handle. It is an unnecessary level of indirection to
a vm_object.
2004-07-09 05:28:38 +00:00
bms
23d90b4453 Use ETHER_IS_MULTICAST() consistently in ether_resolvemulti().
Reviewed by:	jmallett
2004-07-09 05:26:27 +00:00
tjr
3e5d71bd1a Report input errors instead of ignoring them. 2004-07-09 05:15:46 +00:00
imp
f4c76ff4de Fix mismerge of fdc. Also, OLDCARD never was supported on amd64, so
remove fdc attachment for it.
2004-07-09 05:05:13 +00:00
das
612aa59473 Document these functions as being in libm, not libc. Some of them
*are* in libc for historical reasons, but programmers should not rely
on that fact.

Also remove a BUGS section that is not relevant here.
2004-07-09 03:33:00 +00:00
das
65d8d759b1 Implement the classification macros isfinite(), isinf(), isnan(), and
isnormal() the hard way, rather than relying on fpclassify().  This is
a lose in the sense that we need a total of 12 functions, but it is
necessary for binary compatibility because we have never bumped libm's
major version number.  In particular, isinf(), isnan(), and isnanf()
were BSD libc functions before they were C99 macros, so we can't
reimplement them in terms of fpclassify() without adding a dependency
on libc.so.5.  I have tried to arrange things so that programs that
could be compiled in FreeBSD 4.X will generate the same external
references when compiled in 5.X.  At the same time, the new macros
should remain C99-compliant.

The isinf() and isnan() functions remain in libc for historical
reasons; however, I have moved the functions that implement the macros
isfinite() and isnormal() to libm where they belong.  Moreover,
half a dozen MD versions of isinf() and isnan() have been replaced
with MI versions that work equally well.

Prodded by:	kris
2004-07-09 03:32:40 +00:00
das
5ef7c3d0ff Define the following macros in terms of [gi]cc builtins when the
builtins are available: HUGE_VAL, HUGE_VALF, HUGE_VALL, INFINITY,
and NAN.  These macros now expand to floating-point constant
expressions rather than external references, as required by C99.
Other compilers will retain the historical behavior.  Note that
it is not possible say, e.g.
#define	HUGE_VAL	1.0e9999
because the above may result in diagnostics at translation time
and spurious exceptions at runtime.  Hence the need for compiler
support for these features.

Also use builtins to implement the macros isgreater(),
isgreaterequal(), isless(), islessequal(), islessgreater(),
and isunordered() when such builtins are available.
Although the old macros are correct, the builtin versions
are much faster, and they avoid double-expansion problems.
2004-07-09 03:31:09 +00:00
bms
84763ddc9b Document compile-time switches here as I'm going to yank them from
if_de.c.
2004-07-09 02:38:25 +00:00
tjr
d7311fa844 Update for multibyte character support: remove BUGS and change the
description of the -c option to refer to "values" instead of "byte values".
2004-07-09 02:33:46 +00:00
bms
44bbb14b5b Further improve locking in xl(4):
- Avoid an additional lock acquire/release when leaving xl_intr(), by
   changing xl_start*() to xl_start*_locked(), and calling the appropriate
   routine by chip revision (as the DMA descriptors are different).

 - Simplify the appropriate routines now that they are called with the
   lock held.

This should save a significant amount of CPU cycles spent on servicing
each interrupt for both UP and SMP whilst remaining MPSAFE.

Tested by:	rwatson
2004-07-09 02:28:23 +00:00
bms
e828b3b382 Apply the long-overdue hatchet of style(9) death to this file. 2004-07-09 02:19:07 +00:00
tjr
d291df1e3f Add support for multibyte characters. The challenge here was to use
data structures that scale better with large character sets, instead of
arrays indexed by character value:
- Sets of characters to delete/squeeze are stored in a new "cset" structure,
which is implemented as a splay tree of extents. This structure has the
ability to store character classes (ala wctype(3)), but this is not
currently fully utilized.
- Mappings between characters are stored in a new "cmap" structure, which
is also a splay tree.
- The parser no longer builds arrays containing all the characters in a
particular class; instead, next() determines them on-the-fly using
nextwctype(3).
2004-07-09 02:08:07 +00:00
rwatson
fb654efba8 Remove spl()'s from do_sendfile(). 2004-07-09 01:46:03 +00:00
bms
3600006e8c Further locking improvements for vr(4):
- Add *_locked() entry points as needed to avoid unnecessary lock thrashing.
 - Use these entry points wisely.
 - Only acquire the lock once when servicing an interrupt.
 - Check 'suspended' on interrupt to avoid racing detach.
 - Correct a mis-spelled comment.
 - Don't take the lock in vr_reset() to avoid lock thrashing in attach.
  - Comment this.

Reviewed by:	-net (silence)
2004-07-09 00:17:14 +00:00
bms
8336c29bfb Add a 'suspended' flag to softc so that we can avoid races on detach. 2004-07-09 00:12:41 +00:00
bms
e2d65a49fd Actually turn on driver locking in xl(4). 2004-07-09 00:11:25 +00:00
bms
16dd7607ce Further rl(4) locking improvements:
- Avoid unnecessary re-acquisition elsewhere by adding *_locked()
   entry points as needed.
 - Correct locking for the DEVICE_POLLING case.
 - Hold the driver lock for the entire duration of interrupt servicing,
   to avoid unneeded, expensive re-acquisition; use *_locked() entry
   points as needed.

Reviewed by:	-net (silence)
2004-07-09 00:07:06 +00:00
brian
aae31dbf32 Change the following environment variables to kernel options:
bootp -> BOOTP
    bootp.nfsroot -> BOOTP_NFSROOT
    bootp.nfsv3 -> BOOTP_NFSV3
    bootp.compat -> BOOTP_COMPAT
    bootp.wired_to -> BOOTP_WIRED_TO

- i.e. back out the previous commit.  It's already possible to
pxeboot(8) with a GENERIC kernel.

Pointed out by: dwmalone
2004-07-08 22:35:36 +00:00
jhb
eeb3c91445 - Move contents of sched_add() into a sched_add_internal() function that
takes an argument to specify if it should preempt or not.  Don't preempt
  when sched_add_internal() is called from kseq_idled() or kseq_assign()
  as in those cases we are about to call mi_switch() anyways.  Also, doing
  so during the first context switch on an AP leads to a NULL pointer deref
  because curthread is NULL.
- Reenable preemption for ULE.

Submitted by:	Taku YAMAMOTO taku at tackymt.homeip.net
2004-07-08 21:45:04 +00:00
marcel
acd8701123 MFamd64 (1.275):
Reduce the scope of the Giant lock being held for non-mpsafe syscalls.
There was way too much code being covered.
2004-07-08 21:08:07 +00:00
cognet
0a98d3720a Define NSFBUFS and use it. 2004-07-08 21:03:35 +00:00