Commit Graph

50390 Commits

Author SHA1 Message Date
philip
9c50035691 Add support for gadgets on Asus L4R and M6R notebooks. 2004-11-08 16:54:26 +00:00
mlaier
0447144e4c 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
phk
027fce30f5 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
phk
d24107be6b Use more intuitive pointer for fdinit() and fdcopy().
Change fdcopy() to take unlocked filedesc.
2004-11-08 12:43:23 +00:00
phk
63cd9549c7 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
alc
8461ec98de Eliminate an unused argument to vm_pgmoveco(). 2004-11-08 06:57:31 +00:00
alc
85ea5a98fc Correct a typo in the previous revision. 2004-11-08 06:01:39 +00:00
marcel
71335ce1f2 Bind to cpu0 for boot() processing on all platforms again. 2004-11-08 04:52:26 +00:00
marcel
c361afa258 Increase default HZ for ia64 to 1000. 2004-11-08 04:50:02 +00:00
alc
279c442e7b 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
njl
ddc1dfe834 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
rwatson
ab85f61559 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
cognet
e9b8703c85 Add device mem in config files. 2004-11-07 23:02:15 +00:00
cognet
103e95586e 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
phk
52da2f8e34 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
rwatson
185ec80b05 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
krion
686571ff85 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
cognet
964bf9d8f7 Implement ffs with clz for Xscale.
Idea taken from:	NetBSD
2004-11-07 16:53:29 +00:00
cognet
ce94b57ab1 Remove useless code. 2004-11-07 16:51:33 +00:00
phk
cad3685bce Use fget_locked() instead of homerolled 2004-11-07 16:09:56 +00:00
phk
e65c41f01e More sensible FILEDESC_ locking. 2004-11-07 15:59:27 +00:00
phk
02a22fcc9e Move fdinit() related stuff from .h to .c 2004-11-07 15:34:45 +00:00
cognet
c35b680996 Don't abuse tp->t_sc in sl(4) either. 2004-11-07 14:36:47 +00:00
cognet
13ca89b942 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
phk
418eb9d34b 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
njl
d8a46083bd 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
phk
296b8c7706 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
alc
6314cca720 Eliminate an unnecessary atomic operation. Articulate the rationale in
a comment.
2004-11-06 21:48:45 +00:00
phk
b877b7a042 Get even closer to not crashing ext2fs 2004-11-06 18:24:33 +00:00
phk
dc2dab730a Get closer to unbreaking ext2fs 2004-11-06 18:18:58 +00:00
pjd
13567c29de Be consistent and use 'if (error != 0)' instead of 'if (error)' everywhere. 2004-11-06 13:16:35 +00:00
pjd
d18ec52c75 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
rwatson
2b775a8633 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
phk
723cc1105c 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
phk
e582d20cf5 Increase default HZ for i386 to 1000 2004-11-06 11:33:43 +00:00
phk
8b96099f88 Remove dangling variable 2004-11-06 11:33:11 +00:00
rwatson
69064711c1 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
becc212fd3 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
das
9d935df169 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
keramida
8bc275db5e Clean up the comments, rewording, adding missing punctuation
and other minor nits.

Approved by:	jhb
2004-11-06 06:13:13 +00:00
alc
4030274372 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
9534fe12fd 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
cognet
78386f3ec2 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
davidxu
ab5ce77983 Respect TDF_SINTR, don't suspend uninterruptible thread. 2004-11-05 22:40:33 +00:00
davidxu
b917394798 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
jhb
080b7e2408 - 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
jhb
753a25978f Don't change the priority to PUSER when sleeping, just keep the current
priority.
2004-11-05 20:15:06 +00:00
cognet
108b7172d7 Copy the syscall args in a tmp variable instead of directly using the
trapframe, as it can be modified in the syscall.
Call thread_user_enter() when appropriate.
2004-11-05 19:57:10 +00:00
cognet
f326fc1a81 Save a few cycles in context switch.
Update comments to reflect reality.
2004-11-05 19:54:13 +00:00
cognet
ecc55fe51d If we're still running at the physical address, jump to the virtual address
instead before calling initarm().
This removes the need to map virtual == physical in initarm().
2004-11-05 19:52:55 +00:00