Commit Graph

38490 Commits

Author SHA1 Message Date
John Birrell
e18a82c504 Bump the __FreeBSD_version number now that libc_r contains a wrapper
for the poll syscall.
1999-06-20 08:34:24 +00:00
John Birrell
38329e8a07 Remove -DNOPOLL from the compilation flags now that there is a poll wrapper
in libc_r.

Bump the library version number (the scheduler now uses a poll syscall
instead of select).
1999-06-20 08:32:37 +00:00
John Birrell
02292f131a In the words of the author:
o The polling mechanism for I/O readiness was changed from
    select() to poll().  In additon, a wrapped version of poll()
    is now provided.

  o The wrapped select routine now converts each fd_set to a
    poll array so that the thread scheduler doesn't have to
    perform a bitwise search for selected fds each time file
    descriptors are polled for I/O readiness.

  o The thread scheduler was modified to use a new queue (_workq)
    for threads that need work.  Threads waiting for I/O readiness
    and spinblocks are added to the work queue in addition to the
    waiting queue.  This reduces the time spent forming/searching
    the array of file descriptors being polled.

  o The waiting queue (_waitingq) is now maintained in order of
    thread wakeup time.  This allows the thread scheduler to
    find the nearest wakeup time by looking at the first thread
    in the queue instead of searching the entire queue.

  o Removed file descriptor locking for select/poll routines.  An
    application should not rely on the threads library for providing
    this locking; if necessary, the application should use mutexes
    to protect selecting/polling of file descriptors.

  o Retrieve and use the kernel clock rate/resolution at startup
    instead of hardcoding the clock resolution to 10 msec (tested
    with kernel running at 1000 HZ).

  o All queues have been changed to use queue.h macros.  These
    include the queues of all threads, dead threads, and threads
    waiting for file descriptor locks.

  o Added reinitialization of the GC mutex and condition variable
    after a fork.  Also prevented reallocation of the ready queue
    after a fork.

  o Prevented the wrapped close routine from closing the thread
    kernel pipes.

  o Initialized file descriptor table for stdio entries at thread
    init.

  o Provided additional flags to indicate to what queues threads
    belong.

  o Moved TAILQ initialization for statically allocated mutex and
    condition variables to after the spinlock.

  o Added dispatching of signals to pthread_kill.  Removing the
    dispatching of signals from thread activation broke sigsuspend
    when pthread_kill was used to send a signal to a thread.

  o Temporarily set the state of a thread to PS_SUSPENDED when it
    is first created and placed in the list of threads so that it
    will not be accidentally scheduled before becoming a member
    of one of the scheduling queues.

  o Change the signal handler to queue signals to the thread kernel
    pipe if the scheduling queues are protected.  When scheduling
    queues are unprotected, signals are then dequeued and handled.

  o Ensured that all installed signal handlers block the scheduling
    signal and that the scheduling signal handler blocks all
    other signals.  This ensures that the signal handler is only
    interruptible for and by non-scheduling signals.  An atomic
    lock is used to decide which instance of the signal handler
    will handle pending signals.

  o Removed _lock_thread_list and _unlock_thread_list as they are
    no longer used to protect the thread list.

  o Added missing RCS IDs to modified files.

  o Added checks for appropriate queue membership and activity when
    adding, removing, and searching the scheduling queues.  These
    checks add very little overhead and are enabled when compiled
    with _PTHREADS_INVARIANTS defined.  Suggested and implemented
    by Tor Egge with some modification by me.

  o Close a race condition in uthread_close.  (Tor Egge)

  o Protect the scheduling queues while modifying them in
    pthread_cond_signal and _thread_fd_unlock.  (Tor Egge)

  o Ensure that when a thread gets a mutex, the mutex is on that
    threads list of owned mutexes.  (Tor Egge)

  o Set the kernel-in-scheduler flag in _thread_kern_sched_state
    and _thread_kern_sched_state_unlock to prevent a scheduling
    signal from calling the scheduler again.  (Tor Egge)

  o Don't use TAILQ_FOREACH macro while searching the waiting
    queue for threads in a sigwait state, because a change of
    state destroys the TAILQ link.  It is actually safe to do
    so, though, because once a sigwaiting thread is found, the
    loop ends and the function returns.  (Tor Egge)

  o When dispatching signals to threads, make the thread inherit
    the signal deferral flag of the currently running thread.
    (Tor Egge)

