Commit Graph

36258 Commits

Author SHA1 Message Date
John Birrell
58a7cc5d1b [ The author's description... ]
o Runnable threads are now maintained in priority queues.  The
    implementation requires two things:

      1.) The priority queues must be protected during insertion
          and removal of threads.  Since the kernel scheduler
          must modify the priority queues, a spinlock for
          protection cannot be used.   The functions
          _thread_kern_sched_defer() and _thread_kern_sched_undefer()
          were added to {un}defer kernel scheduler activation.

      2.) A thread (active) priority change can be performed only
          when the thread is removed from the priority queue.  The
          implementation uses a threads active priority when
          inserting it into the queue.

    A by-product is that thread switches are much faster.  A
    separate queue is used for waiting and/or blocked threads,
    and it is searched at most 2 times in the kernel scheduler
    when there are active threads.  It should be possible to
    reduce this to once by combining polling of threads waiting
    on I/O with the loop that looks for timed out threads and
    the minimum timeout value.

  o Functions to defer kernel scheduler activation were added.  These
    are _thread_kern_sched_defer() and _thread_kern_sched_undefer()
    and may be called recursively.  These routines do not block the
    scheduling signal, but latch its occurrence.  The signal handler
    will not call the kernel scheduler when the running thread has
    deferred scheduling, but it will be called when running thread
    undefers scheduling.

  o Added support for _POSIX_THREAD_PRIORITY_SCHEDULING.  All the
    POSIX routines required by this should now be implemented.
    One note, SCHED_OTHER, SCHED_FIFO, and SCHED_RR are required
    to be defined by including pthread.h.  These defines are currently
    in sched.h.  I modified pthread.h to include sched.h but don't
    know if this is the proper thing to do.

  o Added support for priority protection and inheritence mutexes.
    This allows definition of _POSIX_THREAD_PRIO_PROTECT and
    _POSIX_THREAD_PRIO_INHERIT.

  o Added additional error checks required by POSIX for mutexes and
    condition variables.

  o Provided a wrapper for sigpending which is marked as a hidden
    syscall.

  o Added a non-portable function as a debugging aid to allow an
    application to monitor thread context switches.  An application
    can install a routine that gets called everytime a thread
    (explicitly created by the application) gets context switched.
    The routine gets passed the pthread IDs of the threads that are
    being switched in and out.

Submitted by: Dan Eischen <eischen@vigrid.com>

Changes by me:

  o Added a PS_SPINBLOCK state to deal with the priority inversion
    problem most often (I think) seen by threads calling malloc/free/realloc.

  o Dispatch signals to the running thread directly rather than at a
    context switch to avoid the situation where the switch never occurs.
1999-03-23 05:07:56 +00:00
Joseph Koshy
f5a7833449 Typo fix.
PR:		docs/10733
Submitted by:	Steve Coltrin <spcoltri@io.com>
1999-03-23 05:01:11 +00:00
Greg Lehey
240b9c4449 Describe the new semantics of 'create':
When creating a new drive, if the drive already has a vinum label,
  and name doesn't match the specified drive, do it anyway if the
  'force' flag is specified.

Continually-tripped-over-by:  Karl Pielorz <kpielorz@tdx.co.uk>

Update information about partition type for Vinum drives.  They
*should* be of type 'vinum', but currently we still accept (and
complain about) partitions of type 'unused'.  At a later date, only
'vinum' will be accepted.

Threatened-since: over a year
1999-03-23 04:55:50 +00:00
Greg Lehey
170cfb0311 Print correct message if the wrong module is loaded. 1999-03-23 04:55:23 +00:00
Greg Lehey
7a4bec173b vinum_create: pass 'force' flag to ioctl VINUM_STARTCONFIG.
Semantics:

  When creating a new drive, if the drive already has a vinum label,
  and name doesn't match the specified drive, do it anyway if the
  'force' flag is specified.

Continually-tripped-over-by:  Karl Pielorz <kpielorz@tdx.co.uk>
1999-03-23 04:54:59 +00:00
Greg Lehey
6100b4d0c5 Change the definition of VINUM_STARTCONFIG to take an int write parameter. 1999-03-23 04:50:40 +00:00
Greg Lehey
6d723f4eb0 Add flag VF_FORCECONFIG for use by the config_drive and friends. 1999-03-23 04:49:32 +00:00
Greg Lehey
ec79ff6a85 vinum_start:
remove the splbio() around the call to launch read requests.

launch_requests:
  Move the splbio() protection outside the entire launch_loop.  The
  previous location was causing problems with IDE drives, where the
  call to the strategy routine often did not complete until after
  complete_rqe deallocated the request structure.

Solution-independently-found-by: Russell Neeper <r-neeper@tamu.edu>
Problem-reported-by: Vallo Kallaste <vallo@matti.ee>
		     John Saunders <john@nlc.net.au>
		     Bernd Walter <ticso@cicely.de> (maybe)
