Commit Graph

2050 Commits

Author SHA1 Message Date
mycroft 1d915f4130 Allow my disk to actually spin down using `-o async' again.
Note: This uses the same questionable logic as vfs_bio.c to check MNT_ASYNC.
Something needs to be done about this.
2000-03-03 05:21:03 +00:00
itojun 04ac848d6f introduce m->m_pkthdr.aux to hold random data which needs to be passed
between protocol handlers.

ipsec socket pointers, ipsec decryption/auth information, tunnel
decapsulation information are in my mind - there can be several other usage.
at this moment, we use this for ipsec socket pointer passing.  this will
avoid reuse of m->m_pkthdr.rcvif in ipsec code.

due to the change, MHLEN will be decreased by sizeof(void *) - for example,
for i386, MHLEN was 100 bytes, but is now 96 bytes.
we may want to increase MSIZE from 128 to 256 for some of our architectures.

take caution if you use it for keeping some data item for long period
of time - use extra caution on M_PREPEND() or m_adj(), as they may result
in loss of m->m_pkthdr.aux pointer (and mbuf leak).

this will bump kernel version.

(as discussed in tech-net, tested in kame tree)
2000-03-01 12:49:27 +00:00
enami 13d92f98ce Remove unnecessary asterisk in comment (probably it was comment leader of
multiline comment).
2000-03-01 03:51:29 +00:00
enami 543db3a000 Cosmetic changes. 2000-03-01 03:50:04 +00:00
itojun c47506aed1 more fix to ancillary data alignment. we need padding after
last cmsg_data item (see the figure on RFC2292 page 18).
2000-02-29 19:14:59 +00:00
itojun 959ca07b4b add hw.alignbytes sysctl mib. this gives you the value of ALIGNBYTES
at the kernel compilation time (ALIGNBYTES that the kernel uses).
2000-02-27 06:13:35 +00:00
sommerfeld cd14e5fa0c Add a fifth "divisor" argument to humanize_number; suitable values are
either 1024 or 1000.
Needed because frequencies use decimal rather than power-of-two SI
prefixes.
2000-02-20 19:32:28 +00:00
itojun 83176f3b3c fix alignment problem in ancillary messages (alpha).
the change constitutes binary compatibility issue hen sizeof(long) !=4.
there's no way to be backward compatible, and only guys affected
are IPv6 userland tools.

From: =?iso-8859-1?Q?G=F6ran_Bengtson?= <goeran@cdg.chalmers.se>
2000-02-18 05:19:23 +00:00
itojun 791a70292c correct ratecheck() signedness. without this fix, ratecheck() will never
success again after first success with lasttime=(0,0).
2000-02-16 12:36:19 +00:00
fvdl c13f6dd258 Introduce a sysctl to enable/disable if non-root users can mount filesystems.
Default: off.
2000-02-16 11:57:45 +00:00
fvdl fe39281ea4 Fixes to the softdep code from Ethan Solomita <ethan@geocast.com>.
* Fix buffer ordering when it has dependencies.
* Alleviate memory problems.
* Deal with some recursive vnode locks (sigh).
* Fix other bugs.
2000-02-14 22:00:21 +00:00
thorpej 445e42d77a One small piece from UBC: create a pool for I/O buffers. One small piece
not from UBC: make physio use it instead of its own home-grown thing.
2000-02-14 20:12:02 +00:00
thorpej 2649d26c0e Use ratecheck(). 2000-02-14 19:28:19 +00:00
oster 919df6690a Add support for / on RAID. A bit of a gross hack, but sufficient for now.
Note that this doesn't help you much until the RAID autoconfig code
in sys/dev/raidframe/rf_netbsdkintf.c is turned on.
2000-02-13 04:57:44 +00:00
thorpej eb9cbbe294 Add some very simple code to auto-size the kmem_map. We take the
amount of physical memory, divide it by 4, and then allow machine
dependent code to place upper and lower bounds on the size.  Export
the computed value to userspace via the new "vm.nkmempages" sysctl.

NKMEMCLUSTERS is now deprecated and will generate an error if you
attempt to use it.  The new option, should you choose to use it,
is called NKMEMPAGES, and two new options NKMEMPAGES_MIN and
NKMEMPAGES_MAX allow the user to configure the bounds in the kernel
config file.
2000-02-11 19:22:52 +00:00
sommerfeld 39db0e9c7e Three MULTIPROCESSOR + LOCKDEBUG fixes:
1) fix typo preventing compilation (missing comma).
2) in SLOCK_WHERE, display cpu number in the MP case.
3) the folowing race condition was observed in _simple_lock:
	cpu 1 releases lock,
	cpu 0 grabs lock
 	cpu 1 sees it's already locked.
	cpu 1 sees that lock_holder== "cpu 1"
	cpu 1 assumes that it already holds it and barfs.
	cpu 0 sets lock_holder == "cpu 0"
Fix: set lock_holder to LK_NOCPU in _simple_unlock().
2000-02-09 16:46:09 +00:00
fair 554df2b994 remove kern_logsigexit being "on" for DIAGNOSTIC 2000-02-08 04:13:51 +00:00
thorpej fe551f0e64 Fix a bug in disksort_*() which caused non-optimal ordering when multiple
active partitions were on a single spindle.  Add a b_rawblkno member to
struct buf which contains the non-partition-relative block number to sort
by.
2000-02-07 20:16:47 +00:00
jonathan b19c0fbb0a Make kernel SOMAXCONN patchable. Will add sysctl once we
decide on namespace.
2000-02-07 18:43:26 +00:00
eeh 8636e8eef7 Update for compat_netbsd32. 2000-02-06 16:49:51 +00:00
itojun 90736ab608 fix include pathname for better rfc2292 compliance. 2000-02-06 12:49:37 +00:00
fair c75556a12f Add kernel logging of processes which exit on signals which can
cause a core to drop, and whether the core dropped, or, if it did
not, why not (i.e. error number). Logs process ID, name, signal that
hit it, and whether the core dump was successful.

logging only happens if kern_logsigexit is non-zero, and it can be
changed by the new sysctl(3) value KERN_LOGSIGEXIT. The name of this
sysctl and its function are taken from FreeBSD, at the suggestion
of Greg Woods in PR 6224. Default behavior is zero for a normal
kernel, and one for a kernel compiled with DIAGNOSTIC.
2000-02-06 07:29:56 +00:00
thorpej 113a379cba Implement pffinddomain(), and use it as appropriate. 2000-02-06 02:54:15 +00:00
cgd dd84ecc7ac Implement ratecheck(), a function which can help programmers implement
rate-limited actions.  See ratecheck(9) for details of its use.
2000-02-03 23:04:45 +00:00
thorpej 9069b40366 Add a sanity check to ensure that a region being free()'d is actually
within the KVA range malloc() would return.
2000-02-01 19:37:58 +00:00
enami 3669884c32 Factor out a common functionality into a subroutine. 2000-02-01 05:28:01 +00:00
danw f77befbc84 #define __HAVE_DEVICE_REGISTER on ports that have it, and check for
that, rather than a list of architecture defines, in config_attach
2000-02-01 04:01:19 +00:00
assar a49e53d3df (sys_open, sys_fhopen): remove declaration of vnops, now in
<sys/file.h>
2000-02-01 01:24:38 +00:00
assar e4b59906e1 (exec_script_makecmds): remove declaration of vnops, now in
<sys/file.h>
2000-02-01 01:23:29 +00:00
christos 3d9c5d0450 Regen 2000-01-31 15:13:24 +00:00
christos 3cbe025990 __semctl13 -> ____semctl13 because this now is not called directly.
The fourth argument to it is a pointer to union semun not union semun,
because passing structs and unions to syscalls cannot be handled portably.
2000-01-31 15:12:30 +00:00
hannken a6ee792cee The decision that `disksort_cylinder' uses to decide if the buffer needs
to go to the inversion list is incomplete. If the cylinders are equal
block numbers must be checked.

