Commit graph

38948 commits

Author SHA1 Message Date
John Baldwin 6751370f6f Lock the process before sending it a SIGIO. Not doing so is a panic(2)
implementation with INVARIANTS.
2003-04-02 21:54:51 +00:00
Poul-Henning Kamp 316aed030e Add handling for cancelled events in the g_call_me() methods. 2003-04-02 21:10:04 +00:00
Poul-Henning Kamp afcbcfaed0 Change events to have an array of "void *" references, and give the
event posting functions varargs to fill these.

Attribute g_call_me() to appropriate g_geom's where necessary.

Add a flag argument to g_call_me() methods which will be used to signal
cancellation of events in the future.

This commit should be a no-op.
2003-04-02 20:41:18 +00:00
Matthew N. Dodd 2c56e246fa Back out support for RFC3514.
RFC3514 poses an unacceptale risk to compliant systems.
2003-04-02 20:14:44 +00:00
Matthew N. Dodd 4f6425f7ae - Use the correct constant define.
- Add a missing break.
2003-04-02 18:02:58 +00:00
Maxime Henrion b2badf0214 Convert the fxp(4) driver to the busdma API.
This patch is rather big because I had to significantly redesign
the driver to make the busdma conversion possible.  Most notably,
hardware and software structures were carefully splitted to get
rid of all the structs overlapping evilness.

Special thanks to phk and Richard Puga <puga@mauibuilt.com> for
providing me with fxp(4) hardware to do this work.

Thanks to marcel for testing this on ia64, and to Fred Clift
<fclift@verio.net> for testing this on alpha.

Tested on:	i386, ia64, alpha
2003-04-02 16:47:16 +00:00
Jeffrey Hsu c31548c820 Need to hold the same SMP lock for (knote) list traversal as for
list manipulation.  This lock also protects read-modify-write operations
on the pipe_state field.
2003-04-02 15:24:50 +00:00
Poul-Henning Kamp 8f6da0e4ac Only orphan things if the open/close actually succeeded. 2003-04-02 13:10:40 +00:00
Poul-Henning Kamp c7e1925c7c Properly handle races between open/close and orphan.
KASSERT the race between close and strategy, it is an error in the upper
echelons if this happens,

Add XXX: comment explaining why the ioctl/orphan race is not closed.
2003-04-02 13:09:50 +00:00
Søren Schmidt b539f9d523 Instead of not grapping a request binfinish(ENOMEM) it if malloc fails. 2003-04-02 11:36:43 +00:00
Yoshihiro Takahashi cffa957106 MFi386: revisions 1.556 and 1.557.
Backout revision 1.312.
2003-04-02 10:51:06 +00:00
Yoshihiro Takahashi ca30868b63 Merged from sys/dev/syscons/syscons.c revision 1.400. 2003-04-02 10:49:48 +00:00
Matthew N. Dodd 8faf6df9b3 Sync constant define with NetBSD.
Requested by:	 Tom Spindler <dogcow@babymeat.com>
2003-04-02 10:28:47 +00:00
Jeff Roberson 5053d272c2 - Make the interactivity calculator decay faster.
- Make the pcpu estimator update faster.
2003-04-02 08:22:33 +00:00
Jeff Roberson 98c9b132d1 - I meant divide by two and not shift by two in SCHED_PRI_NHALF. 2003-04-02 08:21:24 +00:00
Jake Burkholder c2b117e7db Implement cpu_thread_setup. Fix cpu_set_upcall. 2003-04-02 08:03:42 +00:00
Jake Burkholder cef57e7624 - Make casuptr return the old value of the location we're trying to update,
and change the umtx code to expect this.

