dragonfly.git
18 years ago* Fix a number of alignment errors that was causing garbage to be parsed.
Matthew Dillon [Tue, 5 Jul 2005 02:38:34 +0000 (02:38 +0000)]
* Fix a number of alignment errors that was causing garbage to be parsed.
* Fix a stream cache bug that was preventing some writes from synchronizing
  properly.
* Report PAD headers as PAD headers rather then as unknown data.

18 years agoMajor continuing work on jscan, the userland backend for the journaling
Matthew Dillon [Tue, 5 Jul 2005 00:26:03 +0000 (00:26 +0000)]
Major continuing work on jscan, the userland backend for the journaling
system.

* Fix bugs in the stream demultiplexing code.  Only the first stream header
  is supposed to be passed to the virtualized stream code.  We were passing
  the stream header and trailer for each meta record and the extra meta-data
  really confused the virtualized stream scanning code.

* Add support for unknown nesting record sizes.  This occurs when the
  nesting record in the virtual stream is too large to fit in the kernel's
  in-memory journal FIFO.  This allows us to arbitrarily push and pop
  elements of a transaction without having to know the size of the completed
  transaction in advance.

* Use a 64 bit integer to calculate the completed transaction size.  Note
  however that currently the stream reconstruction code uses malloc so
  there are serious limits to what it can reconstruct.

* Implement (partial) support for mirroring.  Only basic file and directory
  creation, write, remove, and rename is currently decoded.

The TODO list is long and varied.  We need to use mmap() instead of malloc()
to reference journal data.  We need to finish implementing mirror mode.  We
need a catch-up or restart mode for the mirror.  We need raw journal data
logging, we need stream ackknowledgements, and a thousand other things.

This example will maintain a mirror of /usr in /usr_mirror in real time.
Again, remember that there is a lot more work to do.... the mirroring isn't
perfect by a long shot.  We don't do symlinks for example, yet, and there
are many other issues.

    # Warning: do not ^Z mountctl!
    cpdup /usr /usr_mirror
    cd /usr_mirror
    mountctl -a /usr:test | jscan -m stdin
    [does not return]
    [to terminate, type 'mountctl -d test' in another shell window]

