Commit Graph

50316 Commits

Author SHA1 Message Date
SUZUKI Shinsuke
3d54848fc2 support TCP-MD5(IPv4) in KAME-IPSEC, too.
MFC after: 3 week
2004-11-08 18:49:51 +00:00
Dag-Erling Smørgrav
ed3fdd0e3a Retire TUNABLE_QUAD_*. 2004-11-08 18:22:22 +00:00
Dag-Erling Smørgrav
7419d1e25f #include <vm/vm_param.h> instead of <machine/vmparam.h> (the former
includes the latter, but also declares variables which are defined
in kern/subr_param.c).

Change som VM parameters from quad_t to unsigned long.  They refer to
quantities (size limits for text, heap and stack segments) which must
necessarily be smaller than the size of the address space, so long is
adequate on all platforms.

MFC after:	1 week
2004-11-08 18:20:02 +00:00
Dag-Erling Smørgrav
de84c3d14f Document why rlim_t needs to be a signed type.
Define RLIM_INFINITY as INT64_MAX instead of hand-rolling it.

MFC after:	1 week
2004-11-08 18:05:43 +00:00
Philip Paeps
9923cf221b Add support for gadgets on Asus L4R and M6R notebooks. 2004-11-08 16:54:26 +00:00
Max Laier
f4444d4a61 Another missing ! in front of IFQ_DRV_IS_EMPTY, this time in an even more
sensitive, but less excercised location (the watchdog). While here use the
*_start_locked function directly to avoid drop, grab, drop lock.

I have to be very careful with future ALTQ patches!

Found & reviewed by:	rwatson
MFC after:		3 days
2004-11-08 16:16:04 +00:00
Poul-Henning Kamp
756d52a195 Initialize struct pr_userreqs in new/sparse style and fill in common
default elements in net_init_domain().

This makes it possible to grep these structures and see any bogosities.
2004-11-08 14:44:54 +00:00
Poul-Henning Kamp
598b7ec86b Use more intuitive pointer for fdinit() and fdcopy().
Change fdcopy() to take unlocked filedesc.
2004-11-08 12:43:23 +00:00
Poul-Henning Kamp
56dd3a6182 Add optional device vnode bypass to DEVFS.
The tunable vfs.devfs.fops controls this feature and defaults to off.

When enabled (vfs.devfs.fops=1 in loader), device vnodes opened
through a filedescriptor gets a special fops vector which instead
of the detour through the vnode layer goes directly to DEVFS.

Amongst other things this allows us to run Giant free read/write to
device drivers which have been weaned off D_NEEDGIANT.

Currently this means /dev/null, /dev/zero, disks, (and maybe the
random stuff ?)

On a 700MHz K7 machine this doubles the speed of
	dd if=/dev/zero of=/dev/null bs=1 count=1000000

This roughly translates to shaving 2usec of each read/write syscall.

The poll/kqfilter paths need more work before they are giant free,
this work is ongoing in p4::phk_bufwork

Please test this and report any problems, LORs etc.
2004-11-08 10:46:47 +00:00
Alan Cox
ed35e0a562 Eliminate an unused argument to vm_pgmoveco(). 2004-11-08 06:57:31 +00:00
Alan Cox
12ef9d214b Correct a typo in the previous revision. 2004-11-08 06:01:39 +00:00
Marcel Moolenaar
f7ebc7ceb7 Bind to cpu0 for boot() processing on all platforms again. 2004-11-08 04:52:26 +00:00
Marcel Moolenaar
02a20471ab Increase default HZ for ia64 to 1000. 2004-11-08 04:50:02 +00:00
Alan Cox
d3cb0d99e0 Introduce two new options, "CPU private" and "no wait", to sf_buf_alloc().
Change the spelling of the "catch" option to be consistent with the new
options.  Implement the "no wait" option.  An implementation of the "CPU
private" for i386 will be committed at a later date.
2004-11-08 00:43:46 +00:00
Nate Lawson
f3118682aa Add power profile support so that the LCD changes brightness levels based
on the AC line state.

Submitted by:	OGAWA Takaya <t-ogawa@triaez.kaisei.org>
MFC after:	1 week
2004-11-07 23:18:23 +00:00
Robert Watson
f42a43fa2d Add basic critical section tracing to KTR using event type KTR_CRITICAL.
This generates a KTR event for each critical section entered and exited.