Reviewed by:	jeff
2003-04-02 08:02:27 +00:00
Jeff Roberson 245f3abfd5 - Add in support for KSEs with 0 slice values on the run queue. If we try
to select a KSE with a slice of 0 we will update its slice and insert it
   onto the next queue.
 - Pass the KSE instead of the ksegrp into sched_slice().  This more
   accurately reflects the behavior of the code.  Slices are granted to kses.
 - Add a function kseq_nice_min() which finds the smallest nice value
   assigned to the kseg of any KSE on the queue.
 - Rewrite the logic in sched_slice().  Add a large comment describing the
   new slice selection scheme.  To summarize, slices are assigned based on
   the nice value.  Priorities are still calculated based on the nice and
   interactivity of a process.  Slice sizes of 0 may be granted for KSEs
   whos nice is 20 or futher away from the lowest nice on the run queue.
   Other nice values are scaled across the range [min, min+20].  This fixes
   ULEs bad behavior with positively niced processes.
2003-04-02 06:46:43 +00:00
Jake Burkholder fc2fca74d8 - Fix UC_COPY_SIZE. Adding up the size of structure fields doesn't take
alignment into account.
- Return EJUSTRETURN from set_context on success to avoid clobbering the
  first 2 out registers with td_retval on sparc64.
2003-04-01 23:25:18 +00:00
Jake Burkholder 6e1e13b5e0 - Set the version number in the mcontext in get_mcontext and check it in
set_mcontext.
- Don't make assumptions about the alignment of the mcontext inside of the
  ucontext; we have to save the floating point registers to the pcb and then
  copy to the mcontext.
2003-04-01 23:18:13 +00:00
Jeffrey Hsu 48d2549c3e Observe conservation of packets when entering Fast Recovery while
doing Limited Transmit.  Only artificially inflate the congestion
window by 1 segment instead of the usual 3 to take into account
the 2 already sent by Limited Transmit.

Approved in principle by:	Mark Allman <mallman@grc.nasa.gov>,
Hari Balakrishnan <hari@nms.lcs.mit.edu>, Sally Floyd <floyd@icir.org>
2003-04-01 21:16:46 +00:00
Poul-Henning Kamp 817509273e #include <geom/geom_disk.h> 2003-04-01 19:00:38 +00:00
Poul-Henning Kamp 4752f7570a Include <geom/geom_disk.h> not <sys/disk.h> 2003-04-01 18:57:14 +00:00
Poul-Henning Kamp 332a2bf07b Remove the #define for bioqdisksort(), it's no longer needed. 2003-04-01 18:55:46 +00:00
Poul-Henning Kamp 812de2ed5c I think the divorce successed, so stop #including <geom/geom_disk.h> 2003-04-01 18:55:04 +00:00
Andrew Gallatin 9ef024f7b7 Add a crutch so that direct-mapped DMA works on alpha. This is a step
toward preventing this driver from crashing an alpha at boot.

Tested by: Oliver Lehmann <lehmann@ans-netz.de>
2003-04-01 16:31:12 +00:00
Poul-Henning Kamp 891619a66d Use bioq_flush() to drain a bio queue with a specific error code.
Retain the mistake of not updating the devstat API for now.

Spell bioq_disksort() consistently with the remaining bioq_*().

#include <geom/geom_disk.h> where this is more appropriate.
2003-04-01 15:06:26 +00:00
Poul-Henning Kamp 51a5b7f1ba Don't include <sys/disk.h>. 2003-04-01 13:33:28 +00:00
Poul-Henning Kamp 7c79beb3ce Start to split the GEOM/diskdriver specific bits into geom/geom_disk.h 2003-04-01 13:19:14 +00:00
Poul-Henning Kamp af6ca7f4a9 Introduce bioq_flush() function. 2003-04-01 12:49:40 +00:00
Poul-Henning Kamp a4d7a3c069 Include <sys/conf.h> rather than trusting <sys/disk.h> to do so. 2003-04-01 12:35:17 +00:00
Poul-Henning Kamp 95082542bb Add #include <sys/conf.h> so we don't rely on <sys/disk.h> doing it. 2003-04-01 12:34:47 +00:00
Jeff Roberson 120d1b9e32 - smb_td_intr takes a thread as an argument not a proc. 2003-04-01 09:24:12 +00:00
Jeff Roberson 6f39c1a1fe - smb_proc_intr is now spelled smb_td_intr.
Noticed by:	phk
Pointy hat to:	jeffr
2003-04-01 09:23:24 +00:00
Jeff Roberson c9dfa2e08b - p will be unused in cursig() if INVARIANTS is not defined. Access it
through td->td_proc to avoid the unused variable.