18 years agoThe size of a nesting record may not be known (due to the virtual stream
Matthew Dillon [Tue, 5 Jul 2005 00:14:27 +0000 (00:14 +0000)]
The size of a nesting record may not be known (due to the virtual stream
being larger then the in-memory FIFO).  Instead of setting the header
size to 8, set it to -1 to make this case clear.

18 years agoRename the variable PROG to LDR to remove a warning message about
Jeroen Ruigrok/asmodai [Mon, 4 Jul 2005 21:39:05 +0000 (21:39 +0000)]
Rename the variable PROG to LDR to remove a warning message about
'line 43: warning: duplicate script for target "loader" ignored"'.

The thing was that ${PROG}: was specified later on in the Makefile, which
conflicts with line 39 from bsd.prog.mk, which is:

${PROG}: ${OBJS}

thus redefining ${PROG} or rather loader.

18 years agoFix a few issues in the kernel-side journal.
Matthew Dillon [Mon, 4 Jul 2005 21:05:54 +0000 (21:05 +0000)]
Fix a few issues in the kernel-side journal.

* Fix a missing vattr record in CREATE.
* Fix a misgenerated mode attribute.
* Fix a misgenerated file offset for the O_APPEND case.
* The 16 bit record type is unsigned, not signed (fixes comparisons in jscan)
* Add JTYPE_MASK against the record type for JTYPE and JLEAF comparisons.

18 years agoFix two installworld mtree warnings.
Jeroen Ruigrok/asmodai [Mon, 4 Jul 2005 21:05:27 +0000 (21:05 +0000)]
Fix two installworld mtree warnings.

This will most likely be revisited in the future.

18 years agoThe pipe code was not properly handling kernel space writes. Such writes
Matthew Dillon [Mon, 4 Jul 2005 18:39:16 +0000 (18:39 +0000)]
The pipe code was not properly handling kernel space writes.  Such writes
can be made by the journaling code when journaling to a pipe.

18 years agoDon't forget to install the magic manpage, too.
Sascha Wildner [Mon, 4 Jul 2005 17:19:34 +0000 (17:19 +0000)]
Don't forget to install the magic manpage, too.

18 years agoDo not abort the entire core dump if VOP_VPTOFH() fails. VPTOFH is not
Matthew Dillon [Mon, 4 Jul 2005 16:02:58 +0000 (16:02 +0000)]
Do not abort the entire core dump if VOP_VPTOFH() fails.  VPTOFH is not
currently supported on NFS file handles.  This simply means that a checkpoint
restore will not work (for now).  The core itself will still be fine.

Reported-by: Richard Nyberg <rnyberg@it.su.se>
18 years agoOnly symlink if we're building either sendmail or mailwrapper.
Simon Schubert [Mon, 4 Jul 2005 13:35:18 +0000 (13:35 +0000)]
Only symlink if we're building either sendmail or mailwrapper.

Obtained-from: FreeBSD

18 years ago- Merge few fixes from NetBSD/FreeBSD.
Simon Schubert [Mon, 4 Jul 2005 13:33:02 +0000 (13:33 +0000)]
- Merge few fixes from NetBSD/FreeBSD.
- Update DIAGNOSTICS to reflect reality

18 years agoMerge various changes from NetBSD, OpenBSD and FreeBSD, especially:
Simon Schubert [Mon, 4 Jul 2005 11:36:30 +0000 (11:36 +0000)]
Merge various changes from NetBSD, OpenBSD and FreeBSD, especially:
- add command line arguments to the end, not to the beginning
  of the argument list. This enables us to do
sendmail /usr/bin/ssh -T mymailhost sendmail
  and it won't come out as "ssh -i mail@addr -T mailhost sendmail" as
  we had it (and OpenBSD and FreeBSD still have).

- remove freeing of memory when we err() anyways
- set progname so we have understandable error messages which actually
  originate from mailwrapper

18 years agoSync with NetBSD:
Joerg Sonnenberger [Mon, 4 Jul 2005 10:11:57 +0000 (10:11 +0000)]
Sync with NetBSD:
* add some comments.
* add some functions:
   _citrus_memory_stream_bind_ptr()
   _citrus_memory_stream_tell()
   _citrus_memory_stream_ungetc()
   _citrus_region_get_subregion()
* fix a bug in _citrus_memory_stream_seek().

18 years agoSync with NetBSD:
Joerg Sonnenberger [Mon, 4 Jul 2005 10:04:52 +0000 (10:04 +0000)]
Sync with NetBSD:
* add some comments.
* add some functions:
   _citrus_memory_stream_bind_ptr()
   _citrus_memory_stream_tell()
   _citrus_memory_stream_ungetc()
   _citrus_region_get_subregion()
* fix a bug in _citrus_memory_stream_seek().

18 years agoDeclare module for mapper_parallel explicitly to allow static linking.
Joerg Sonnenberger [Mon, 4 Jul 2005 08:52:56 +0000 (08:52 +0000)]
Declare module for mapper_parallel explicitly to allow static linking.

18 years agoAllow inclusion of Citrus modules in statically linked binaries.
Joerg Sonnenberger [Mon, 4 Jul 2005 08:02:43 +0000 (08:02 +0000)]
Allow inclusion of Citrus modules in statically linked binaries.

To achieve this, ensure that _citrus_module_$MOD is referenced
from the binary and link with -L/usr/lib/i18n -l$MOD for all
modules you are interested in.

18 years agoUse M_ASSERTPKTHDR. (Obtained-from: FreeBSD)
Joerg Sonnenberger [Mon, 4 Jul 2005 07:32:37 +0000 (07:32 +0000)]
Use M_ASSERTPKTHDR. (Obtained-from: FreeBSD)
Use NULL instead of 0 for pointers.
Indentation and line breaks.
Use ifp instead of arpcom where sensible.
Remove some obsolete declarations.

Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
18 years agoUse local storage for MAC address.
Joerg Sonnenberger [Mon, 4 Jul 2005 07:26:46 +0000 (07:26 +0000)]
Use local storage for MAC address.

Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
18 years ago* Also clean up /usr/share/man/en.ISO8859-1/man1aout.
Sascha Wildner [Sun, 3 Jul 2005 22:34:48 +0000 (22:34 +0000)]
* Also clean up /usr/share/man/en.ISO8859-1/man1aout.

* Clean up profiled versions of libmp and libgmp as well.

* Remove .cat files generated for ee(1) by broken NLS framework.

* Remove obsolete header files.

18 years ago.Fx -> .Dx.
Jeroen Ruigrok/asmodai [Sun, 3 Jul 2005 20:58:35 +0000 (20:58 +0000)]
.Fx -> .Dx.

18 years agoDeorbit Alpha.
Joerg Sonnenberger [Sun, 3 Jul 2005 18:17:31 +0000 (18:17 +0000)]
Deorbit Alpha.

18 years agoSlightly chance the order of interrupt handling. First hook the
Joerg Sonnenberger [Sun, 3 Jul 2005 16:47:20 +0000 (16:47 +0000)]
Slightly chance the order of interrupt handling. First hook the
interrupt up last and keep the critical section in detach.
This is a prequirement for the elimination of wi_gone.

18 years agoDon't unconditionally compile in ATLQ.
Simon Schubert [Sun, 3 Jul 2005 15:47:01 +0000 (15:47 +0000)]
Don't unconditionally compile in ATLQ.

18 years ago- Use __inline instead of __inline__. Therefore include sys/cdefs.h. [1]
Simon Schubert [Sun, 3 Jul 2005 14:43:27 +0000 (14:43 +0000)]
- Use __inline instead of __inline__. Therefore include sys/cdefs.h. [1]
- Update man page to reflect reality.

Pointed-out-by: Andreas Hauser [1]
18 years agoFix shell expansion to cover dangling symlinks as well.
Simon Schubert [Sun, 3 Jul 2005 14:03:24 +0000 (14:03 +0000)]
Fix shell expansion to cover dangling symlinks as well.

It seems FreeBSD still suffers from the same bug, whereas NetBSD
fixed this over 4 years ago. Besides, they have lots of fixes and
improvements we should use.

Noticed-by: swildner
18 years ago- Convert `inline' to `__inline__' to make gcc happy with -ansi.
Simon Schubert [Sun, 3 Jul 2005 13:08:02 +0000 (13:08 +0000)]
- Convert `inline' to `__inline__' to make gcc happy with -ansi.
- Remove cdecl include, it's not needed.

Noticed-by: Andreas Hauser
18 years agoDefine NLSNAME to make the NLS framework really work.
Sascha Wildner [Sun, 3 Jul 2005 11:58:01 +0000 (11:58 +0000)]
Define NLSNAME to make the NLS framework really work.

18 years agoremove errnoneous whitespace
Simon Schubert [Sun, 3 Jul 2005 00:51:44 +0000 (00:51 +0000)]
remove errnoneous whitespace

18 years agoIgnore -I if -i is specified, otherwise we can get double prompts.
Simon Schubert [Sun, 3 Jul 2005 00:42:13 +0000 (00:42 +0000)]
Ignore -I if -i is specified, otherwise we can get double prompts.

18 years agoChange ntp.conf to ntpd.conf and add dntpd.conf.
Sascha Wildner [Sat, 2 Jul 2005 21:05:56 +0000 (21:05 +0000)]
Change ntp.conf to ntpd.conf and add dntpd.conf.

18 years agoWe're DragonFly, not NetBSD.
Sascha Wildner [Sat, 2 Jul 2005 20:50:02 +0000 (20:50 +0000)]
We're DragonFly, not NetBSD.

18 years agoLots of third party programs declare
Simon Schubert [Sat, 2 Jul 2005 18:13:52 +0000 (18:13 +0000)]
Lots of third party programs declare
extern int errno;

This breaks when errno is declared as
extern __thread int errno;

Fix the breakage by using a hack as we had before:
Define errno as (*__error()), but this time also
define a static inline __error(void) so that ABI
doesn't break (and we're saving a call as well).