This caused lockups if some buffers with the same cylinder were cycling
through the list, as it may happen with softdep enabled.

Fixes PR #9197.
2000-01-28 09:27:38 +00:00
thorpej b58f7c1079 Remove unused global `consintr'. Rob Black, kern/3841. 2000-01-26 07:50:33 +00:00
enami a119cb3677 In the diagnostic check in config_detach, inform the name of parent and
its child who shouldn't be exist.
2000-01-25 13:23:26 +00:00
enami 65c138fea0 - Print a name of root device even if it is a network device.
- If RB_ASKNAME, only dumpdv holds the results asked interactively.
  Examie dumpspec only when !RB_ASKNAME.  This allows us to override
  dumps on none in kernel config file by booting kernel with RB_ASKNAME.
- Slightly rearrange code so that it more matches to comment.
2000-01-25 09:23:59 +00:00
enami 047cc5e94f Cleanup setroot() a bit:
- No longer necessary to use goto, just breaking the loop like other case
  is enough.
- Don't caliculate loop invariant every time.  Just reuse.
2000-01-25 03:42:36 +00:00
fvdl 65e677bd99 Add an exec hook mechanism, where kernel subsystem can register to
execute certain functions when a process does an exec(). Currently
uses a global list. Could possibly be done using a per-process list,
but this needs more thought.
2000-01-25 01:15:14 +00:00
thorpej 5aa64075cc Add a `config_pending' semaphore to block mounting of the root file system
until all device driver discovery threads have had a chance to do their
work.  This in turn blocks initproc's exec of init(8) until root is
mounted and process start times and CWD info has been fixed up.