Spotted by:	Maxim Konovalov <maxim@macomnet.ru>
2003-04-01 09:07:36 +00:00
Poul-Henning Kamp 09bf42f50f Don't include <sys/buf.h> needlessly. 2003-04-01 09:02:58 +00:00
Poul-Henning Kamp 6f46bf604d Fix KASSERT syntax error. 2003-04-01 08:57:28 +00:00
Matthew N. Dodd 09139a4537 Implement support for RFC 3514 (The Security Flag in the IPv4 Header).
(See: ftp://ftp.rfc-editor.org/in-notes/rfc3514.txt)

This fulfills the host requirements for userland support by
way of the setsockopt() IP_EVIL_INTENT message.

There are three sysctl tunables provided to govern system behavior.

	net.inet.ip.rfc3514:

		Enables support for rfc3514.  As this is an
		Informational RFC and support is not yet widespread
		this option is disabled by default.

	net.inet.ip.hear_no_evil

		 If set the host will discard all received evil packets.

	net.inet.ip.speak_no_evil

		If set the host will discard all transmitted evil packets.

The IP statistics counter 'ips_evil' (available via 'netstat') provides
information on the number of 'evil' packets recieved.

For reference, the '-E' option to 'ping' has been provided to demonstrate
and test the implementation.
2003-04-01 08:21:44 +00:00
Poul-Henning Kamp c8d01707ba Fix KASSERT syntax errors.
Please compile LINT before commiting.
2003-04-01 08:10:21 +00:00
Poul-Henning Kamp 4a1e273c48 Remove the old config interface, the new OAM is sufficiently functional
now.
2003-04-01 07:33:56 +00:00
Poul-Henning Kamp dfb99a70d8 Remove the old config interface now that the new OAM is functional. 2003-04-01 07:33:17 +00:00
Jake Burkholder 73adf5691f - Add a flags field to struct pcb. Use this to keep track of wether or
not the pcb has floating point registers saved in it.
- Implement get_mcontext and set_mcontext.
2003-04-01 04:58:50 +00:00
Jake Burkholder 404221fe55 - Don't allow tf_wstate to be set in set_regs.
- Clear FPRS_FEF in set_fpregs so the new registers will be reloaded.
2003-04-01 04:29:03 +00:00
Jake Burkholder 8fe20fdafa Implement cpu_set_upcall. 2003-04-01 04:19:29 +00:00
Jake Burkholder f217a77ce4 - Rename pcb_fpstate to pcb_ufp (user floating point), and change it to
a simple array of 64 ints.
- Use a critical section when saving floating point state in cpu_fork
  instead of sched_lock.
2003-04-01 04:02:45 +00:00
Jake Burkholder e50173aeaa Rename pcb_fp to pcb_sp, so as to not be confused with floating point
state.
2003-04-01 03:05:46 +00:00
Tim J. Robbins a968deece9 Specify the M_WAITOK flag explicitly in the MALLOC call to silence a
runtime warning ("Bad malloc flags: 0").
2003-04-01 02:47:09 +00:00
Tim J. Robbins 788fc48e32 Give the M_WAITOK flag explicitly to the MALLOC call to silence a runtime
warning ("Bad malloc flags: 0").
2003-04-01 02:42:02 +00:00
Jake Burkholder a31794d553 Implement casuptr. 2003-04-01 02:37:04 +00:00
Jeff Roberson 4518589564 - Regen. 2003-04-01 02:34:21 +00:00