18 years agogmp.h wasn't cleaned because of a typo.
Sascha Wildner [Sat, 2 Jul 2005 13:22:58 +0000 (13:22 +0000)]
gmp.h wasn't cleaned because of a typo.

18 years agoClean up stale supfile examples.
Sascha Wildner [Sat, 2 Jul 2005 10:57:54 +0000 (10:57 +0000)]
Clean up stale supfile examples.

18 years agoUse LST_FOREACH() macro instead of for-loop
Max Okumoto [Sat, 2 Jul 2005 10:48:42 +0000 (10:48 +0000)]
Use LST_FOREACH() macro instead of for-loop

18 years agoAvoid comments using the word "variable", since it can be confused
Max Okumoto [Sat, 2 Jul 2005 10:48:06 +0000 (10:48 +0000)]
Avoid comments using the word "variable", since it can be confused
with the make variables.

18 years agoMove code out of InitVariables() back into main(), to
Max Okumoto [Sat, 2 Jul 2005 10:47:48 +0000 (10:47 +0000)]
Move code out of InitVariables() back into main(), to
clarify purpose of InitVariables().

18 years agoRemove white space between function name and paramter list.
Max Okumoto [Sat, 2 Jul 2005 10:47:28 +0000 (10:47 +0000)]
Remove white space between function name and paramter list.

