dragonfly.git
18 years agoFix CPU stats percentages formatting
David Rhodus [Tue, 29 Jul 2003 23:15:36 +0000 (23:15 +0000)]
Fix CPU stats percentages formatting
so that they never coalesce.

18 years agoRemove KKASSERT(p)'s, 'p' (curproc) no longer exists in this functions.
Matthew Dillon [Tue, 29 Jul 2003 21:54:15 +0000 (21:54 +0000)]
Remove KKASSERT(p)'s, 'p' (curproc) no longer exists in this functions.

18 years agoFix for trap 12 on KVA space exhaustion.
David Rhodus [Tue, 29 Jul 2003 21:51:07 +0000 (21:51 +0000)]
Fix for trap 12 on KVA space exhaustion.

Possible panic where the available backing
pages for the KVA space are less than the
available memory.

18 years agoConsolidate MIN() usage across kern/ tree.
Hiten Pandya [Tue, 29 Jul 2003 21:30:02 +0000 (21:30 +0000)]
Consolidate MIN() usage across kern/ tree.

Submitted by: Craig Dooley <cd5697@albany.edu>

18 years agostyle(9) police:
Hiten Pandya [Tue, 29 Jul 2003 21:24:33 +0000 (21:24 +0000)]
style(9) police:

- use tab character with #define

18 years agoRemove INVARIANT_SUPPORT conditional pre-processing on zerror(). Just
Hiten Pandya [Tue, 29 Jul 2003 21:13:49 +0000 (21:13 +0000)]
Remove INVARIANT_SUPPORT conditional pre-processing on zerror().  Just
use INVARIANTS.

The latter creates unwanted problems when just adding the INVARIANTS
option to the kernel.

18 years agoNo need to comment out unused thread/proc declarations (prev. revision),
Hiten Pandya [Tue, 29 Jul 2003 20:31:03 +0000 (20:31 +0000)]
No need to comment out unused thread/proc declarations (prev. revision),
just remove them.

Suggested by: Matt

18 years agoComment out the unused proc/thread declarations.
Hiten Pandya [Tue, 29 Jul 2003 20:06:35 +0000 (20:06 +0000)]
Comment out the unused proc/thread declarations.

Submitted by: Craig Dooley <cd5697@albany.edu>

18 years agofileops messaging stage 1: add port and feature mask to struct fileops and
Matthew Dillon [Tue, 29 Jul 2003 20:03:08 +0000 (20:03 +0000)]
fileops messaging stage 1: add port and feature mask to struct fileops and
rename fo_ functions to fold.

18 years agoadd missing lwkt_msg to manually specified syscall args structure.
Matthew Dillon [Tue, 29 Jul 2003 19:39:03 +0000 (19:39 +0000)]
add missing lwkt_msg to manually specified syscall args structure.

18 years agoKernel Police:
Hiten Pandya [Tue, 29 Jul 2003 12:51:30 +0000 (12:51 +0000)]
Kernel Police:

- Fix Mbuf/Malloc flag misuse.
- Remove redundant memset() redifiniton (ng_l2tp.c)

18 years agoKernel Police:
Hiten Pandya [Tue, 29 Jul 2003 12:45:42 +0000 (12:45 +0000)]
Kernel Police:

- Fix Mbuf/Malloc flag misuse.

18 years agoNow we can add stat to the build
Robert Garrett [Tue, 29 Jul 2003 00:29:07 +0000 (00:29 +0000)]
Now we can add stat to the build

18 years agoThe code to print correct time in long format is not currently in
Robert Garrett [Tue, 29 Jul 2003 00:27:49 +0000 (00:27 +0000)]
The code to print correct time in long format is not currently in
stat, tell it not to use those variables until I can get it added.

18 years agoMake stat behave in the default case
Robert Garrett [Tue, 29 Jul 2003 00:22:37 +0000 (00:22 +0000)]
Make stat behave in the default case

