Commit Graph

2086 Commits

Author SHA1 Message Date
chs c81c7aa367 always define PI_MAGIC so this compiles in all cases. 2000-04-13 00:44:19 +00:00
simonb 6008cfd5de Remove bogus "#ifdef EIDRM" checks and warnings that BSD doesn't define
EIDRM - EIDRM was added over two years ago!
2000-04-12 13:08:26 +00:00
fvdl ea3e5a38b8 Fix from Ethan Solomita <ethan@geocast.com> to avoid a livelock problem
where the buffer cache code would be recycling B_AGE buffers with
dependencies.
2000-04-12 11:33:43 +00:00
chs a6d33cc1f2 add a new function vn_marktext() for exec code to let others know
that the vnode is now being used as process text.
2000-04-11 04:37:47 +00:00
chs 1c084aee4f add ddb commands for printing vnodes and bufs. 2000-04-10 02:22:13 +00:00
chs 9faf1824c8 in pool_put(), fill the entire object with PI_MAGIC instead of just the
first element.
2000-04-10 02:17:42 +00:00
augustss c87c1861bb Add a special option, DEBUG_HALT_BUSY, that allows you to debug when the
system doesn't want to halt cleanly.  The code was there before, but only
with the DEBUG option.
2000-03-30 09:32:25 +00:00
augustss 264f1d27c6 Get rid of register declarations. 2000-03-30 09:27:11 +00:00
simonb 6fa443065b Delete redundant decl of union_vnodeop_p, it's in <miscfs/union/union.h>. 2000-03-30 02:15:09 +00:00
simonb d1f05e517a Delete redundant decl of dounmount(), it's in <sys/mount.h>. 2000-03-30 02:12:25 +00:00
simonb 9ff7681a33 Don't need to include <sys/conf.h> here. 2000-03-29 03:43:31 +00:00
simonb 6043a575b2 Remove declaration of db_radix - <ddb/db_output.h> has one.
Also remove <sys/conf.h> - don't need it here.
2000-03-29 03:05:18 +00:00
simonb 2f1fef39b3 Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.
2000-03-28 23:57:24 +00:00
simonb bb1fc886cf endtsleep() is prototyped at the top of the file, delete duplicate
declaration inside tsleep().
2000-03-28 22:04:46 +00:00
simonb 468456cf00 Delete duplicate definition of kernel time variable (in <sys/kernel.h>). 2000-03-28 22:01:52 +00:00
kleink 2e68f6172e Cast timeval members to types we know the printf conversions of. 2000-03-28 18:39:03 +00:00
augustss 61462c55a3 Get rid of a lot of register declarations.
(Why isn't this done everywhere in the kernel already?)
2000-03-28 17:30:10 +00:00
simonb 071bde5df6 Don't need to declare nblkdev, nchrdev - these are in <sys/systm.h>. 2000-03-28 06:26:22 +00:00
kleink 230876cf26 Merge parts of chs-ubc2 into the trunk:
* Remove the casts to vaddr_t from the round_page() and trunc_page() macros to
  make them type-generic, which is necessary i.e. to operate on file offsets
  without truncating them.
* In due course, cast pointer arguments to these macros to an appropriate
  integral type (paddr_t, vaddr_t).

Originally done by Chuck Silvers, updated by myself.
2000-03-26 20:42:21 +00:00
enami f9c7a69ff5 Call the routine to calculate callwheelsize from allocsys() instead of
main() since some port like alpha and mips calls allocsys() before main()
is called.  While I'm here, I renamed some function.
2000-03-24 11:57:14 +00:00
thorpej 2b58edac40 Remove the CALLWHEEL_SORT code. It was implemented just for experimenting,
and I had no plans to ever enable it.  A record of the code is now in the
CVS history of the file, so we can unclutter now.
2000-03-23 20:51:09 +00:00
thorpej 7c8b72d592 uiomove(): if we're informed that we should yield the CPU, use the new
preempt() primitive to do so.
2000-03-23 20:39:58 +00:00
thorpej 68054a285a Track if a process has been through a round-robin cycle without yielding
the CPU, and mark that it should yield if that happens.

Based on a discussion with Artur Grabowski.
2000-03-23 20:37:58 +00:00
soren 93c531f872 Tiny comment update. 2000-03-23 14:32:41 +00:00
thorpej b667a5a357 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 06:30:07 +00:00
thorpej dabbfde70a Implement fdremove() which is used in place of all the code that
did the "fdp->fd_ofiles[fd] = 0" assignment; fdremove() make sure
the fd_freefiles hints stay in sync.

From OpenBSD.
2000-03-23 05:16:12 +00:00
ws 7da71e5f9e Make IPKDB working again.
Add support for i386 debugging and pci-based ne2000 boards.
2000-03-22 20:58:25 +00:00
thorpej d488aca2aa Pool'ify filedesc0 allocation. 2000-03-22 17:42:57 +00:00
fvdl c3167b9545 Do previous better. Use FSYNC_RECLAIM as it was before. 2000-03-17 01:25:06 +00:00
darrenr 08227b6c88 build stkbuf out of u_long rather than char for sys_ioctl() to ensure we get an aligned array 2000-03-17 00:01:48 +00:00
jdolecek 89015c4648 Add new VFS op routine - vfs_done and call it on filesystem detach
in vfs_detach(). vfs_done may free global filesystem's resources,
typically those allocated in respective filesystem's init function.
Needed so those filesystems which went in via LKM have a chance to
clean after themselves before unloading. This fixes random panics
when LKM for filesystem using pools was loaded and unloaded several
times.

For each leaf filesystem, add appropriate vfs_done routine.
2000-03-16 18:08:17 +00:00
jdolecek 677d6a9962 add hashdone() - frees memory previously allocated via hashinit() 2000-03-16 17:19:53 +00:00
fvdl 14cbd3e2b0 In fdatasync, do not call bioops.io_fsync, since we're not flushing
metadata. If you do call it, there's actually a fair chance that it
will panic because its metadata dependencies were not cleared in
the VOP_FSYNC above (with FSYNC_DATAONLY).
2000-03-15 16:30:39 +00:00
fvdl 01db605567 Do the previous slightly different: any files on MNT_SOFTDEP filesystems do
not want all their metadata dependencies flushed from vinvalbuf() if
there are no dirty blocks.
2000-03-15 16:28:45 +00:00
perseant 61fa9e1409 Move vinvalbuf's check for dirty blocks into ffs_fsync, to ensure that
mode and ownership bits are flushed to disk before the vnode is
reclaimed.

The check, introduced in the softdep merge, assumes that if no blocks
are dirty, no file data *or metadata* needs to be flushed to disk.  This
is true of ffs, but is not true of lfs, and may not be true of other
filesystems.

Tested by myself and Bill Squier <groo@cs.stevens-tech.edu>.
2000-03-11 05:00:18 +00:00
enami 01a5f6c995 Create new kernel thread to issue statfs(2) system call to check free
disk space rather than doing it in timeout handler.  This fixes long
standing bug that accounting file can't be put on NFS file system (so,
e.g, we couldn't turn on accounting on diskless system).
2000-03-10 01:13:18 +00:00
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