18 years agoMove code in Proc_Setupsignals() into Proc_Init().
Max Okumoto [Sat, 2 Jul 2005 10:47:13 +0000 (10:47 +0000)]
Move code in Proc_Setupsignals() into Proc_Init().

18 years agoReduce usage of commandShell global by adding a shell field to
Max Okumoto [Sat, 2 Jul 2005 10:46:53 +0000 (10:46 +0000)]
Reduce usage of commandShell global by adding a shell field to
the Job structure.

18 years agoReduce usage of commandShell global by assigning it to a local
Max Okumoto [Sat, 2 Jul 2005 10:46:28 +0000 (10:46 +0000)]
Reduce usage of commandShell global by assigning it to a local
variable.  Eventually those functions will take it as an input
paramter.

18 years agoPass commandShell is a paramter to Proc_Exec() instead of
Max Okumoto [Sat, 2 Jul 2005 10:46:01 +0000 (10:46 +0000)]
Pass commandShell is a paramter to Proc_Exec() instead of
using a global variable.

18 years agoMoved exit status code into subroutine Make_Run()
Max Okumoto [Sat, 2 Jul 2005 10:45:29 +0000 (10:45 +0000)]
Moved exit status code into subroutine Make_Run()

18 years agoFix typo and add more obsolete man pages.
Sascha Wildner [Sat, 2 Jul 2005 00:21:42 +0000 (00:21 +0000)]
Fix typo and add more obsolete man pages.

18 years agoAdd link for localeconv.3 man page.
Sascha Wildner [Sat, 2 Jul 2005 00:12:07 +0000 (00:12 +0000)]
Add link for localeconv.3 man page.

18 years agoAdd link for termcap.3 man page.
Sascha Wildner [Sat, 2 Jul 2005 00:11:03 +0000 (00:11 +0000)]
Add link for termcap.3 man page.

18 years agoAdd missing curses.3 man page link.
Sascha Wildner [Fri, 1 Jul 2005 21:35:37 +0000 (21:35 +0000)]
Add missing curses.3 man page link.

18 years agoClean up obsolete cccp.1 man page.
Sascha Wildner [Fri, 1 Jul 2005 21:09:34 +0000 (21:09 +0000)]
Clean up obsolete cccp.1 man page.

18 years agoAdd missing man page links.
Sascha Wildner [Fri, 1 Jul 2005 21:00:15 +0000 (21:00 +0000)]
Add missing man page links.

18 years agoFix some stupid style bugs. Call bus_setup_intr after vxattach,
Joerg Sonnenberger [Fri, 1 Jul 2005 20:23:52 +0000 (20:23 +0000)]
Fix some stupid style bugs. Call bus_setup_intr after vxattach,
fixing a bug in the old code.

Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
18 years agoRemove a bunch of breaks after return, merge a return into a default case.
Joerg Sonnenberger [Fri, 1 Jul 2005 20:21:00 +0000 (20:21 +0000)]
Remove a bunch of breaks after return, merge a return into a default case.
Eliminate local variables in vx_eisa_attach, store it directly in the
softc.