Addresses kern/9247.
2000-01-24 18:03:19 +00:00
thorpej 6068308fcd In cwdinit(), if there isn't a cdir vnode yet, don't VREF() it. 2000-01-24 17:57:34 +00:00
mycroft 0153fa8a4d Regen. 2000-01-23 01:01:51 +00:00
mycroft db70ed30f4 Use proper varargs format for __semctl13. 2000-01-23 01:01:30 +00:00
thorpej 2ad35b74df After some discussion with Mycroft, change splstatclock() to splclock().
The rule is that you don't get to call scheduler-related functions (e.g.
wakeup()) above the clock interrupt.  Going to statclock unnecessarily
hoses e.g. serial interrupts on the SPARC.
2000-01-22 16:53:50 +00:00
thorpej 2ab34248eb Back out rev 1.36... what was I thinking? Also, update the comment that
led me astray to reflect reality.
2000-01-22 16:32:02 +00:00
thorpej 0ef111e8ee - Implement bowrite() -- perform an asynchronous, ordered write. 2000-01-21 23:22:24 +00:00
thorpej e3d3905ac7 Preserve B_ORDERED. 2000-01-21 23:21:46 +00:00
thorpej 05c6b5a9a0 - Add a B_ORDERED flag to communicate to drivers that an I/O request should
be issued/completed in order; that is, provide a barrier for I/O queues.
- Change the buffer driver queue links to a TAILQ, rather than using
  a home-grown equivalent.  Provide BUFQ_*() macros to manipulate buffer
  queues; these deal with the barrier provided by B_ORDERED.
- Update disksort() accordingly, and provide 3 versions:
	- disksort_cylinder(): historical disksort(), which keys on
	  b_cylinder (and b_blkno for the case when b_cylinder matches).
	- disksort_blkno(): sorts only on b_blkno.  Essentially the
	  same as disksort_cylinder(), but with fewer comparisons.
	- disksort_tail(): requests are simply inserted into the queue
	  at the tail.  This is provided as an option so that drivers
	  can simply have a pointer to the appropriate sort function.
  Note that disksort() now pays attention to B_ORDERED.
2000-01-21 23:20:51 +00:00
thorpej a0397a2573 Move callout initialization to a single location; no need to duplicate
that code all over the place.
2000-01-19 20:05:30 +00:00
cgd ccfb44f360 use the old cloning-device cf_unit increment behaviour, if
__BROKEN_CONFIG_UNIT_USAGE is defined.
2000-01-18 07:45:04 +00:00
matt 2dd872c9b4 defopt COMPAT_VAX1K 2000-01-17 02:59:25 +00:00
assar 70aab8de7d (sysctl_doeproc): make sure we release the proclist_lock even if
copyout fails
2000-01-16 15:07:48 +00:00