18 years agoFix the msgsys(), semsys(), and shmsys() syscalls which were broken by the
Matthew Dillon [Mon, 28 Jul 2003 23:28:57 +0000 (23:28 +0000)]
Fix the msgsys(), semsys(), and shmsys() syscalls which were broken by the
messaging code.

18 years agoImport Stat.
Robert Garrett [Mon, 28 Jul 2003 20:47:10 +0000 (20:47 +0000)]
Import Stat.

This does not tie it into the build, as there are a few wrinkles that
need to be ironed first.

18 years agoRemove annoying calls to non existing sysctl's
Robert Garrett [Mon, 28 Jul 2003 19:30:53 +0000 (19:30 +0000)]
Remove annoying calls to non existing sysctl's

found by: A lot of people

18 years agoAssorted mdoc(7) fixes:
Hiten Pandya [Mon, 28 Jul 2003 07:27:38 +0000 (07:27 +0000)]
Assorted mdoc(7) fixes:

- nuke the vnode struct out of this file.
- use .Va/.Vt instead of .Dv where appropriate
- use 'manual page' instead of 'man page'

At a later date, it might be good idea to describe
the various vnode struct members in this manual page.

18 years agoBring us in sync with 4.8-STABLE.
Hiten Pandya [Mon, 28 Jul 2003 06:37:19 +0000 (06:37 +0000)]
Bring us in sync with 4.8-STABLE.

Submitted by: Jeroen Ruigrok van der Werven <asmodai@wxs.nl>

18 years agoFix mergemaster so it doesnt depend on stat
Robert Garrett [Mon, 28 Jul 2003 06:28:23 +0000 (06:28 +0000)]
Fix mergemaster so it doesnt depend on stat
and teach it about $DragonFly$

Thanks to Steve Mynott for catching the $DragonFly$
bit.

18 years agoUse relative directory, rather than /sys, as base directory for "make tags".
Jeffrey Hsu [Mon, 28 Jul 2003 05:59:10 +0000 (05:59 +0000)]
Use relative directory, rather than /sys, as base directory for "make tags".
Remove obsolete directories.

18 years agoUpdate a case where changing the uname to DragonFly would break RCng
Robert Garrett [Mon, 28 Jul 2003 05:53:20 +0000 (05:53 +0000)]
Update a case where changing the uname to DragonFly would break RCng

18 years agoBring the malloc/mbuf flags up-to-date with FreeBSD.
Hiten Pandya [Mon, 28 Jul 2003 05:03:25 +0000 (05:03 +0000)]
Bring the malloc/mbuf flags up-to-date with FreeBSD.

18 years agoDDB updates:
Hiten Pandya [Mon, 28 Jul 2003 04:56:35 +0000 (04:56 +0000)]
DDB updates:

- add 'where' as an alias to 'trace'
- add db_print_backtrace() and backtrace() (machine-dependant)
- add 'reset' command

18 years agoFix building of vm_zone.c in the case of INVARIANTS.
Hiten Pandya [Mon, 28 Jul 2003 04:41:37 +0000 (04:41 +0000)]
Fix building of vm_zone.c in the case of INVARIANTS.

18 years agoMerge from FreeBSD:
Hiten Pandya [Mon, 28 Jul 2003 04:29:12 +0000 (04:29 +0000)]
Merge from FreeBSD:

- ppsratecheck() - packets/events per second limitation
- ratecheck - time based rate-limiting

18 years agoOops, fix build before anyone realises. :-)
Hiten Pandya [Mon, 28 Jul 2003 00:02:44 +0000 (00:02 +0000)]
Oops, fix build before anyone realises. :-)

18 years agomdoc(7) assorted fixes:
Hiten Pandya [Sun, 27 Jul 2003 05:36:06 +0000 (05:36 +0000)]
mdoc(7) assorted fixes:

- Nuke usage of .Ar from Section 9.  The `.Ar' macro
  should only be used for userland manual pages.

- Replace usage of `.Ar' with `.Va' or `.Vt' as necessary.

18 years agomdoc(7) assorted fixes:
Hiten Pandya [Sun, 27 Jul 2003 05:33:24 +0000 (05:33 +0000)]
mdoc(7) assorted fixes:

- fix an .Xr instance

18 years agoNull terminate the new argv[] array when converting 'tar zcf' to
David Rhodus [Sun, 27 Jul 2003 03:20:17 +0000 (03:20 +0000)]
Null terminate the new argv[] array when converting 'tar zcf' to
'tar -z -c -f'

18 years agoConsolidate usage of MIN/MAX().
Hiten Pandya [Sun, 27 Jul 2003 01:49:53 +0000 (01:49 +0000)]
Consolidate usage of MIN/MAX().

Instead, just remove the conditional processing in sys/param.h so
it's available to all files.

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 22:10:03 +0000 (22:10 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 22:04:27 +0000 (22:04 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 21:56:10 +0000 (21:56 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 21:48:49 +0000 (21:48 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 21:13:15 +0000 (21:13 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 21:00:04 +0000 (21:00 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoAdd a handy macro, called FOREACH_PROC_IN_SYSTEM(p) for better
Hiten Pandya [Sat, 26 Jul 2003 20:58:09 +0000 (20:58 +0000)]
Add a handy macro, called FOREACH_PROC_IN_SYSTEM(p) for better
clarity in code and reduce duplication, followup commits will
make use of this macro.

While I am there, change an 'of' to 'if' in a comment for
clarity.

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 20:40:10 +0000 (20:40 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 20:36:58 +0000 (20:36 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 20:19:34 +0000 (20:19 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 20:08:38 +0000 (20:08 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 19:42:11 +0000 (19:42 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 19:27:41 +0000 (19:27 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 19:20:33 +0000 (19:20 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 19:07:50 +0000 (19:07 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 18:53:21 +0000 (18:53 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agosyscall messaging 2: Change the standard return value storage for system
Matthew Dillon [Sat, 26 Jul 2003 18:12:47 +0000 (18:12 +0000)]
syscall messaging 2: Change the standard return value storage for system
calls from proc->p_retval[] to the message structure embedded in the syscall.
System calls used to set their non-error return value in p_retval[] but
must now set it in the message structure.  This is a necessary precursor to
any sort of asynchronizatino, for obvious reasons.

This work was particularly annoying because all the emualtion code declares
and manually fills in syscall argument structures.

This commit could potentially destabilize some of the emulation code but I
went through the most important Linux emulation code three times and tested it
with linux-mozilla, so I am fairly confident that I got it right.

Note: proper linux emulation requires setting the fallback elf brand to 3 or
it will default to SVR4.  It really ought to default to linux (3), not SVR4.

    sysctl -w kern.fallback_elf_brand=3

18 years agoFix minor bug in last commit, add the required register keyword back in
Matthew Dillon [Sat, 26 Jul 2003 18:09:03 +0000 (18:09 +0000)]
Fix minor bug in last commit, add the required register keyword back in
for a (very rare) __asm register override declaration.

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 14:25:27 +0000 (14:25 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoRegister keyword removal
Robert Garrett [Sat, 26 Jul 2003 14:18:51 +0000 (14:18 +0000)]
Register keyword removal

Approved by: Matt Dillon

18 years agoregister keyword removal
Robert Garrett [Sat, 26 Jul 2003 14:12:24 +0000 (14:12 +0000)]
register keyword removal

Approved by:Matt Dillon

18 years agoMore register axe work (remove the register keyword)
Robert Garrett [Sat, 26 Jul 2003 14:07:18 +0000 (14:07 +0000)]
More register axe work (remove the register keyword)

Approved By: Matt Dillon

18 years agoregister keyword removal
Robert Garrett [Sat, 26 Jul 2003 13:59:53 +0000 (13:59 +0000)]
register keyword removal

APPROVED BY: Matt Dillon

18 years agoBegin register keyword removal commits
Robert Garrett [Sat, 26 Jul 2003 13:40:57 +0000 (13:40 +0000)]
Begin register keyword removal commits

Aproved by: Matt Dillon

18 years agoFix __asm syntax error from previous commit.
Matthew Dillon [Sat, 26 Jul 2003 01:04:08 +0000 (01:04 +0000)]
Fix __asm syntax error from previous commit.

18 years agoPerformance cleanup. Greatly reduce the number of %fs prefixed globaldata
Matthew Dillon [Fri, 25 Jul 2003 05:51:19 +0000 (05:51 +0000)]
Performance cleanup.  Greatly reduce the number of %fs prefixed globaldata
lookups by taking advantage of the fact that DragonFly does not preemptively
switch threads to other cpus to cache the globaldata pointer, to pass the
current thread to certain inlines rather then force them to reload it from
%fs, and to use td->td_gd to access the globaldata pointer when td is
available rather then mycpu.

This coupled with the curthread optimization done in a prior commit improved
syscall overheads by 60-100ns (about 7%).

18 years agoRemove thread->td_cpu. thread->td_gd (which points to the globaldata
Matthew Dillon [Fri, 25 Jul 2003 05:28:54 +0000 (05:28 +0000)]
Remove thread->td_cpu.  thread->td_gd (which points to the globaldata
structure) is sufficient.  Add e_cpuid to eproc to compensate.

18 years agoFix a minor bug in lwkt_init_thread() (the thread was being added to the
Matthew Dillon [Fri, 25 Jul 2003 05:26:52 +0000 (05:26 +0000)]
Fix a minor bug in lwkt_init_thread() (the thread was being added to the
wrong td_allq).

Remove thread->td_cpu.  thread->td_gd (which points to the globaldata
structure) is sufficient.  Add e_cpuid to eproc to compensate.

18 years agoOops, need to update truss's conf files re: new syscall support header
Matthew Dillon [Fri, 25 Jul 2003 03:43:15 +0000 (03:43 +0000)]
Oops, need to update truss's conf files re: new syscall support header
file.

Report-by: David Rhodus <drhodus@catpa.com>
18 years agoRegenerate all system calls
Matthew Dillon [Thu, 24 Jul 2003 23:55:10 +0000 (23:55 +0000)]
Regenerate all system calls

18 years agoSyscall messaging work 2: Continue with the implementation of sendsys(),
Matthew Dillon [Thu, 24 Jul 2003 23:52:39 +0000 (23:52 +0000)]
Syscall messaging work 2: Continue with the implementation of sendsys(),
using int 0x81.  This entry point will be responsible for sending system
call messages or waiting for messages / port activity.

With this commit system call messages can be run through 0x81 but at the
moment they will always run synchronously. Here's the core interface
code for IA32:

    static __inline int
    sendsys(void *port, void *msg, int msgsize)
    {
int error;
__asm __volatile("int $0x81" : "=a"(error) :
"a"(port), "c"(msg), "d"(msgsize) : "memory");
return(error);
    }

Performance verses a direct system call is currently excellent considering
that this is my initial attempt.

600MHzC3 1.2GHzP3x2(SMP)

getuid() 1300 ns  909 ns
getuid_msg() 1700 ns 1077 ns

18 years agoAdd support for RFC 3390, which allows for a variable-sized
Jeffrey Hsu [Thu, 24 Jul 2003 23:33:33 +0000 (23:33 +0000)]
Add support for RFC 3390, which allows for a variable-sized
initial congestion window.

This decreases the number of round-trip delays required for
short HTTP transfers which never make it out of slow-start.

18 years agolibcr copy: Retarget build paths from ../libc to ../libcr and retarget
Matthew Dillon [Thu, 24 Jul 2003 21:41:57 +0000 (21:41 +0000)]
libcr copy: Retarget build paths from ../libc to ../libcr and retarget
the library name from libc to libcr.

18 years agoFix NULL td crash in net/if.c when detaching a net interface.
Matthew Dillon [Thu, 24 Jul 2003 20:46:47 +0000 (20:46 +0000)]
Fix NULL td crash in net/if.c when detaching a net interface.

Report-by: Joerg Sonnenberger <joerg@britannica.bec.de>
18 years agoHave MFS register a device as a VCHR instead of VBLK, fixing a panic.
Matthew Dillon [Thu, 24 Jul 2003 20:43:18 +0000 (20:43 +0000)]
Have MFS register a device as a VCHR instead of VBLK, fixing a panic.

Report-by: Joerg Sonnenberger <joerg@britannica.bec.de>
18 years agoFix some stub prototypes (some missed proc->thread conversions).
Matthew Dillon [Thu, 24 Jul 2003 20:42:33 +0000 (20:42 +0000)]
Fix some stub prototypes (some missed proc->thread conversions).

Report-by: Joerg Sonnenberger <joerg@britannica.bec.de>
18 years agoBring RCNG in from 5.x and adjust config files and scripts accordingly.
Matthew Dillon [Thu, 24 Jul 2003 06:35:39 +0000 (06:35 +0000)]
Bring RCNG in from 5.x and adjust config files and scripts accordingly.
Bring in the 5.x mergemaster.
Bring in the 5.x rcorder.
Adjust Makefile's and mtree to deal with /etc/rc.d

Submitted-by: ROBERT GARRETT <rg70@sbcglobal.net>
Additional-work-by: dillon
18 years agoPreliminary syscall messaging work. Adjust all <syscall>_args structures
Matthew Dillon [Thu, 24 Jul 2003 01:41:27 +0000 (01:41 +0000)]
Preliminary syscall messaging work.  Adjust all <syscall>_args structures
to include an lwkt_msg at their base which will eventually allow syscalls
to run asynch.  Note that this is for the kernel copy of the arguments, the
userland argument format has not changed for the standard syscall entry
point.

Begin abstracting a messaging syscall interface (#if 0'd out at the moment).

Change the syscall2 entry point to take the new expanded argument structure
into account.  Change sysent argument calculation (AS macro) to take the
new expanded argument structure into account.

Note: existing linux, svr4, and ibcs2 emulation may break with this commit,
though it is not intentional.

18 years agoAdd all_sysent target to /usr/src/sys/Makefile to rebuild syscalls.
Matthew Dillon [Thu, 24 Jul 2003 01:36:22 +0000 (01:36 +0000)]
Add all_sysent target to /usr/src/sys/Makefile to rebuild syscalls.

18 years agoHere is an implementation of Limited Transmit (RFC 3042) for DragonFlyBSD.
Matthew Dillon [Thu, 24 Jul 2003 01:31:07 +0000 (01:31 +0000)]
Here is an implementation of Limited Transmit (RFC 3042) for DragonFlyBSD.
This reduces the high latency problems that NewReno often exhibits in the face
of packet loss.

Submitted-by: Jeffrey Hsu <hsu@FreeBSD.org>
18 years ago2003-07-22 Hiten Pandya <hmp@nxad.com>
Matthew Dillon [Wed, 23 Jul 2003 07:14:19 +0000 (07:14 +0000)]
2003-07-22 Hiten Pandya <hmp@nxad.com>

        * MFC FreeBSD rev. 1.189 of kern_exit.c (DONE)
          (shmexit to take vmspace instead of proc)
          (sort the sys/lock.h include in vm_map.c too)

        * MFC FreeBSD rev. 1.143 of kern_sysctl.c (DONE)
          (don't panic if sysctl is unregistrable)

        * Don't panic when enumerating SYSCTL_NODE()
          without children nodes. (DONE)

        * MFC FreeBSD rev. 1.113 of kern_sysctl.c (DONE)
          (Fix ogetkerninfo() handling  for KINFO_BSD_SYSINFO)

        * MFC FreeBSD rev. 1.103 of kern_sysctl.c (DONE)
          (Never reuse AUTO_OID values)

        * MFC FreeBSD rev 1.21 of i386/include/bus_dma.h
          (BUS_DMAMEM_NOSYNC -> BUS_DMA_COHERENT)

        * MFC FreeBSD rev. 1.19 of i386/include/bus_dma.h (DONE)
          (Implement real read/write barriers for i386)

Submitted by: Hiten Pandya <hmp@FreeBSD.ORG>

18 years agoMerge from FreeBSD 2003/07/15 15:49:53 PDT commit to sys/netinet.
Matthew Dillon [Wed, 23 Jul 2003 06:21:01 +0000 (06:21 +0000)]
Merge from FreeBSD 2003/07/15 15:49:53 PDT commit to sys/netinet.
Unify the "send high" and "recover" variables as specified in the
lastest rev of the spec.  Use an explicit flag for Fast Recovery. [1]

Fix bug with exiting Fast Recovery on a retransmit timeout
diagnosed by Lu Guohan. [2]

Original Commit by: Jeffrey Hsu <hsu@FreeBSD.org>

18 years agoLINT cleanup, add a static function back in which I thought wasn't used.
Matthew Dillon [Wed, 23 Jul 2003 06:02:38 +0000 (06:02 +0000)]
LINT cleanup, add a static function back in which I thought wasn't used.

18 years agoLINT pass. Cleanup missed proc->thread conversions and get rid of warnings.
Matthew Dillon [Wed, 23 Jul 2003 02:30:24 +0000 (02:30 +0000)]
LINT pass.  Cleanup missed proc->thread conversions and get rid of warnings.

18 years agoRemove two unnecessary volatile qualifications.
Matthew Dillon [Tue, 22 Jul 2003 22:10:51 +0000 (22:10 +0000)]
Remove two unnecessary volatile qualifications.

18 years agoDEV messaging stage 2/4: In this stage all DEV commands are now being
Matthew Dillon [Tue, 22 Jul 2003 17:03:35 +0000 (17:03 +0000)]
DEV messaging stage 2/4: In this stage all DEV commands are now being
funneled through the message port for action by the port's beginmsg function.
CONSOLE and DISK device shims replace the port with their own and then
forward to the original.  FB (Frame Buffer) shims supposedly do the same
thing but I haven't been able to test it.   I don't expect instability
in mainline code but there might be easy-to-fix, and some drivers still need
to be converted.  See primarily: kern/kern_device.c (new dev_*() functions and
inherits cdevsw code from kern/kern_conf.c), sys/device.h, and kern/subr_disk.c
for the high points.

In this stage all DEV messages are still acted upon synchronously in the
context of the caller.  We cannot create a separate handler thread until
the copyin's (primarily in ioctl functions) are made thread-aware.

Note that the messaging shims are going to look rather messy in these early
days but as more subsystems are converted over we will begin to use
pre-initialized messages and message forwarding to avoid having to constantly
rebuild messages prior to use.

Note that DEV itself is a mess oweing to its 4.x roots and will be cleaned
up in subsequent passes.  e.g. the way sub-devices inherit the main device's
cdevsw was always a bad hack and it still is, and several functions
(mmap, kqfilter, psize, poll) return results rather then error codes, which
will be fixed since now we have a message to store the result in :-)

18 years agoThrow better sanity checks into vfs_hang_addrlist() for argp->ex_addrlen
Matthew Dillon [Tue, 22 Jul 2003 05:04:41 +0000 (05:04 +0000)]
Throw better sanity checks into vfs_hang_addrlist() for argp->ex_addrlen
and argp->ex_masklen which are otherwise totally unchecked from userland.

18 years agoLINT build test. Aggregated source code adjustments to bring most of the
Matthew Dillon [Mon, 21 Jul 2003 07:57:52 +0000 (07:57 +0000)]
LINT build test.  Aggregated source code adjustments to bring most of the
rest of the kernel source up to date, using the LINT build.

18 years agoDEV messaging stage 1/4: Rearrange struct cdevsw and add a message port
Matthew Dillon [Mon, 21 Jul 2003 07:06:45 +0000 (07:06 +0000)]
DEV messaging stage 1/4: Rearrange struct cdevsw and add a message port
and auto-queueing mask.  The mask will tell us which message functions
can be safely queued to another thread and which still need to run in the
context of the caller.   Primary configuration fields (name, cmaj, flags,
port, autoq mask) are now at the head of the structure.  Function vectors,
which may eventually go away, are at the end.  The port and autoq fields
are non-functional in this stage.

The old BDEV device major number support has also been removed from cdevsw,
and code has been added to translate the bootdev passed from the boot code
(the boot code has always passed the now defunct block device major numbers
and we obviously need to keep that compatibility intact).

18 years agoDEV messaging stage 1/4: Rearrange struct cdevsw and add a message port
Matthew Dillon [Mon, 21 Jul 2003 05:50:47 +0000 (05:50 +0000)]
DEV messaging stage 1/4: Rearrange struct cdevsw and add a message port
and auto-queueing mask.  The mask will tell us which message functions
can be safely queued to another thread and which still need to run in the
context of the caller.   Primary configuration fields (name, cmaj, flags,
port, autoq mask) are now at the head of the structure.  Function vectors,
which may eventually go away, are at the end.  The port and autoq fields
are non-functional in this stage.

The old BDEV device major number support has also been removed from cdevsw,
and code has been added to translate the bootdev passed from the boot code
(the boot code has always passed the now defunct block device major numbers
and we obviously need to keep that compatibility intact).

18 years agoFix a minor compile-time errors when INVARIANTS is not defined.
Matthew Dillon [Sun, 20 Jul 2003 07:46:19 +0000 (07:46 +0000)]
Fix a minor compile-time errors when INVARIANTS is not defined.

18 years agoMinor cleanups so GENERIC compiles. Fix underscores in assembly and an
Matthew Dillon [Sun, 20 Jul 2003 07:29:20 +0000 (07:29 +0000)]
Minor cleanups so GENERIC compiles.  Fix underscores in assembly and an
include file in if_fe.c

Report-by: Steve Mynott <steve@tighrope.demon.co.uk>
18 years agodoreti was improperly clearing the entire gd_reqflags field when, in
Matthew Dillon [Sun, 20 Jul 2003 07:14:27 +0000 (07:14 +0000)]
doreti was improperly clearing the entire gd_reqflags field when, in
fact, it was only supposed to clear RQF_INTPEND.  This resulted in
reschedules not being left flagged for userret.

18 years agoProfiling cleanup 1/2: fix crashes (all registers need to be left intact
Matthew Dillon [Sun, 20 Jul 2003 04:20:32 +0000 (04:20 +0000)]
Profiling cleanup 1/2: fix crashes (all registers need to be left intact
from assembly), and fix a few syntax issues, etc.   It isn't ticking away
properly yet but at least it isn't crashing.

Submitted-by: Kip Macy <kmacy@fsmware.com>
Additional-work: dillon

18 years agoAdd externs for *_nonlocked atomic extensions to avoid warning.
Matthew Dillon [Sun, 20 Jul 2003 03:55:25 +0000 (03:55 +0000)]
Add externs for *_nonlocked atomic extensions to avoid warning.

18 years agoThis is the initial implmentation of the LWKT messaging infrastructure.
Matthew Dillon [Sun, 20 Jul 2003 01:37:22 +0000 (01:37 +0000)]
This is the initial implmentation of the LWKT messaging infrastructure.
Messages are sent to message ports and typically replied to a message port
embedded in the originating thread's thread structure (td_msgport).
The port functions match up and optimization client sync/asynch requests
verses target synch/asynch responses.

In this initial implementation a port must be owned by a particular thread,
and we use *asynch* IPI messaging to forward queueing and dequeueing operations
to the correct cpu.  Most of the IPI overhead will be absorbed by the fact
that these same IPIs also tend to schedule the threads in question, which on
the correct cpu (which is the one it will be on) costs nothing.

Message ports have in-context dispatch functions for initiating, aborting,
and replying to a message which can be overriden and will queue by default.

This code compiles but is as yet unreferenced, and almost certainly needs more
work.

18 years agozfreei->zfree (there is no zfreei anymore)
Matthew Dillon [Sun, 20 Jul 2003 00:41:28 +0000 (00:41 +0000)]
zfreei->zfree (there is no zfreei anymore)

Report-by: Kip Macy <kmacy@fsmware.com>
18 years agoRemove references to the no longer existant PZERO.
Matthew Dillon [Sat, 19 Jul 2003 22:21:21 +0000 (22:21 +0000)]
Remove references to the no longer existant PZERO.

18 years agoNuke huge mbuf macros stage 2/2: Cleanup the MCL*() cluster inlines by
Matthew Dillon [Sat, 19 Jul 2003 21:53:06 +0000 (21:53 +0000)]
Nuke huge mbuf macros stage 2/2: Cleanup the MCL*() cluster inlines by
moving them into procedures, similar to 1/2.

Suggested-by: Bosko Milekic <bmilekic@technokratis.com>
18 years agoRemove the priority part of the priority|flags argument to tsleep(). Only
Matthew Dillon [Sat, 19 Jul 2003 21:14:53 +0000 (21:14 +0000)]
Remove the priority part of the priority|flags argument to tsleep().  Only
flags are passed now.  The priority was a user scheduler thingy that is not
used by the LWKT subsystem.  For process statistics assume sleeps without
P_SINTR set to be disk-waits, and sleeps with it set to be normal sleeps.

This commit should not contain any operational changes.

18 years agoNuke huge mbuf macros stage 1/2: Remove massive inline mbuf macros to reduce
Matthew Dillon [Sat, 19 Jul 2003 21:09:27 +0000 (21:09 +0000)]
Nuke huge mbuf macros stage 1/2: Remove massive inline mbuf macros to reduce
L1/L2 cache pollution.  Est. performance improvement of 4-6% and the kernel
is 42KB smaller.

Submitted-by: Bosko Milekic <bmilekic@technokratis.com>
18 years agoRemove an unnecessary cli that was causing 'trap 12 with interrupts disabled'
Matthew Dillon [Sat, 19 Jul 2003 17:00:33 +0000 (17:00 +0000)]
Remove an unnecessary cli that was causing 'trap 12 with interrupts disabled'
warnings from start_init() (harmless, but annoying).

18 years agoMake the kernel load properly recognize ABS symbols (.SET assembly
Matthew Dillon [Fri, 18 Jul 2003 05:12:41 +0000 (05:12 +0000)]
Make the kernel load properly recognize ABS symbols (.SET assembly
instruction) whos value is 0.  It was improperly assuming that symbols with
a 0 value could not be found, and also confusing ABS symbols with COMMON
symbols.

18 years agoGDB changes required for gdb -k kernel /dev/mem. Still selected by
Matthew Dillon [Sun, 13 Jul 2003 07:13:51 +0000 (07:13 +0000)]
GDB changes required for gdb -k kernel /dev/mem.  Still selected by
process, not thread.  A "thread" command still needs to be added.

18 years agoThe comment was wrong, ptmmap *is* used, put it back in (fix crash
Matthew Dillon [Sun, 13 Jul 2003 07:10:06 +0000 (07:10 +0000)]
The comment was wrong, ptmmap *is* used, put it back in (fix crash
accessing /dev/mem)

18 years agoFix minor compile warning.
Matthew Dillon [Sun, 13 Jul 2003 05:51:17 +0000 (05:51 +0000)]
Fix minor compile warning.

18 years agoFix minor buildworld issues, mainly #include file dependancies and fields
Matthew Dillon [Sun, 13 Jul 2003 05:45:17 +0000 (05:45 +0000)]
Fix minor buildworld issues, mainly #include file dependancies and fields
that have moved from struct proc to struct thread.

18 years agoAdd missing required '*' in indirect jmp (fix assembler warning).
Matthew Dillon [Sun, 13 Jul 2003 05:43:31 +0000 (05:43 +0000)]
Add missing required '*' in indirect jmp (fix assembler warning).