18 years agoRemove some unused macros. Constify. Minor style changes.
Joerg Sonnenberger [Fri, 1 Jul 2005 20:18:39 +0000 (20:18 +0000)]
Remove some unused macros. Constify. Minor style changes.

Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
18 years agoPush device_t's down to vxattach, not the softc.
Joerg Sonnenberger [Fri, 1 Jul 2005 20:14:13 +0000 (20:14 +0000)]
Push device_t's down to vxattach, not the softc.
Use if_printf. Fix an incorrect check to determine when no connectors
have been found. Don't store the unit in the softc.

Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
18 years agoDon't remove gcc34's /usr/bin/CC.
Sascha Wildner [Fri, 1 Jul 2005 19:56:11 +0000 (19:56 +0000)]
Don't remove gcc34's /usr/bin/CC.

18 years ago- Whoops, some test code slipped in. Remove it
Liam J. Foy [Fri, 1 Jul 2005 13:13:00 +0000 (13:13 +0000)]
- Whoops, some test code slipped in. Remove it

18 years agoAdd support for Broadcom BCM4401-B0.
Joerg Sonnenberger [Fri, 1 Jul 2005 12:39:54 +0000 (12:39 +0000)]
Add support for Broadcom BCM4401-B0.

Submitted-by: Carl Schmidt <carl@carlschmidt.net>
18 years agoRegen.
Joerg Sonnenberger [Fri, 1 Jul 2005 12:38:56 +0000 (12:38 +0000)]
Regen.

18 years agoAdd PCI ID for BCM4401-B0.
Joerg Sonnenberger [Fri, 1 Jul 2005 12:38:33 +0000 (12:38 +0000)]
Add PCI ID for BCM4401-B0.

Submitted-by: Carl Schmidt <carl@carlschmidt.net>
18 years agoClean up obsolete files in /usr/bin.
Sascha Wildner [Thu, 30 Jun 2005 22:08:27 +0000 (22:08 +0000)]
Clean up obsolete files in /usr/bin.

18 years agoWe are DragonFly. Besides, FreeBSD doesn't include mined at all.
Simon Schubert [Thu, 30 Jun 2005 21:12:55 +0000 (21:12 +0000)]
We are DragonFly. Besides, FreeBSD doesn't include mined at all.

18 years agoClean up obsolete stuff in /usr/sbin.
Sascha Wildner [Thu, 30 Jun 2005 20:12:13 +0000 (20:12 +0000)]
Clean up obsolete stuff in /usr/sbin.

18 years agoClean up obsolete info files.
Sascha Wildner [Thu, 30 Jun 2005 19:47:22 +0000 (19:47 +0000)]
Clean up obsolete info files.

18 years agoNo need to remove the .gz files since we just gunzipped them.
Sascha Wildner [Thu, 30 Jun 2005 19:24:35 +0000 (19:24 +0000)]
No need to remove the .gz files since we just gunzipped them.

18 years agoTear down interrupt in wi_free when necessary.
Joerg Sonnenberger [Thu, 30 Jun 2005 17:11:28 +0000 (17:11 +0000)]
Tear down interrupt in wi_free when necessary.
Return error from wi_reset in wi_attach.
Return error value when all-zero MAC was read.
Let wi_attach call wi_free in error conditions, not the frontends.

Based-on-patch-by: Sepherosa Ziehau <sepherosa@gmail.com>
18 years agodon't include regression tests, we don't use them anyway. more than enough
Joerg Sonnenberger [Thu, 30 Jun 2005 17:05:00 +0000 (17:05 +0000)]
don't include regression tests, we don't use them anyway. more than enough
samples in the wild.

18 years agosort
Joerg Sonnenberger [Thu, 30 Jun 2005 17:01:30 +0000 (17:01 +0000)]
sort

18 years agoRe-commit usched_bsd4.c (losing the history) to try to fix a repository
Matthew Dillon [Thu, 30 Jun 2005 16:38:49 +0000 (16:38 +0000)]
Re-commit usched_bsd4.c (losing the history) to try to fix a repository
error.

18 years agoRemove now unnecessary messing with PCI command register.
Joerg Sonnenberger [Thu, 30 Jun 2005 16:05:14 +0000 (16:05 +0000)]
Remove now unnecessary messing with PCI command register.

Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
Change wi_pci_probe to common style (different patch from submission).