1999-03-23 04:49:08 +00:00
Greg Lehey
8d2eda6481 VINUM_STARTCONFIG:
Pass the 'data' parameter to start_config, which uses it as the
  parameter 'force.
1999-03-23 04:48:31 +00:00
Greg Lehey
dae797bc58 init_drive:
Check for partition types FS_VINUM and FS_UNUSED.  Accept both, but
  complain about FS_UNUSED.  At a later date, only FS_VINUM will be
  accepted.

Threatened-since: over a year
1999-03-23 04:48:05 +00:00
Greg Lehey
b555657ffa Change the declaration of start_config. 1999-03-23 04:47:33 +00:00
Greg Lehey
7c0052fe03 start_config:
Add a flag `force' (VF_FORCECONFIG) to force name changes of
  existing drives.
config_drive:
  If the drive already has a vinum label, and name doesn't match the
  specified drive, do it anyway if the 'force' flag is specified.
finish_config:
  Reset the `force' flag.

Continually-tripped-over-by:  Karl Pielorz <kpielorz@tdx.co.uk>

give_sd_to_drive:
  If the drive is down, take the subdisk down and don't try to fix
  things.

update_plex_config:
  Don't try to update the config parameters of a plex which isn't
  fully configured (state plex_init or plex_unallocated).

  Correctly calculate the amount to trim off a striped or RAID-5 plex
  whose size is not a multiple of the stripe size.
1999-03-23 04:47:09 +00:00
Greg Lehey
84ac4f6bad Add partition type for Vinum.
Offered-for-inspection-to: jkh
1999-03-23 04:08:42 +00:00
Bruce Evans
3c697e0a62 Simplified using new SYMLINKS macro, mainly to test this macro. The
ifdefs are too ugly for this to be much of a simplification.  The
existence tests are even uglier now.  Note that the previous commit
was not submitted by me.  It missed the point and just added a second
layer of unused removals.

Fixed hard-coded "libcrypt"s.  The LCRYPTBASE macro mainly makes
things hard to read, but use it while we have it.
1999-03-23 03:41:09 +00:00
Bruce Evans
2336a7ea75 Removed all traces of LN_FLAGS. It was only used to produce a link
/usr/sbin/sysctl -> ${DESTDIR}/sbin/sysctl in some versions of 2.2,
and this link was broken if DESTDIR was set.

Added a SYMLINKS macro.  This works the same as LINKS, except it
creates symlinks and the linked-to pathname may be relative.  This
is more flexible than LN_FLAGS, since it supports installing
symlinks independently of hard links.

Use `ln -f[s] ...' instead of `rm -f ...; ln [-s] ...' for LINKS and
SYMLINKS.  This is equivalent if the target is neither a directory nor
a symlink to a directory.

