Sascha Wildner [Sat, 22 Jan 2011 07:17:36 +0000 (08:17 +0100)]
manpages: Fix some typos.
Sascha Wildner [Fri, 21 Jan 2011 23:46:48 +0000 (00:46 +0100)]
lwbuf.9: Remove trailing whitespace.
Matthew Dillon [Fri, 21 Jan 2011 23:18:56 +0000 (15:18 -0800)]
kernel - Conditionalize ipiq debugging
* Only print cm=... debug messages if ipiq_debug is enabled.
Matthew Dillon [Fri, 21 Jan 2011 18:02:31 +0000 (10:02 -0800)]
kernel - Fix lockup when debug.ktr.resynchronize is enabled
* The TSC resynchronization code can livelock the system due to the
manual hard loops it runs to try to synchronize the TSC's on all
cpus.
* Change the code to use the cpusync API. It will be less accurate but
it should no longer result in system livelocks.
Venkatesh Srinivas [Fri, 21 Jan 2011 11:37:57 +0000 (03:37 -0800)]
kernel -- vm_page: Remove ifdef for 8K page size.
Venkatesh Srinivas [Thu, 20 Jan 2011 22:44:15 +0000 (14:44 -0800)]
Remove sys/mplock2.h from more files.
Venkatesh Srinivas [Thu, 20 Jan 2011 10:28:05 +0000 (02:28 -0800)]
Update token(9) removing MPSAFE flag and adding description to lwkt_token_init.
Venkatesh Srinivas [Thu, 20 Jan 2011 10:18:00 +0000 (02:18 -0800)]
Remove mplock2.h include from files not using the mplock.
Sepherosa Ziehau [Thu, 20 Jan 2011 07:44:47 +0000 (15:44 +0800)]
pf_socket_lookup: Don't domsg, which could easily lockup network system
Sepherosa Ziehau [Thu, 20 Jan 2011 07:30:28 +0000 (15:30 +0800)]
pf_socket_lookup: lwkt_domsg is to be used, don't kmalloc the msg.
Matthew Dillon [Thu, 20 Jan 2011 06:41:08 +0000 (22:41 -0800)]
test - Make fsstress compile under x86-64
* Fix compile errors and warnings when compiling fsstress on x86-64
Matthew Dillon [Thu, 20 Jan 2011 06:40:03 +0000 (22:40 -0800)]
kernel - Remove mplock shims from global tokens
* cleanup (remove remaining sysctls).
Matthew Dillon [Thu, 20 Jan 2011 06:29:17 +0000 (22:29 -0800)]
kernel - Remove mplock shims from global tokens
* Remove the mplock safety shims from all global tokens.
* Remove the mplock flag and API arguments. All tokens
are now always MPSAFE.
Matthew Dillon [Thu, 20 Jan 2011 04:30:15 +0000 (20:30 -0800)]
HAMMER VFS - vfs.hammer.double_buffer adjustments
* Do not try to use the (currently broken) _vnode_validate() to
validate de-dup data when double_buffer is turned on. Use the
device buffer cache instead.
Sepherosa Ziehau [Thu, 20 Jan 2011 03:39:53 +0000 (11:39 +0800)]
ipflow: Use CPUMASK
Venkatesh Srinivas [Thu, 20 Jan 2011 02:35:51 +0000 (18:35 -0800)]
kernel -- tmpfs: MPSAFE tmpfs_getattr.
Use the per-mount token to synchronize tmpfs_getattr.
Venkatesh Srinivas [Thu, 20 Jan 2011 02:16:35 +0000 (18:16 -0800)]
Update lwbuf(9) manpage for recent lwbuf_alloc change.
Matthew Dillon [Thu, 20 Jan 2011 01:27:46 +0000 (17:27 -0800)]
kernel - Optimize the x86-64 lwbuf API
* Change lwbuf_alloc(m) to lwbuf_alloc(m, &lwb_cache), passing a pointer to
a struct lwb which lwbuf_alloc() may used if it desires.
* The x86-64 lwbuf_alloc() now just fills in the passed lwb and returns it.
The i386 lwbuf_alloc() still uses the objcache w/ its kva mappings. This
removes objcache calls from the critical path.
* The x86-64 lwbuf_alloc()/lwbuf_free() functions are now inlines (ALL x86-64
lwbuf functions are now inlines).
Matthew Dillon [Wed, 19 Jan 2011 22:11:10 +0000 (14:11 -0800)]
kernel - Fix deadlock assertion panic with mmap/read combos
* Normally the uiomove() is called with the buffer locked. When
uiomove()ing into mmap'd memory this can cause a lock recursion and
panic, or a deadlock.
* Fix the problem by adding bqhold() and bqdrop() and adjusting the use
of the b_refs field to prevent the buffer from being invalidated,
allowing VFS VOP_READ operations to release the buffer prior to the
uiomove() into user memory.
* Adjust brelse() and getnewbuf() to do the right thing. Note that there
are two cases where b_refs can transition from 0->1. The VFS
release/uiomove case will only transition b_refs while the buffer is
locked while findblk() will transition b_refs at any time (while holding
the spin lock). We only care about retaining the VM pages in the
transition-during-locked case.
* Original problem reproducable with
grep -r --mmap SomeString /usr/pkgsrc
Reported-by: YONETANI Tomokazu <qhwt.dfly@les.ath.cx>
Matthew Dillon [Wed, 19 Jan 2011 19:12:47 +0000 (11:12 -0800)]
kernel - Use atomic ops for devstat's ds->busy_count field.
* Use atomic ops to manage the busy_count field as these functions can
be called MP.
* This should avoid negative busy_count transitions due to MP races on the
field.
Reported-by: Peter Avalos <peter@theshell.com>
Sascha Wildner [Wed, 19 Jan 2011 09:31:01 +0000 (10:31 +0100)]
kernel: Some more style fixes.
Sascha Wildner [Wed, 19 Jan 2011 09:23:22 +0000 (10:23 +0100)]
cd9660: Style fix.
Sascha Wildner [Mon, 17 Jan 2011 22:42:38 +0000 (23:42 +0100)]
libc: Fix warnings fallout from the change to CSTD=gnu99.
Sascha Wildner [Mon, 17 Jan 2011 20:32:02 +0000 (21:32 +0100)]
groff: Raise WARNS to 1.
Sascha Wildner [Mon, 17 Jan 2011 20:31:47 +0000 (21:31 +0100)]
devd(8): Raise WARNS to 5 and fix a warning.
Sascha Wildner [Mon, 17 Jan 2011 20:17:50 +0000 (21:17 +0100)]
lib/libncp: Silence some warnings that cropped up with CSTD=gnu99.
Sascha Wildner [Mon, 17 Jan 2011 20:11:04 +0000 (21:11 +0100)]
compile_et(1): Set CSTD to gnu89 (compile_et(1) is in contrib/).
Sepherosa Ziehau [Mon, 17 Jan 2011 15:17:24 +0000 (23:17 +0800)]
x86_64 intr: Support upto 192 IDT entries in ipl and intr vector asm code
Most parts are same as following commit on i386:
c263294b570bc9641fe5184b066fd801803046a4
except that 64bits mask array is used.
Things like (1UL << $const_val) does not work in .s file; currently
"movq $1,%rcx; shlq $const_val,%rcx;" is used instead.
Sepherosa Ziehau [Mon, 17 Jan 2011 13:46:11 +0000 (21:46 +0800)]
icu: Remove unused macros
Sepherosa Ziehau [Mon, 17 Jan 2011 08:54:49 +0000 (16:54 +0800)]
x86_64 madt: Remove unapplicable comment
Sascha Wildner [Mon, 17 Jan 2011 08:18:51 +0000 (09:18 +0100)]
NELEM: Take back the sys/boot part. We'll care about that later.
Sascha Wildner [Mon, 17 Jan 2011 08:03:15 +0000 (09:03 +0100)]
kernel: Use NELEM() where we can.
Sascha Wildner [Mon, 17 Jan 2011 05:16:09 +0000 (06:16 +0100)]
kernel: Use NELEM() in a few more places and nuke private arysize()'s.
Sepherosa Ziehau [Mon, 17 Jan 2011 02:15:37 +0000 (10:15 +0800)]
udp ctlport: We should call udp_addrcpu() instead of INP_MPORT_HASH_UDP()
This is the leftover after we serialize UDP user space output to CPU0
Reported-by: pavalos@
Sascha Wildner [Sun, 16 Jan 2011 22:44:07 +0000 (23:44 +0100)]
Unbreak buildworld.
Sascha Wildner [Sun, 16 Jan 2011 19:52:02 +0000 (20:52 +0100)]
Set CSTD back to gnu89 for tip(1) too (this needs cleanup).
Sascha Wildner [Sun, 16 Jan 2011 19:51:22 +0000 (20:51 +0100)]
Set CSTD back to gnu89 again for various contrib/ related stuff.
Sascha Wildner [Sun, 16 Jan 2011 09:29:19 +0000 (10:29 +0100)]
Revert "Lower some WARNS from 1 to 0. This needs more work."
This reverts commit
e49a8a3866b68864b4b89ab47dbe8f878d7abaa2.
Leave the WARNS where they are. We'll lower CSTD instead.
Sascha Wildner [Sun, 16 Jan 2011 09:43:20 +0000 (10:43 +0100)]
vi(1): Add some missing CLEANFILES.
Sascha Wildner [Sun, 16 Jan 2011 08:28:06 +0000 (09:28 +0100)]
Pluck options which are not applicable to C++ out of the C++ command line.
-Wnested-externs
-W*-prototypes
-Wno-pointer-sign
-Wold-style-definition
Also, ignore -std=... for the moment. It's set globally to gnu99 now and
that leads to warnings in C++ compilation. We'll ponder other ways to cope
with this later.
This commit will allow us to raise WARNS further for C++.
Taken-from: FreeBSD
Sascha Wildner [Sun, 16 Jan 2011 07:06:43 +0000 (08:06 +0100)]
Use CSTD and remove local CSTD settings which are no longer needed.
Also, stick with gnu89 for lib/liblvm and libexec/tcpd for now.
Sascha Wildner [Sun, 16 Jan 2011 04:55:31 +0000 (05:55 +0100)]
Set the C standard we use for compiling userland to gnu99.
Sascha Wildner [Sun, 16 Jan 2011 04:53:01 +0000 (05:53 +0100)]
Lower some WARNS from 1 to 0. This needs more work.
Sascha Wildner [Sun, 16 Jan 2011 04:51:04 +0000 (05:51 +0100)]
cam: Fix for missing prototypes (userland).
Sascha Wildner [Sun, 16 Jan 2011 04:49:11 +0000 (05:49 +0100)]
libkern: Add missing prototype for userland.
Sascha Wildner [Sun, 16 Jan 2011 04:46:06 +0000 (05:46 +0100)]
symorder(1): Fix for missing prototypes.
Sascha Wildner [Sun, 16 Jan 2011 04:44:50 +0000 (05:44 +0100)]
ppp(8): Fix for missing prototypes.
Sascha Wildner [Sun, 16 Jan 2011 04:39:44 +0000 (05:39 +0100)]
kzip(8): Clean up a bit and raise WARNS to 2.
Sascha Wildner [Sun, 16 Jan 2011 04:26:19 +0000 (05:26 +0100)]
rpc.statd(8): Fix for missing prototypes.
Sascha Wildner [Sun, 16 Jan 2011 04:24:56 +0000 (05:24 +0100)]
rpc.ypxfrc(8): Fix for missing prototypes.
Sascha Wildner [Sun, 16 Jan 2011 04:18:09 +0000 (05:18 +0100)]
rtadvd(8): Fix for missing prototypes.
Sascha Wildner [Sun, 16 Jan 2011 04:12:56 +0000 (05:12 +0100)]
fsck(8): Fix for missing prototypes.
Sascha Wildner [Sun, 16 Jan 2011 04:09:23 +0000 (05:09 +0100)]
liby: Add yyparse() prototype.
Sepherosa Ziehau [Sun, 16 Jan 2011 08:08:42 +0000 (16:08 +0800)]
x86_64 apic: Remove no longer applicable comment
Sepherosa Ziehau [Sun, 16 Jan 2011 08:07:22 +0000 (16:07 +0800)]
x86_64 intr: Don't pass the vector name to INTR_HANDLER
Sepherosa Ziehau [Sun, 16 Jan 2011 08:02:35 +0000 (16:02 +0800)]
x86_64 intr: We no longer have the fast version of intr vectors
Sepherosa Ziehau [Sun, 16 Jan 2011 07:50:47 +0000 (15:50 +0800)]
x86_64 icu: Strip extra blank lines
Sepherosa Ziehau [Sun, 16 Jan 2011 07:47:58 +0000 (15:47 +0800)]
x86_64 icu: Remove no onger applicable comment
Sepherosa Ziehau [Sun, 16 Jan 2011 07:41:01 +0000 (15:41 +0800)]
x86_64 intr_abi: Reindent
Sepherosa Ziehau [Sun, 16 Jan 2011 06:12:53 +0000 (14:12 +0800)]
ioapic: Use shll in APIC_INTR{DIS,EN}
Sepherosa Ziehau [Sat, 15 Jan 2011 15:30:25 +0000 (23:30 +0800)]
ioapic: macro renaming
Consistent with i386. No functional changes
Sascha Wildner [Sun, 16 Jan 2011 06:42:47 +0000 (07:42 +0100)]
dloader: Add missing prototype.
Sascha Wildner [Sun, 16 Jan 2011 03:24:04 +0000 (04:24 +0100)]
Move CSTD out of NO_WARNS (i.e., it shall apply too if NO_WARNS is set).
Sascha Wildner [Sat, 15 Jan 2011 12:23:49 +0000 (13:23 +0100)]
twa(4): Fix some __printflike() issues I overlooked previously.
Sepherosa Ziehau [Sat, 15 Jan 2011 12:02:34 +0000 (20:02 +0800)]
tcp: Don't panic if persist timer is started in CLOSED and TERMINATING
Persistent timer could go wrong only when SYN is to be turned on in
tcp_output(), however, CLOSED and TERMINATING states' flags does not
contain SYN at all. And starting persistent timer in CLOSED state is
absolutely valid, e.g. from tcp_drop()
Reported-by: dillon@
Sascha Wildner [Sat, 15 Jan 2011 02:43:46 +0000 (03:43 +0100)]
Add __printflike's where possible and fix all related bugs & issues.
Matthew Dillon [Fri, 14 Jan 2011 04:56:05 +0000 (20:56 -0800)]
kernel - Fix maximum file size limit for NFSv3
* Remove throwback from an older era where the buffer cache used 32 bit
block numbers.
* Maximum file size for NFSv3 is not 2^63-1
Reported-by: Rick Macklem <rmacklem@uoguelph.ca>
Matthew Dillon [Fri, 14 Jan 2011 02:44:22 +0000 (18:44 -0800)]
kernel - Fix an inefficiency in wait*()
* The exit code was not taking into account the fact that a parent
process might race an exiting child, causing a tsleep(... "lwpzomb", hz)
to delay an entire second.
Issue the proper wakeup in all cases where p->p_nthreads drops to 1 or 0.
* Improves buildworld performance a little.
YONETANI Tomokazu [Thu, 13 Jan 2011 00:14:35 +0000 (09:14 +0900)]
pf: statekey needs to be initialized for IPv6, too.
This fixes the panic described in issue1956.
Matthew Dillon [Wed, 12 Jan 2011 20:12:04 +0000 (12:12 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Venkatesh Srinivas [Wed, 12 Jan 2011 20:09:37 +0000 (12:09 -0800)]
Merge branch 'master' of /repository/git/dragonfly
Matthew Dillon [Wed, 12 Jan 2011 20:08:11 +0000 (12:08 -0800)]
kernel - Fix minor build error when building without INVARIANTS
* Fix an unused variable when building without INVARIANTS that was
tripping up the kernel compile.
Venkatesh Srinivas [Wed, 12 Jan 2011 19:43:30 +0000 (11:43 -0800)]
kernel -- tmpfs: Make tmpfs_strategy MPSAFE.
tmpfs_strategy now acquires only the per-mount token directly.
Venkatesh Srinivas [Wed, 12 Jan 2011 05:46:31 +0000 (21:46 -0800)]
kernel -- tmpfs: Make tmpfs_read() MPSAFE.
tmpfs_read() no longer takes the MPlock or per-mount token via the VOP
callbacks. It obtains the mount token itself around the uncached read path.
Matthew Dillon [Wed, 12 Jan 2011 03:43:23 +0000 (19:43 -0800)]
HAMMER VFS - Remove B-Tree allocation hints, add double_buffer option.
* Remove the allocation hints when allocating b-tree nodes and
remove over-full test in the blockmap allocator for b-tree and
meta-data elements.
The hinting and leaving some space unused in the big-blocks did
not improve performance. Write performance is actually slightly
better when new allocations are made linearly.
* Either way we have to depend on the reblocker to reorganize the
B-Tree.
* Add a sysctl vfs.hammer.double_buffer, defaulting to off. This
is currently used for debugging and testing live-dedup.
Normally only small-data blocks are run through the device vnode's
buffer cache (allowing us to consolidate many small data blocks
within the device vnode's buffer cache), and large data blocks are
read directly into the file vnode's buffer.
Turning on double_buffer cases ALL file data to run through the
device vnode's buffer cache, resulting in double data caching
which is not normally useful, so leave this off for now. It will
not improve performance.
Sascha Wildner [Wed, 12 Jan 2011 03:07:59 +0000 (04:07 +0100)]
bus_dma.9: Document the recently added flags for bus_dma_tag_create().
Matthew Dillon [Wed, 12 Jan 2011 00:37:06 +0000 (16:37 -0800)]
HAMMER VFS - Unlock around uiomove
* Unlock the uncached read path's lock and the write path's lock
around the uiomove(). The cached read path is already unlocked
around the uiomove().
* Results in a marginal improvement in concurrency. Full buffers (64K)
are large enough to warrent the unlock/relock.
Matthew Dillon [Tue, 11 Jan 2011 22:36:24 +0000 (14:36 -0800)]
kernel - Fix very annoying lockup (SMP)
* Fix an extremely annoying lockup that took a week+ to find. The cpusync
code is rather fragile and any for (;;) or while (1) style loops in the
kernel can trip it up and cause a deadlock. These loops are careful to
call lwkt_process_ipiq() to ensure that cpusync processing occurs.
However, there is a race in the LWKT thread migration code where a thread
deschedules itself on one cpu and schedules itself on another via a remote
ipi. The target cpu expects the thread's TDF_RUNNING state to clear and
will loop until that happens.
An IPI could sneak itself into the deschedule/lwkt_switch() path and
deadlock against a cpusync, preventing the thread from leaving the
TDF_RUNNING state.
The solution is to ensure that lwkt_process_ipiq() is *NOT* run in
the lwkt_switch() path if the calling thread has descheduled itself.
* The original bug could be reproduced by running blogbench in one window
and a while (1) ps axl shell script in another.
* Add DEBUG_PUSH_INFO(msg)/DEBUG_POP_INFO() macros which record (msg)
in the globaldata structure as a debugging aid.
* Remove unused platform/pc64/x86_64/systimer.c file. The entire contents
of this file was #ifdef'd out and its functionality is handled elsewhere
by the lapic timer code.
* #if 0 out numerous debugging bits but don't remove the code because it
is extremely useful for finding lockup conditions.
Matthew Dillon [Tue, 11 Jan 2011 09:19:55 +0000 (01:19 -0800)]
kernel - Enhance getcacheblk() (improve saturated write performance (3)).
* Change getcacheblk() to use getblk() instead of findblk() when the
block size is known, allowing a cached buffer to be reinstantiated
from VM backing store in the MPSAFE path.
Well, mostly MPSAFE, the vm_token is still acquired, but this is still
much faster than what HAMMER does when the buffer is not in-cache.
* This more than doubles blogbench performance w/HAMMER and further reduces
concurrent read vs write conflicts.
Matthew Dillon [Tue, 11 Jan 2011 09:19:19 +0000 (01:19 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 11 Jan 2011 07:17:34 +0000 (23:17 -0800)]
HAMMER VFS - Improve saturated write performance (2).
* Change the dirty io buffer lists from TAILQs to Red-Black trees.
* The dirty io buffers are sorted by disk address on a flush-group by
flush-group basis and I/O writes are initiated in sorted order.
This significantly improves write I/O throughput to normal HDs.
Essentially what is happening here is that the sheer number of
unsorted buffers are overwhelming the HDs own caches. Having HAMMER
pre-sort the buffers, of which there can be upwards of 100MBs worth,
allow the HD to write more optimally.
Matthew Dillon [Tue, 11 Jan 2011 02:07:20 +0000 (18:07 -0800)]
HAMMER VFS - Improve saturated write performance.
* Change vfs.hammer.limit_reclaim to auto-scale to 1/10 the maximum
number of vnodes, instead of using a fixed value of 4000. On a
typical i386 box this will be around ~10000 and on a typical x86-64
box this will be ~50000.
* Greatly reduce the vfs.hammer.autoflush default from 2000 inodes
to 500 inodes.
This results in better locality of reference within the flush groups
and better pipelining when the reclaim limit is approached (when the
vnode cache is saturated).
* Refactor the sequencing of the hammer_flush_group structure, fixing
a number of issues which caused the structures to hold an inconsistent
number of inodes.
* Refactor the flusher's sequence space management.
* Blogbench performance is greatly improved, as is mixed random read/write
I/O in general.
Note, however, that typical production operations do not involve
hundreds of thousands of files and will not be impacted as much.
Venkatesh Srinivas [Tue, 11 Jan 2011 04:19:28 +0000 (23:19 -0500)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Venkatesh Srinivas [Tue, 11 Jan 2011 04:09:35 +0000 (23:09 -0500)]
Remove prototype of disksort().
Venkatesh Srinivas [Tue, 11 Jan 2011 04:01:02 +0000 (20:01 -0800)]
kernel -- kref: Add KREF_DEC macro to allow braced blocks for destructors.
Convert sfbuf to use braced blocks on unref.
Matthew Dillon [Mon, 10 Jan 2011 23:42:24 +0000 (15:42 -0800)]
HAMMER VFS - Change default hammer fs version from 4 to 5
* change the default hammer fs from 4 to 5. newfs_hammer calls with
newly built worlds will now create version 5 by default.
The version 5 filesystem media format supports de-dup.
Matthew Dillon [Mon, 10 Jan 2011 23:39:47 +0000 (15:39 -0800)]
HAMMER VFS - Implement Version 6 features as WIP (work in progress)
* Add a new directory hash which generates segmented CRC and then adds
them together for the filename.
This tends to result in a directory key offset instead of a complete
re-randomization when a temporary file extension is renamed to its base
filename.
Numerous programs create temporary files and then rename them. This
tends to maintain inode number / directory name entry ordering a bit
better.
* This is a work in progress version. Production systems should not upgrade
their HAMMER filesystem to version 6 at this time.
Matthew Dillon [Mon, 10 Jan 2011 23:37:01 +0000 (15:37 -0800)]
kernel64 - Add some lapic timer based debugging (disabled by default)
* Adjust the Xtimer interrupt to unconditionally call
lapic_timer_always() regardless of the critical section state.
* Create a procedure lapic_timer_always() on x86-64 which is #if 0'd
out by default with some on-screen debugging that can be used to
help find system lockups.
Matthew Dillon [Mon, 10 Jan 2011 23:31:29 +0000 (15:31 -0800)]
kernel - Do a better job with the filesystem background sync
* Adjust code for MNT_LAZY, MNT_NOWAIT, and MNT_WAITOK to reflect
the fact that they are three different flags and not enumeration
constants.
* HAMMER now sets VMSC_ONEPASS for MNT_LAZY syncs (background filesystem
sync). This generally reduces instances where the background sync
winds up running continuously when heavy filesystem ops saturate
the disk. Fewer vnodes dirtied after the sync is initiated will get
caught up in the sync.
Matthew Dillon [Mon, 10 Jan 2011 23:26:31 +0000 (15:26 -0800)]
kernel - Refactor VMSC_ONEPASS
* Refactor the VMSC_ONEPASS flag to only iterate the current number
of vnodes associated with a mount point, instead of 2x the vnodes.
This makes 'sync' a bit more consistent in the face of heavy filesystem
activity.
Matthew Dillon [Mon, 10 Jan 2011 23:25:47 +0000 (15:25 -0800)]
kernel - Ensure rover in vfs_cache is not optimized.
* Add a cpu_ccfence() to ensure that the static rover variable is
not optimized by the compiler.
Matthew Dillon [Mon, 10 Jan 2011 23:17:25 +0000 (15:17 -0800)]
kernel - refactor cpusync and pmap_inval code, fix lockup
* Simplify the cpusync API. The API now has only one initialization call,
one simplified rollup call, and two primary calls handling a single
function callback (instead of three callbacks).
cpusync_interlock() interlocks the specified set of cpus and ensures they
are running in a safe place, cpusync_deinterlock() executes the initialized
function on the cpu set and does not return until all cpus have completed
the operation.
* Simplify the pmap_inval per-platform API. pmap_inval_interlock() and
pmap_inval_deinterlock() now reflect similar functionality to the cpusync
API. pmap/pte operations are now synchronized when pmap_inval_deinterlock()
is called and not when pmap_inval_done() is called, reducing the range of
code which can execute while the cpu set is held quiescent.
pmap_inval_flush() has been removed. Critical section handling has also
been rearranged slightly in the pmap_inval* and cpusync* APIs.
* Fixes a cpusync lockup which occurs when the x86-64 pmap and pmap_inval
code is used to hold a cpu mask quiescent across complex subsystem calls.
Primarily accomplished by moving the synchronization out of
pmap_inval_flush() and into pmap_inval_deinterlock().
Sascha Wildner [Sun, 9 Jan 2011 16:15:28 +0000 (17:15 +0100)]
x86_64: Put the x86_64 specific "seg-fault..." message under bootverbose.
Reported-by: John Marino
Sepherosa Ziehau [Thu, 6 Jan 2011 15:53:19 +0000 (23:53 +0800)]
intr: Support upto 192 IDT entries in ipl and intr vector asm code
Remove 32bits gd_fpending mask and add 32bits gd_ipending mask array
which has 6 elements. This allows 192 intrs to be pending.
192 is chosen, because the first 32 entries in IDT is reserved, while
the last 32 entries in IDT are used for IPIs.
This paves the way toward correcting interrupt routing using MPTable
or ACPI and supporting MSI and MSI-X
Sepherosa Ziehau [Thu, 6 Jan 2011 04:59:22 +0000 (12:59 +0800)]
apic: Remove no longer applicable comment
Sepherosa Ziehau [Thu, 6 Jan 2011 04:51:09 +0000 (12:51 +0800)]
intr: Don't pass the vector name to INTR_HANDLER
Sepherosa Ziehau [Thu, 6 Jan 2011 04:34:33 +0000 (12:34 +0800)]
intr: We no longer have the fast version of intrs
Sepherosa Ziehau [Thu, 6 Jan 2011 04:30:56 +0000 (12:30 +0800)]
icu: Strip extra blank lines
Sepherosa Ziehau [Thu, 6 Jan 2011 04:29:44 +0000 (12:29 +0800)]
icu: Remove no onger applicable comment
Sepherosa Ziehau [Thu, 6 Jan 2011 04:28:14 +0000 (12:28 +0800)]
intr_abi: Reindent