18 years agoUse if_printf, especially for DPRINTF. Merge two DPRINTF statements
Joerg Sonnenberger [Thu, 30 Jun 2005 15:57:27 +0000 (15:57 +0000)]
Use if_printf, especially for DPRINTF. Merge two DPRINTF statements
to assist this. Remove sc_dev and sc_unit. Remove unimplemented prototype.

Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
18 years agoRemove unreferenced files. Seems they now live in sys/boot/common...
Simon Schubert [Thu, 30 Jun 2005 15:56:56 +0000 (15:56 +0000)]
Remove unreferenced files. Seems they now live in sys/boot/common...

18 years agoFix references to bzip2
Simon Schubert [Thu, 30 Jun 2005 15:55:17 +0000 (15:55 +0000)]
Fix references to bzip2

18 years agoFix bzip2 vulnerability.
Simon Schubert [Wed, 29 Jun 2005 23:03:22 +0000 (23:03 +0000)]
Fix bzip2 vulnerability.
Thanks to Colin Percival for giving us a heads-up!

Obtained-from: Steve Grubb via RedHat via FreeBSD

18 years agoremove old bzip2
Simon Schubert [Wed, 29 Jun 2005 22:41:34 +0000 (22:41 +0000)]
remove old bzip2

18 years agoSwitch to bzip2-1.0.3
Simon Schubert [Wed, 29 Jun 2005 22:40:20 +0000 (22:40 +0000)]
Switch to bzip2-1.0.3

18 years agoMerge from vendor branch BZIP:
Simon Schubert [Wed, 29 Jun 2005 22:38:10 +0000 (22:38 +0000)]
Merge from vendor branch BZIP:
Import bzip2-1.0.3 modulo unneeded files.

18 years agoImport bzip2-1.0.3 modulo unneeded files.
Simon Schubert [Wed, 29 Jun 2005 22:38:10 +0000 (22:38 +0000)]
Import bzip2-1.0.3 modulo unneeded files.

18 years agoImport bzip2-1.0.3 modulo unneeded files.
Simon Schubert [Wed, 29 Jun 2005 22:38:10 +0000 (22:38 +0000)]
Import bzip2-1.0.3 modulo unneeded files.

18 years agoFor quickrel, use our quick{world,kernel} targets.
Sascha Wildner [Wed, 29 Jun 2005 17:24:35 +0000 (17:24 +0000)]
For quickrel, use our quick{world,kernel} targets.

18 years agoYet more scheduler work. Revamp the batch detection heuristic and fix a few
Matthew Dillon [Wed, 29 Jun 2005 01:25:10 +0000 (01:25 +0000)]
Yet more scheduler work.  Revamp the batch detection heuristic and fix a few
things here and there.  Test the algorithm against buildworlds, mozilla,
gnome-terminal, and pine all running at once.

* Fix a bug in how I handle p_slptime.
* Move the ++p_cptime out of usched_bsd4 and into kern_clock.c.
* Redo the batch heuristic, boost the cost of doing a fork, and
  slowly decrement p_origcpu to compensate for long-running
  processes.
* Use an instantanious load instead of a time-averaged load in the
  decay calculation.

TODO: the SMP support will be virtually identical across all schedulers
and should probably be abstracted out of usched_*.c.

18 years agoSync with FreeBSD to fix (a genuine DragonFly) bug that printed
Simon Schubert [Wed, 29 Jun 2005 00:24:49 +0000 (00:24 +0000)]
Sync with FreeBSD to fix (a genuine DragonFly) bug that printed
the size instead of the time.

Noticed-by: Joseph Garcia <bsd_usr@yahoo.com>
18 years agoHack in support for ar(4) based devices.
Joerg Sonnenberger [Tue, 28 Jun 2005 18:38:06 +0000 (18:38 +0000)]
Hack in support for ar(4) based devices.

18 years agoThe recent commit to propogate kernel options to modules enabled the
Matthew Dillon [Tue, 28 Jun 2005 07:15:38 +0000 (07:15 +0000)]
The recent commit to propogate kernel options to modules enabled the
ACPI cx state code, which had a big fast KKASSERT(0) in it (panic on
boot).  Fix it.