PR:		8279
1999-03-23 03:06:25 +00:00
Alexander Langer
da69a97ff0 Typo fix (set --> get).
Obtained from:	OpenBSD (David Leonard)
1999-03-22 23:13:37 +00:00
Nick Hibma
83fac6ab3f Cosmetical changes. 1999-03-22 19:58:59 +00:00
Nick Hibma
86df1e04cc Implementation of the keyboard driver.
Done by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-03-22 19:55:30 +00:00
Nick Hibma
5e294a20cf Moved timeout initialisation a bit earlier in the process. The
untimeout function triggered panics once in a while.
1999-03-22 19:52:28 +00:00
Poul-Henning Kamp
3a25914cfd Make the same size rounding error both ways. 1999-03-22 14:01:58 +00:00
Poul-Henning Kamp
7f29144bc9 Nuke old copies of /usr/include/timepps.h 1999-03-22 12:58:15 +00:00
Poul-Henning Kamp
057cfd176a Address our users in a civilized manner. (They may know better, but probably
just forgot it, it is certainly no reason to don't insult them.)
1999-03-22 10:38:07 +00:00
Bruce Evans
0af0a4b0f4 Display floats with format %*.0f instead of as "*****" if there is
enough space for this but not enough space for the normal %*.*f
format.  Similarly for long doubles.
1999-03-22 03:44:01 +00:00
David E. O'Brien
fc8fc1d234 fix conflicts. 1999-03-22 01:29:39 +00:00
David E. O'Brien
2fee01e716 Update to latest version. 1999-03-22 01:28:54 +00:00
David E. O'Brien
21062dd2aa This commit was generated by cvs2svn to compensate for changes in r44930,
which included commits to RCS files with non-trunk default branches.
1999-03-22 01:26:43 +00:00
David E. O'Brien
cb1dd5d1b3 Virgin import of ISC-DHCP v2.0b1pl18 1999-03-22 01:26:43 +00:00
Jordan K. Hubbard
f1a3bb13d8 The attached patch to /usr/src/sbin/dump/optr.c changes the comparison
so that dumps are treated by dump -w as having been done on midnight
of the day they were actually run. This makes dump -w behave as
expected for regularly scheduled daily dumps - if they all run the
same day. It makes dump -w behave strangely if you dump late in the
day and check again after midnight, but that is the lesser of two
evils.

Submitted by:	Mike Meyer <mwm@phone.net>
PR:		9429
1999-03-21 23:47:38 +00:00
Alan Cox
99c81ca94d Two changes:
Remove more (redundant) map timestamp increments from properly
synchronized routines.  (Changed: vm_map_entry_link, vm_map_entry_unlink,
and vm_map_pageable.)

Micro-optimize vm_map_entry_link and vm_map_entry_unlink, eliminating
unnecessary dereferences.  At the same time, converted them from macros
to inline functions.
1999-03-21 23:37:00 +00:00
Jordan K. Hubbard
8abc4f6dad Add cdev 120 as the audit device.
Requested by:	Robert Watson <robert+freebsd@cyrus.watson.org>
1999-03-21 21:53:09 +00:00
Joerg Wunsch
0e20a72001 Finally remove the ancient `-exec rm -f {} ;' cruft that used to be
used to cleanup old files, and replace it by -delete which has been
present in our find(1) for ages now.
1999-03-21 12:34:06 +00:00
Poul-Henning Kamp
2fcf3276d9 Now bb structures are linked together. 1999-03-21 12:32:17 +00:00
Poul-Henning Kamp
48c619d0ee Link the bb structures together as we find them. 1999-03-21 12:30:50 +00:00
Poul-Henning Kamp
aca6858651 Remove the linker-set hack we used for BB profiling. 1999-03-21 12:28:14 +00:00
Bruce Evans
760a0960be Restored objlink. The previous commit was confused about the difference
between OBJLINK and objlink.
1999-03-21 06:43:40 +00:00
Warner Losh
43b4fd733d Don't be so selective about which errors cause us to continue and
which ones cause us to fail.  Now all open errors on the databse file
will cause the next file in the list to be tried.

Submitted by: Arne Henrik Juul <arnej@math.ntnu.no>
PR: 4585
1999-03-21 03:45:58 +00:00
Bill Fumerola
bc47530cab An even number of nodes, not node pairs are required for tsort(1) to work.
Pairs are inherently even.

PR:		docs/9264
Submitted by:	NAGAO Tadaaki <nagao@iij.ad.jp>
1999-03-20 21:24:18 +00:00
Jordan K. Hubbard
7785c4f280 Note that the upgrade target exists, and what it does.
Requested by:		Wayne M Barnes <stabilizer@klentaq1.emergingtech.org>
1999-03-20 20:10:19 +00:00
Alan Cox
2618393ec3 Eliminate a pointless TLB flush from the SMP idle loop.
Submitted by:	Luoqi Chen <luoqi@watermarkgroup.com>
Reviewed by:	"John S. Dyson" <toor@dyson.iquest.net>
1999-03-20 18:44:13 +00:00
Daniel C. Sobral
22004b5952 Revert bootinfo to 1.4 and use a different solution to NULL m_args
instead (don't copy).
1999-03-20 14:13:09 +00:00
Foxfair Hu
7756f9b5e0 Oops! forgot to introduce the src file in my last commit. 1999-03-20 13:23:48 +00:00
Daniel C. Sobral
f6eaf40e07 Fix a couple of nasty errors in the README. 1999-03-20 12:25:43 +00:00
Foxfair Hu
b5763c3a6a Supporting locale for Chinese Big5 completely. 1999-03-20 11:49:23 +00:00
Dag-Erling Smørgrav
0f5d195d94 Document net.inet.ip.fastforwarding, and the fact that it bypasses the
ipfirewall code.

Submitted by:	Ruslan Ermilov <ru@ucb.crimea.ua>
1999-03-20 10:25:40 +00:00
Wes Peters
df373873b5 Turn on PCI bus mastering in driver attach routine
to avoid hanging the system if the BIOS has not
initialized the interface.

PR:		10150
Reviewed by:	dg
1999-03-20 04:51:25 +00:00
Bill Fumerola
2a520986b3 mdoc fixes
PR:		docs/7864
Submitted by:	Yoshihiko OHTA <yohta@bres.tsukuba.ac.jp>
1999-03-20 04:46:58 +00:00
Bill Fumerola
bb7b64a35e Use the proper mdoc macro
PR:		docs/9892
Submitted by:	Kazuo Horikawa <horikawa@jp.freebsd.org>
1999-03-20 04:26:57 +00:00
Bill Fumerola
5175e4a53d security(1) doesn't exist, but security(7) does.
PR:		docs/10478
Submitted by:	Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
1999-03-20 04:03:56 +00:00
KATO Takenori
68ac28d7f9 Sync with sys/i386/isa/if_ed.c revision 1.150. 1999-03-19 16:01:34 +00:00
KATO Takenori
a3eb4bf80c Sync with sys/boot/i386/loader/version revision 1.4. 1999-03-19 15:59:56 +00:00