Commit Graph

29 Commits

Author SHA1 Message Date
Julian Elischer
b40ce4165d KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
Peter Wemm
e664fdb13c The kernel *does* now define setjmp/longjmp. Dont duplicate it here.
In file included from ../../../dev/vinum/vinumhdr.h:77,
                 from ../../../dev/vinum/vinum.c:44:
../../../dev/vinum/vinumext.h:165: warning: redundant redeclaration of `setjmp' in same scope
../../../sys/systm.h:96: warning: previous declaration of `setjmp'
../../../dev/vinum/vinummemory.c:44: warning: redundant redeclaration of `longjmp' in same scope
../../../sys/systm.h:97: warning: previous declaration of `longjmp'
2001-07-27 00:44:36 +00:00
Greg Lehey
7b4bf18baa Change #if VINUMDEBUG to #ifdef VINUMDEBUG. This is a flag, not a variable. 2001-05-23 23:24:05 +00:00
Greg Lehey
24ad5cd24b Cosmetics: wrap long lines to be < 80 characters. 2001-05-22 02:35:19 +00:00
Jake Burkholder
a448b62ac9 Make intr_nesting_level per-process, rather than per-cpu. Setup
interrupt threads to run with it always >= 1, so that malloc can
detect M_WAITOK from "interrupt" context.  This is also necessary
in order to context switch from sched_ithd() directly.

Reviewed By:	peter
2001-01-21 19:25:07 +00:00
Jake Burkholder
ef73ae4b0c Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variables
other then curproc.
2001-01-10 04:43:51 +00:00
Greg Lehey
bf7dfe61ab expand_table: Avoid a race condition which may have been contributing
to the random corruption, panics and hangs we've been seeing in RAID-5
plexes, particularly with ata drives.

Eagerly-awaited-by: sos
2000-05-04 07:38:47 +00:00
Greg Lehey
e08bedf9bf Malloc: Save the caller's file name in the correct entry. 2000-02-29 06:13:24 +00:00
Greg Lehey
5b58d7c1a2 Include basename() function even if the system isn't i386.
Correct printf format for pointers to avoid compilation warnings on
alpha.

Submitted-by:	      Bernd Walter <ticso@cicely.de>
2000-01-05 06:08:23 +00:00
Greg Lehey
2e5213425e MMalloc: don't supply M_WAITOK when mallocing from an interrupt
context.  Be prepared to fail instead.

MMalloc, FFree: ensure that saved file names are properly terminated.
Use MCFILENAMELEN instead of the previous explicit constant.
1999-10-13 03:18:53 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Greg Lehey
9d622f47e1 Make Vinum compile correctly without VINUMDEBUG
Tripped-over-by:	Thomas Stromberg <tstromberg@rtci.com>
1999-05-08 02:50:44 +00:00
Greg Lehey
560863926b Remove old grunge, including references to sys/disk.h (which is going
away).

Submitted-by:	phk
1999-05-07 01:35:29 +00:00
Greg Lehey
3041dc10ba vinum_mallocinfo:
Set the entry number correctly.
1999-05-02 07:50:38 +00:00
Greg Lehey
ff17305f57 When VINUMDEBUG is set, add function basename() to return the base
name of a file.  Used by MMalloc and lockdrive.
1999-04-10 08:11:44 +00:00
Greg Lehey
4a10e91653 Modify parameter checking in LongJmp to match the reality of an
enlarged kernel memory space.

Paniced-over-by:  Karl Pielorz <kpielorz@tdx.co.uk>
		  Michael Reifenberger <root@nihil.plaut.de>
1999-04-09 01:17:50 +00:00
Greg Lehey
96c60597a8 Destaticize some variables to allow checking on them when exiting. 1999-03-31 08:43:12 +00:00
Greg Lehey
1238689209 Add function LongJmp which checks the parameters before calling
longjmp.  I suspect that the occasional double panic may be the result
of incorrect parameters to longjmp.  This happens, of course, like the
entire file, only with -DVINUMDEBUG.
1999-03-28 08:54:03 +00:00
Greg Lehey
82ca4fa74c Use microtime, not getmicrotime, to note the times in the malloc and
free histories.
1999-03-19 07:14:18 +00:00
Greg Lehey
6f70e1c542 Modify to compile with egcs.
Prodded-by: obrien
1999-03-18 23:26:22 +00:00
Greg Lehey
cadf346d84 Remove antique crud.
MMalloc: save the time at which the request was granted, remove more
crud.