18 years agoRemove an assertion that does not compile due to a lack of a KERNLOAD
Matthew Dillon [Mon, 27 Jun 2005 22:32:00 +0000 (22:32 +0000)]
Remove an assertion that does not compile due to a lack of a KERNLOAD
variable.

Found-by: walt <wa1ter@myrealbox.com>
18 years agotesting cvs commit
Jeremy C. Reed [Mon, 27 Jun 2005 22:27:36 +0000 (22:27 +0000)]
testing cvs commit

18 years agoAllow the CTYPE macros to be disabled, forcing procedure calls to be used
Matthew Dillon [Mon, 27 Jun 2005 20:27:38 +0000 (20:27 +0000)]
Allow the CTYPE macros to be disabled, forcing procedure calls to be used
instead.

Disable the CTYPE macros in libskey, libutil, and libcrypt.  This allows
pre-1.3 programs linked against libc.so.3 to use the PAM modules in HEAD.
these modules indirectly reference libskey, libutil, and libcrypt, which
then fail to dynamically link against libc.so.3 due to references to
ctype globals that do not exist in libc.so.3.

This is a hack, I know, but we have to make upgrades as compatible as
possible with older programs.

18 years agoPrint out additional information for a magic number failure assertion.
Matthew Dillon [Mon, 27 Jun 2005 19:24:52 +0000 (19:24 +0000)]
Print out additional information for a magic number failure assertion.

18 years ago* Remove a procedural layer in the scheduler clock code by having
Matthew Dillon [Mon, 27 Jun 2005 18:38:03 +0000 (18:38 +0000)]
* Remove a procedural layer in the scheduler clock code by having
  kern_clock call the usched scheduler clock function directly.

* Move p_estcpu to scheduler-specific code.

* Have kern_synch's one-second timer call into the scheduler instead of
  trying to figure it out itself.

* Decay p_estcpu whenever a user process is scheduled as well as once
  per second, leading to (hopefully) better performance under load and
  better handling of adverse conditions (a nice +20 process running in the
  face of a nice -20 process).

* No longer assume that one second has elapsed in the one-second callback.
  Instead calculate the elapsed time on a per-process basis.  This should
  reduce instances of batch processes 'glitching' interactive processes.

* Remove the old round-robin code and instead just have the scheduler
  figure it out internally in the scheduler clock function.

* Revamp the scheduler algorithms, making everything #define constant
  driven.  Retain the NICE-based base-priority and decay algorithms but
  narrow the decay range from the process nice value.  Retain the child
  estcpu inheritance algorithm.

Feedback-provided-by: walt <wa1ter@myrealbox.com>
18 years ago- Introduce new -g option. This allows for the broadcast time to be reduced
Liam J. Foy [Mon, 27 Jun 2005 14:48:29 +0000 (14:48 +0000)]
- Introduce new -g option. This allows for the broadcast time to be reduced
below 3 minutes, but no higher due to a three minute downtime assumption.

- When polling, use .events (noted by Peter @ NetBSD)

Ok: Joerg
Discussed with: sjg

18 years agoRemove redundant verbosity. The description of the parent just costs space
Joerg Sonnenberger [Mon, 27 Jun 2005 12:24:46 +0000 (12:24 +0000)]
Remove redundant verbosity. The description of the parent just costs space
in the dmesg buffer, it doesn't add any value since it was printed before.

18 years agoRemove references to NBPFILTER. We unconditionally use bpf.
Simon Schubert [Mon, 27 Jun 2005 11:28:54 +0000 (11:28 +0000)]
Remove references to NBPFILTER. We unconditionally use bpf.
While being here, use opt_inet.h from the kernel build.

Requested-by: joerg
18 years agoIf compiling a module with the kernel, suck in opt_global.h.
Simon Schubert [Mon, 27 Jun 2005 11:03:43 +0000 (11:03 +0000)]
If compiling a module with the kernel, suck in opt_global.h.

18 years agoDon't unconditionally compile in ALTQ.
Simon Schubert [Mon, 27 Jun 2005 10:58:22 +0000 (10:58 +0000)]
Don't unconditionally compile in ALTQ.