Submitted by: Daniel Eischen <eischen@vigrid.com> and
              Tor Egge <Tor.Egge@fast.no>
1999-06-20 08:28:48 +00:00
Alan Cox
c207703465 Set cnt.v_page_size to PAGE_SIZE rather than DEFAULT_PAGE_SIZE so that
"vmstat -s" reports the correct value on the Alpha.

Submitted by:	Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1999-06-20 04:55:29 +00:00
Greg Lehey
12a7982c45 Correct description of Vinum. 1999-06-20 04:35:22 +00:00
Jordan K. Hubbard
d571daa00c Clean up some of the documentation at the top. 1999-06-20 03:36:46 +00:00
Alan Cox
dc92aa57fd For consistency with other implementations, check for the existence
of the segment before checking its permissions.

PR:		kern/11999
Submitted by:	Brooks Davis <brooks@one-eyed-alien.net>
1999-06-19 23:53:13 +00:00
Robert Nordier
5868a099d9 Implement -m option to enable/disable slices. 1999-06-19 21:44:43 +00:00
Robert Nordier
fc2ff140c2 Provide for enabling/disabling each slice individually. 1999-06-19 21:40:55 +00:00
Robert Nordier
bc53095dd4 Fix use of e_phoff in place of e_phnum. 1999-06-19 20:50:38 +00:00
Robert Nordier
68aadbb9c9 Correct and clarify some comments. 1999-06-19 20:40:32 +00:00
Bill Paul
14de28bd64 Add device rl0 to GENERIC. Also add al0 (ADMtek PCI ethernet) which I
forgot to do previously.
1999-06-19 20:25:25 +00:00
Robert Nordier
ec4e5afb48 Goodbye to vaules, becasue, similiar, backgroud, aquired, freelisat, etc. 1999-06-19 20:20:52 +00:00
Bill Paul
19e7516669 Fix up the RealTek 8139 driver to work on FreeBSD/alpha. This involves a
few changes:

- there was a bug in rl_list_tx_init(): it was calculating the registers
  to initialize incorrectly. Not a problem on the x86 where unaligned
  access are allowed, but a problem on the alpha.

- set rl_btag accordingly depending on the machine type

- rl_rxeof() needs to be sure to longword-align the packet data. This
  is a little tricky since we copy the data out of the receive buffer
  using m_devget(), however there's no way to tell m_devget() to fill
  in the mbufs starting at a particular offset. To get around this,
  we tell m_devget to copy bytes+2 bytes starting at offset offset-2. This
  results in the proper alignment, and we can trim off the two leading
  bytes afterwards with m_adj(). We also allocate some extra space before
  the start of the receive buffer so that we don't get into trouble in
  the case where offset == 0.

- redefine vtophys() in if_rlreg.h for the alpha.

Making this chipset work on the alpha is sort of the inverse of putting
a jet engine on a rowboat (putting a propeller on a 747?) but when
you can get these things for $5 a pop, it's hard to stop people from
buying them.
1999-06-19 20:17:38 +00:00
Poul-Henning Kamp
6003dc8e9b Move the IFSTATUS stuff after the address listing. 1999-06-19 20:07:24 +00:00
Brian Feldman
767bc8ad79 Miscellaneous dd(1) changes: mainly fixing variable types (size_t, ssize_t,
off_t, int, u_int64_t, etc.). dd(1) should now work properly with REALLY
big amounts of data.
1999-06-19 19:49:35 +00:00
Matt Jacob
3d32dfbfdf Thanks to Bruce for noticing this.... compare against the *new* nfsnode's
mount point for seeing whether or not the new nfsnode is already in the
hash queue. We're pretty much guaranteed that the old nfsnode is already
in the hash queue. Wank! Infinite Loop! Looks like just a minor typo....
(ah the influence of fortran ... np && np2... why not nfsnode_the_first &&
nfsnode_the_second???)...
1999-06-19 19:33:44 +00:00
Brian Feldman
7a2aab80b0 This is the much-awaited cleaned up version of IPFW [ug]id support.
All relevant changes have been made (including ipfw.8).
1999-06-19 18:43:33 +00:00
Alan Cox
6ea5bd80fe Remove some unused function and variable declarations. 1999-06-19 18:42:53 +00:00
Poul-Henning Kamp
413dd0ba39 Add a new interface ioctl, to return "aux status".
This is inteded for to allow ifconfig to print various unstructured
information from an interface.