FFree: add a circular buffer of the last 64 Free requests if
DEBUG_MEMFREE is set.
1999-03-13 07:37:44 +00:00
Greg Lehey
39ce6e429e Change printf() calls to log() calls.
expand_table: Zero out newly allocated tables
1999-03-02 06:55:44 +00:00
Greg Lehey
7f1050341c Change multiline comments to start with a lone /* and end with a */,
apparently in accordance with style(9).

Complained-about-by: bde
1999-01-29 01:17:54 +00:00
Greg Lehey
cb4547a333 MMalloc: remove directory part of name correctly 1999-01-21 00:37:56 +00:00
Peter Wemm
c285ca1254 Some relatively minor tweaks to enable vinum to be built into a static
kernel as a pseudo-device.  The changes were:
- #ifdef DEBUG -> #ifdef VINUMDEBUG
- opt_vinum.h for holding above config variable
- Fixing up a few stray problems where DEBUG wasn't optional.
- config.c -> vinumconfig.c (there's already a config.o)
- Other *.c -> vinum*.c (wasn't strictly necessary, but done in case we end
  up with something else conflicting later on and we might have to have yet
  more repository copies of files).
- include file paths fixups..  (ie: get them all from the kernel tree
  instead of partly from the kernel and partly from /usr/include/machine)

I've spoken with Greg about this..  I hope this doesn't mess him around
too much..
1998-12-28 16:28:24 +00:00
Peter Wemm
ef2dbe9885 If I've done this right, revive the vinum code in it's now home after it
was savaged in the blood bath a few hours ago.
1998-12-28 04:56:24 +00:00
Søren Schmidt
c74cd3590f Remove LKM's depricated by modules. 1998-12-27 19:38:15 +00:00
Greg Lehey
721fbc5ae0 config.c:
config_drive:
    Catch an instance of anonymous drives.  Doubtless many remain.

interrupt.c:
  complete_rqe:
    Call logrq to log iodone events if DEBUG_LASTREQS is set.

    Call set_sd_state with setstate_noupdate to avoid buffered I/O out
    of interrupt context.

    Use define DEBUG_RESID instead of constant.

memory.c:
  Remove dead expandrq() function

  Malloc:
    Remove directory component of file names in malloc table.

  Add function vinum_rqinfo (part of the request tracing stuff).

request.c:
  Add function logrq (part of the request tracing stuff).

  vinumstrategy:
    Check whether config needs to be written to disk, do it if so.
    This is a stopgap until the Vinum daemon (bacchusd?  oenologistd?)
    is written.

    If DEBUG_LASTREQS is set, call logrq to log user buffer headers.

  launch_requests:
    Correct format of debug output to console.

    If DEBUG_LASTREQS is set, call logrq to log request elements.

request.h:
  Add definitions for request trace.

state.c:
  set_sd_state:
    Check flags for setstate_noupdate.  If set, don't write the config
    to disk, just set global VF_DIRTYCONFIG flag.  This is part of the
    kludge to avoid writing config from an interrupt context.

vinumext.h:
    Add declaration for vinum_rqinfo, put inside #ifdef DEBUG
    Remove dead macro expandrq

vinumio.h:
  Increase maximum ioctl reply length to 4 kB if DEBUG is set.
  Define VINUM_RQINFO ioctl if DEBUG is set.

vinumioctl.c:
  vinumioctl:
    Change implementation of VINUM_DEBUG ioctl: use a debug flag
    (DEBUG_REMOTEGDB) to decide whether to go into remote debugging or
    not.

    Implement VINUM_RQINFO.

vinumkw.h:
  Define kw_info even when not debugging.

vinumvar.h:
  Define VF_DIRTYCONFIG
  Add pointers to request info to vinum_info if DEBUG is set.
  Define setstate_noupdate
  Define additional debug bits DEBUG_RESID, DEBUG_LASTREQS and
  DEBUG_REMOTEGDB.
1998-10-21 08:32:32 +00:00
Greg Lehey
e4381fa521 Import base vinum lkm sources 1998-09-16 05:56:21 +00:00