Discovered-by: Andreas Hauser
18 years agoRemove PC98 support.
Sascha Wildner [Mon, 27 Jun 2005 02:27:10 +0000 (02:27 +0000)]
Remove PC98 support.

18 years agoChange spl*() to critical sections.
Sascha Wildner [Mon, 27 Jun 2005 01:49:59 +0000 (01:49 +0000)]
Change spl*() to critical sections.

18 years agoFix wrong list head which crept in with the last commit.
Sascha Wildner [Mon, 27 Jun 2005 01:43:15 +0000 (01:43 +0000)]
Fix wrong list head which crept in with the last commit.

18 years agoMove more scheduler-specific defines from various places into usched_bsd4.c
Matthew Dillon [Sun, 26 Jun 2005 22:03:29 +0000 (22:03 +0000)]
Move more scheduler-specific defines from various places into usched_bsd4.c
and revamp our scheduler algorithms.

* Get rid of the multiple layers of abstraction in the nice and frequency
  calculations.

* Increase the scheduling freqency from 20hz to 50hz.

* Greatly reduce the number of scheduling ticks that occur before a
  reschedule is issued.

* Fix a bug where the scheduler was not rescheduling when estcpu drops
  a process into a lower priority queue.

* Implement a new batch detection algorithm.  This algorithm gives
  forked children slightly more batchness then their parents (which
  is recovered quickly if the child is interactive), and propogates
  estcpu data from exiting children to future forked children (which
  handles fork/exec/wait loops such as used by make, scripts, etc).

* Change the way NICE priorities effect process execution.  The NICE
  value is used in two ways:  First, it determines the initial process
  priority.  The estcpu will have a tendancy to correct for this so the NICE
  value is also used to control estcpu's decay rate.

  This means that niced processes will have both an initial penalty for
  startup and stabilization, and an ongoing penalty if they become cpu
  bound.

Examples from cpu-bound loops:

CPU PRI  NI   PID %CPU      TIME COMMAND
 42 159 -20   706 20.5   0:38.88 /bin/csh /tmp/dowhile
 37 159 -15   704 17.6   0:35.09 /bin/csh /tmp/dowhile
 29 157 -10   702 15.3   0:30.41 /bin/csh /tmp/dowhile
 28 160  -5   700 13.0   0:26.73 /bin/csh /tmp/dowhile
 23 160   0   698 11.5   0:20.52 /bin/csh /tmp/dowhile
 18 160   5   696  9.2   0:16.85 /bin/csh /tmp/dowhile
 13 160  10   694  7.1   0:10.82 /bin/csh /tmp/dowhile
  3 160  20   692  1.5   0:02.14 /bin/csh /tmp/dowhile

18 years agoMove remaining scheduler-specific functions into the usched abstraction.
Matthew Dillon [Sun, 26 Jun 2005 04:36:35 +0000 (04:36 +0000)]
Move remaining scheduler-specific functions into the usched abstraction.

This also involves rearranging a number of fields in the proc structure,
changing the proc structure (actually making it a bit smaller due to better
packing).  A complete rebuild is required.

18 years agoCleanup indentation, no operational changes.
Matthew Dillon [Sat, 25 Jun 2005 21:18:42 +0000 (21:18 +0000)]
Cleanup indentation, no operational changes.

18 years agoAssociate a userland scheduler control structure with every process and
Matthew Dillon [Sat, 25 Jun 2005 20:03:34 +0000 (20:03 +0000)]
Associate a userland scheduler control structure with every process and
call userland scheduling functions through that structure.  Note that the
proc structure already had a field reserved for this purpose so it actually
doesn't change size.

The child of a fork() inherits the parent's userland scheduler control
structure pointer.

Move uio_yield() to a scheduler-independant file, and do some minor
cleanups of already #ifdef'd out code.

Repo-Rename usched_4bsd.c to usched_bsd4.c, so the file matches the function
prefixes I want to use.

Believe it or not, this should not represent any operational code changes
other then changing some previously direct function calls into indirect
calls through the new p_usched field in the process structure.

18 years agoRemove unused variables (from prior spl->critical section conversion)
Matthew Dillon [Sat, 25 Jun 2005 19:54:55 +0000 (19:54 +0000)]
Remove unused variables (from prior spl->critical section conversion)