The data is returned from the kernel in ASCII form, see the comment in
if.h for some technicalities.

Canonical cut&paste example to be found in if_tun.c

Initial use:
        Now tun* interfaces tell the PID of the process which opened them.

Future uses could be (volounteers welcome!):
        Have ppp/slip interfaces tell which tty they use.
        Make sync interfaces return their media state: red/yellow/blue
        alarm, timeslot assignment and so on.
        Make ethernets warn about missing heartbeats and/or cables
1999-06-19 18:42:31 +00:00
Doug Rabson
13549ec01c Add a fast version of bcmp which compares longwords at a time.
Submitted by: Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
1999-06-19 16:30:28 +00:00
Nick Hibma
de4a801355 Add again the ':' after the x option in th eargument list to getopt.
It disappeared in rev. 1.23 newfs.c

PR: 12292
Submitted by: Cy Schubert <cy@cschuber.net.gov.bc.ca>
1999-06-19 13:32:27 +00:00
Doug Rabson
8af8f3ae04 Adjust mcclock lines to avoid config(8) warning. 1999-06-19 13:12:51 +00:00
Doug Rabson
93b4562045 Convert signalling NaNs to quiet NaNs as specified by the Alpha Architecture
Reference Manual.

Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1999-06-19 11:54:35 +00:00
Brian Feldman
ebe119ae6c Add RCS strings to kernel ipfilter files. 1999-06-19 11:35:41 +00:00
Greg Lehey
89bf63adaa sioprobe: Don't try to initialize disabled ports. In particular,
attempting to initialize sio3 caused problems with ATI video boards,
which cleverly share the I/O space.

PR: kern/12295
1999-06-19 08:14:56 +00:00
Brian Feldman
e214816bfc This should fix ipfilter for everyone it was broken for. CDEV_MAJOR is _not_
-1.

Noticed by: users on freebsd-current
1999-06-19 02:54:04 +00:00
Bill Paul
274342303b Add a transmit descriptor usage counter and use it to absolutely,
positively not let ti_encap() fill up the TX ring all the way and wrap
around. This fixes a potential transmit lockup where a really fast
machine (or particular TX traffic pattern) can overrun the end of the
ring.

Reported by: John Plevyak <jplevyak@inktomi.com>
1999-06-19 00:36:56 +00:00
Robert Nordier
97a62e386d Change active flag handling; sanity check passed drive number; pass
partition pointer to bootstrap; optimise away 10 bytes; cosmetics.
1999-06-18 21:49:18 +00:00
Brian Feldman
66e98eef2b K6-family MTRR support
This is tested, but I really can't say whether it works entirely. I
don't know exactly what to look for when testing it. So let's say this
is open for testing. Send any results to green@FreeBSD.org

Reviewed by:	msmith (long ago)
1999-06-18 19:56:02 +00:00
Brian Feldman
6b32f7692f Harmless change to prevent possible problems in the future. I made
sure that i686_mem was only used when
	1. CPUID had MTRR set (this was there before)
	2. the CPU was GenuineIntel (not there)
	3. the CPU is a 686 (also not there)

This should prevent any problems with CPUs that set MTRR but aren't
compatibile with Intel's interface (none that I know of yet.)
1999-06-18 19:24:40 +00:00
Nick Hibma
66efee0151 Clarified info on X release 3.3.1.
Submitted/Reviewed by: Joe Touch <touch@ISI.EDU>
1999-06-18 16:53:33 +00:00
KATO Takenori
fe85f176c7 New parallel port support for PC98. Old PC98s which have
uni-directional parallel port should use olpt driver instead of lpt
driver.

Files ppc.c and ppcreg.h are copied form i386/isa directory with PC98
change.