It would be desirable to also log the filename and line number of the
source entering or exiting the critical section, but this requires
hacking up the critical section API, so I've not done that yet.
2004-11-07 23:11:32 +00:00
Olivier Houchard
b720bb34f3 Add device mem in config files. 2004-11-07 23:02:15 +00:00
Olivier Houchard
e099742e25 Import md bits for mem(4) on arm.
While I'm there, cleanup a bit pmap.h.
2004-11-07 23:01:36 +00:00
Poul-Henning Kamp
ef11fbd7c4 Introduce fdclose() which will clean an entry in a filedesc.
Replace homerolled versions with call to fdclose().

Make fdunused() static to kern_descrip.c
2004-11-07 22:16:07 +00:00
Robert Watson
d6915262af Do some re-sorting of TCP pcbinfo locking and assertions: make sure to
retain the pcbinfo lock until we're done using a pcb in the in-bound
path, as the pcbinfo lock acts as a pseuo-reference to prevent the pcb
from potentially being recycled.  Clean up assertions and make sure to
assert that the pcbinfo is locked at the head of code subsections where
it is needed.  Free the mbuf at the end of tcp_input after releasing
any held locks to reduce the time the locks are held.

MFC after:	3 weeks
2004-11-07 19:19:35 +00:00
Kirill Ponomarev
fe368b40bf Document "loader_color" variable.
PR:		conf/73396
Submitted by:	Aleksander Fafula <alex at fafula dot com>
Approved by:	scottl
2004-11-07 17:01:08 +00:00
Olivier Houchard
ec98ae75da Implement ffs with clz for Xscale.
Idea taken from:	NetBSD
2004-11-07 16:53:29 +00:00
Olivier Houchard
1b135a7e11 Remove useless code. 2004-11-07 16:51:33 +00:00
Poul-Henning Kamp
b1fa752732 Use fget_locked() instead of homerolled 2004-11-07 16:09:56 +00:00
Poul-Henning Kamp
0ac3a7f694 More sensible FILEDESC_ locking. 2004-11-07 15:59:27 +00:00
Poul-Henning Kamp
2f5a40aa3f Move fdinit() related stuff from .h to .c 2004-11-07 15:34:45 +00:00
Olivier Houchard
943efa1bd1 Don't abuse tp->t_sc in sl(4) either. 2004-11-07 14:36:47 +00:00
Olivier Houchard
7358f4bb52 Don't abuse tp->t_sc, as it is now used by tty drivers.
This fixes the panic that occurs when using ppp(4)

Reported and tested by:	Yann Berthier (yb at sainte-barbe dot org)
2004-11-07 14:35:53 +00:00
Poul-Henning Kamp
8ec21e3a68 Allow fdinit() to be called with a NULL fdp argument so we can use
it when setting up init.

Make fdinit() lock the fdp argument as needed.
2004-11-07 12:39:28 +00:00
Nate Lawson
70ce93f4c5 Add comments to clarify why we need to run shutdown code on the BSP, update
an old comment about boot() being MI, and note that splhigh() no longer
disables interrupts.
2004-11-07 06:58:45 +00:00
Poul-Henning Kamp
3b19b5af3a When we open /dev/null for stdin/out/err for safety reasons, do it right:
we should preserve f_data and f_ops if they are already set.
2004-11-06 23:36:09 +00:00
Alan Cox
dad740e967 Eliminate an unnecessary atomic operation. Articulate the rationale in
a comment.
2004-11-06 21:48:45 +00:00
Poul-Henning Kamp
d4cfa2b5e3 Get even closer to not crashing ext2fs 2004-11-06 18:24:33 +00:00
Poul-Henning Kamp
057b5a5e38 Get closer to unbreaking ext2fs 2004-11-06 18:18:58 +00:00
Pawel Jakub Dawidek
e3ed29a739 Be consistent and use 'if (error != 0)' instead of 'if (error)' everywhere. 2004-11-06 13:16:35 +00:00
Pawel Jakub Dawidek
61a6eb62ec For file backed md(4) devices output their source file via
'mdconfig -l -u <unit>'.
Bump version number, as this change breaks ABI/API.
2004-11-06 13:07:02 +00:00
Robert Watson
dc2c7965c0 Abstract the logic to look up the uma_bucket_zone given a desired
number of entries into bucket_zone_lookup(), which helps make more
clear the logic of consumers of bucket zones.

Annotate the behavior of bucket_init() with a comment indicating
how the various data structures, including the bucket lookup tables,
are initialized.
2004-11-06 11:43:30 +00:00
Poul-Henning Kamp
5349c79d75 Properly implement a default version of VOP_GETWRITEMOUNT.
Remove improper access to vop_stdgetwritemount() which should and
will instead rely on the VOP default path.
2004-11-06 11:41:22 +00:00
Poul-Henning Kamp
0c7d0f9639 Increase default HZ for i386 to 1000 2004-11-06 11:33:43 +00:00
Poul-Henning Kamp
a7f06e2bd4 Remove dangling variable 2004-11-06 11:33:11 +00:00
Robert Watson
f9d27e7524 Annotate what bucket_size[] array does; staticize since it's used only
in uma_core.c.
2004-11-06 11:24:40 +00:00
Andre Oppermann
e9a4cd2426 Fix a double-free in the 'm->m_len < sizeof (struct ip)' sanity check.
Bug report by:	<james@towardex.com>
MFC after:	2 weeks
2004-11-06 10:47:36 +00:00
David Schultz
8bc61209d4 Fix the last known race in swapoff(), which could lead to a spurious panic:
swapoff: failed to locate %d swap blocks

The race occurred because putpages() can block between the time it
allocates swap space and the time it updates the swap metadata to
associate that space with a vm_object, so swapoff() would complain
about the temporary inconsistency.  I hoped to fix this by making
swp_pager_getswapspace() and swp_pager_meta_build() a single atomic
operation, but that proved to be inconvenient.  With this change,
swapoff() simply doesn't attempt to be so clever about detecting when
all the pageout activity to the target device should have drained.
2004-11-06 07:17:50 +00:00
Giorgos Keramidas
550b156641 Clean up the comments, rewording, adding missing punctuation
and other minor nits.

Approved by:	jhb
2004-11-06 06:13:13 +00:00
Alan Cox
19187819b7 Move a call to wakeup() from vm_object_terminate() to vnode_pager_dealloc()
because this call is only needed to wake threads that slept when they
discovered a dead object connected to a vnode.  To eliminate unnecessary
calls to wakeup() by vnode_pager_dealloc(), introduce a new flag,
OBJ_DISCONNECTWNT.

Reviewed by: tegge@
2004-11-06 05:33:02 +00:00
Peter Wemm
ffcb357bd1 Begin an invasion of i386-land by amd64.
Expose some of the amd64-specific sysarch functions to allow alternative
implementations of the %fs/%gs code for TLS, threads, etc.  USER_LDT does
not exist on the amd64 kernel, so we have to implement things other ways.
2004-11-06 03:23:36 +00:00
Olivier Houchard
432f5e3ab9 Disable interrupts for atomic_cmpset_32, this one is just not atomic.
Don't export it to userland.
2004-11-05 23:48:12 +00:00
David Xu
8acf605790 Respect TDF_SINTR, don't suspend uninterruptible thread. 2004-11-05 22:40:33 +00:00
David Xu
64895117a0 Backout previous commit, the P_STOPPED_BOUNDARY flag was already
cleared at the begin of thread_single() when needed.
2004-11-05 22:31:20 +00:00
John Baldwin
bd1d11f5dc - Store threads on sleep queues in FIFO order rather than sorted by
priority.  The sleep queues don't get updated when the priority of
  threads changes, so sleepq_signal() might not always wakeup the
  highest priority thread.  Updating the queues when thread priorities
  change cannot be easily done due to lock orders, so instead we do an
  O(n) walk of the queue for a sleepq_signal() operation instead of O(1).
  On the other hand, adding a thread to a sleep queue now goes from O(n)
  to O(1) so it ends up as an even tradeoff.  The correctness here with
  regards to priorities is actually fairly important.  msleep() gives
  interactive threads their priority "boost" after they are placed on the
  queue, but before this fix that "boost" wasn't used to determine the
  highest priority thread that sleepq_signal() awoke.
- Fix up some comments.

Inspired by:	ups, bde
2004-11-05 20:19:58 +00:00