Submitted by:	Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
1999-06-18 14:48:28 +00:00
Bruce Evans
50045fbc7c Changed the global `idt' from an array to a pointer so that npx.c
automatically hacks on the active copy of the IDT if f00f_hack()
has changed it.  This also allows simplifications in setidt().
This fixes breakage of FP exception handling by rev.1.55 of
sys/kernel.h.  FP exceptions were sent to npx.c's probe handlers
because npx.c "restored" the old handlers to the wrong copy of the
IDT.  The SYSINIT for f00f_hack() was purposely run quite late to
avoid problems like this, but it is bogusly associated with the
SYSINIT for proc0 so it was moved with the latter.

Problem reported and fix tested by:  Martin Cracauer <cracauer@cons.org>
1999-06-18 14:32:21 +00:00
Ruslan Ermilov
966ea00a57 Fix a coredump with negative (due to overflow) offset values. 1999-06-18 14:26:07 +00:00
Brian Somers
08da4867ae Don't use the ``next'' redial timer if we have no phone number at all. 1999-06-18 13:49:01 +00:00
Jordan K. Hubbard
458cbc01d2 This lets you specify "gemdosfs", "shortnames", "longnames", and
"nowin95" as arguments to the "-o" flag, as alternatives to "-G", "-s",
"-l", and "-9"; when running "mount_msdos" by hand, that doesn't let you
do anything you couldn't already do, but if you're letting "mount" run
it, it lets you specify those options, which is especially useful if,
for example, you have an entry in "/etc/fstab" for some file system,
with "noauto" set, so you can conveniently mount a DOS partition from a
removable drive and force it to treat the file system as VFAT rather
than boring old FAT.

Submitted by:	Guy Harris <guy@netapp.com>
1999-06-18 12:05:02 +00:00
Ruslan Ermilov
ac88d62d8f Typo in previous commit. 1999-06-18 10:41:13 +00:00
Ruslan Ermilov
ca9807fc17 Mention that pid 1 is not affected by kill(-1, SIGXXX) too. 1999-06-18 10:24:12 +00:00
Ruslan Ermilov
1681d65976 Bring in System V run-level patches (turned off by default).
While I'm here, fix some typos in the manpage.

Requested by:	des
1999-06-18 09:08:09 +00:00
Sheldon Hearn
1427b87c55 Postpone call to usage() until after all options are processed so that
the -d debugging option produces consistent behaviour.
1999-06-18 08:52:13 +00:00
Doug Rabson
ccb0861e01 Sync with etc.i386/MAKEDEV version 1.199. 1999-06-18 06:20:08 +00:00
Kirk McKusick
7481264c1e On our final pass through ffs_fsync, do all I/O synchronously so that
we can find out if our flush is failing because of write errors. This
change avoids a "flush failed" panic during unrecoverable disk errors.
1999-06-18 05:49:46 +00:00
Kenneth D. Merry
7c903b3d7e Add a MAINTAINER line to modules that I maintain.
Suggested by:	brian, markm
1999-06-18 00:41:47 +00:00
Brian Feldman
f29be02190 Reviewed by: the cast of thousands
This is the change to struct sockets that gets rid of so_uid and replaces
it with a much more useful struct pcred *so_cred. This is here to be able
to do socket-level credential checks (i.e. IPFW uid/gid support, to be added
to HEAD soon). Along with this comes an update to pidentd which greatly
simplifies the code necessary to get a uid from a socket. Soon to come:
a sysctl() interface to finding individual sockets' credentials.
1999-06-17 23:54:50 +00:00
Mark Murray
eb9ae2c0ce Add a kernel config for PC-Card machines. This is part of the
(safe) PAO integration.

Submitted by:	Tatsumi HOSOKAWA
1999-06-17 23:53:20 +00:00
Brian Feldman
bdf43556fe Minor English corrections were made; SEE ALSO was also fixed (no commas). 1999-06-17 23:43:35 +00:00
Gary Palmer
0625ba2fc3 Add Id strings 1999-06-17 23:42:45 +00:00
Brian Somers
43f9e1bb41 Reset our start time when the link comes up, correcting
the reported connection time.

PR:		11943
Submitted by:	Peter Mutsaers <plm@xs4all.nl>
1999-06-17 22:12:51 +00:00
Mark Murray
cb0a438aa8 More PAO-ish stuff. Wildcard the IRQ bits. 1999-06-17 21:39:57 +00:00