| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
spin-wait code to use the same spin mutex (smp_tlb_mtx) as the TLB ipi
and spin-wait code snippets so that you can't get into the situation of
one CPU doing a TLB shootdown to another CPU that is doing a lazy pmap
shootdown each of which are waiting on each other. With this change, only
one of the CPUs would do an IPI and spin-wait at a time.
Notes:
svn path=/head/; revision=133139
|
|
|
|
|
|
|
|
|
|
|
| |
the immediate awakening of proc0 (scheduler kproc, controls swapping
processes in and out). The scheduler process periodically awakens already,
so this will not result in processes not being swapped in, there will just
be more latency in between a thread being made runnable and the scheduler
waking up to swap the affected process back in.
Notes:
svn path=/head/; revision=133138
|
|
|
|
|
|
|
|
|
|
|
|
| |
macros and pass the value to the associated _mtx_*() functions to avoid
more curthread dereferences in the function implementations. This provided
a very modest perf improvement in some benchmarks.
Suggested by: rwatson
Tested by: scottl
Notes:
svn path=/head/; revision=133137
|
|
|
|
|
|
|
|
|
|
| |
a sleep() call waking up in namei(), a later assertion triggers that
Giant is not held. By asserting Giant at the start of namei(), we can
know that if that assertion triggers, Giant is lost during the call to
namei(), and not before.
Notes:
svn path=/head/; revision=133131
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Function Reason
-------- ------
fdfree() VFS
setugidsafety() KQueue
fdcheckstd() VFS
_fgetvp() VFS
fgetsock() Conditional assertion based on debug.mpsafenet
Notes:
svn path=/head/; revision=133130
|
|
|
|
| |
Notes:
svn path=/head/; revision=133126
|
|
|
|
|
|
|
|
|
|
|
|
| |
being defined, define and use a new MD macro, cpu_spinwait(). It only
expands to something on i386 and amd64, so the compiled code should be
identical.
Name of the macro found by: jhb
Reviewed by: jhb
Notes:
svn path=/head/; revision=133084
|
|
|
|
|
|
|
|
| |
Pointed out by: bde
Reviewed by: rwatson
Notes:
svn path=/head/; revision=133078
|
|
|
|
|
|
|
|
|
|
|
|
| |
pipelock(), not via a mixture of mutexes and pipelock(). Additionally,
add a few KASSERTS, and change some statements that should have been
KASSERTS into KASSERTS.
As a result of these cleanups, some segments of code have become
significantly shorter and/or easier to read.
Notes:
svn path=/head/; revision=133049
|
|
|
|
|
|
|
| |
Dicussed with: deischen
Notes:
svn path=/head/; revision=133047
|
|
|
|
|
|
|
| |
"Do not apply your tested patches to your commit tree by hand"
Notes:
svn path=/head/; revision=133045
|
|
|
|
| |
Notes:
svn path=/head/; revision=133043
|
|
|
|
|
|
|
| |
Cap value chosen by: scottl
Notes:
svn path=/head/; revision=133038
|
|
|
|
| |
Notes:
svn path=/head/; revision=132990
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
so that they know whether the allocation is supposed to be able to sleep
or not.
* Allow uma_zone constructors and initialation functions to return either
success or error. Almost all of the ones in the tree currently return
success unconditionally, but mbuf is a notable exception: the packet
zone constructor wants to be able to fail if it cannot suballocate an
mbuf cluster, and the mbuf allocators want to be able to fail in general
in a MAC kernel if the MAC mbuf initializer fails. This fixes the
panics people are seeing when they run out of memory for mbuf clusters.
* Allow debug.nosleepwithlocks on WITNESS to be disabled, without changing
the default.
Both bmilekic and jeff have reviewed the changes made to make failable
zone allocations work.
Notes:
svn path=/head/; revision=132987
|
|
|
|
|
|
|
| |
Reviewed by: davidxu
Notes:
svn path=/head/; revision=132985
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and refuse initializing filesystems with a wrong version. This will
aid maintenance activites on the 5-stable branch.
s/vfs_mount/vfs_omount/
s/vfs_nmount/vfs_mount/
Name our filesystems mount function consistently.
Eliminate the namiedata argument to both vfs_mount and vfs_omount.
It was originally there to save stack space. A few places abused
it to get hold of some credentials to pass around. Effectively
it is unused.
Reorganize the root filesystem selection code.
Notes:
svn path=/head/; revision=132902
|
|
|
|
|
|
|
| |
Eliminate it acquisition and release around vm_waitproc() in kern_wait().
Notes:
svn path=/head/; revision=132898
|
|
|
|
| |
Notes:
svn path=/head/; revision=132866
|
|
|
|
|
|
|
| |
Obtained from: Darwin
Notes:
svn path=/head/; revision=132856
|
|
|
|
|
|
|
|
|
|
| |
Before this change every zombie process were reported as an owner of PID 0 in
ps(1) output.
Reviewed by: julian
Notes:
svn path=/head/; revision=132855
|
|
|
|
|
|
|
|
|
|
|
| |
Add local rootvp variables as needed.
Remove checks for miniroot's in the swappartition. We never did that
and most of the filesystems could never be used for that, but it had
still been copy&pasted all over the place.
Notes:
svn path=/head/; revision=132805
|
|
|
|
| |
Notes:
svn path=/head/; revision=132776
|
|
|
|
|
|
|
| |
purpose.
Notes:
svn path=/head/; revision=132773
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce vfs_byname() function to find things on it.
Staticize vfs_nmount() function under the name vfs_donmount().
Various cleanups.
Notes:
svn path=/head/; revision=132710
|
|
|
|
|
|
|
|
|
|
|
|
| |
dereference curthread. It is called only from critical_{enter,exit}(),
which already dereferences curthread. This doesn't seem to affect SMP
performance in my benchmarks, but improves MySQL transaction throughput
by about 1% on UP on my Xeon.
Head nodding: jhb, bmilekic
Notes:
svn path=/head/; revision=132700
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
an adaptive fashion when adaptive mutexes are enabled. The theory
behind non-adaptive Giant is that Giant will be held for long periods
of time, and therefore spinning waiting on it is wasteful. However,
in MySQL benchmarks which are relatively Giant-free, running Giant
adaptive makes an observable difference on SMP (5% transaction rate
improvement). As such, make adaptive behavior on Giant an option so
it can be more widely benchmarked.
Notes:
svn path=/head/; revision=132698
|
|
|
|
|
|
|
|
|
|
|
| |
- Push down Giant into shmexit(). (Giant is acquired only if the vmspace
contains shm segments.)
- Eliminate the acquisition of Giant from proc_rwmem().
- Reduce the scope of Giant in exit1(), uncovering the destruction of the
address space.
Notes:
svn path=/head/; revision=132684
|
|
|
|
|
|
|
|
|
|
|
|
| |
switch in fork_exit() to before anything else is done (but keep
schedlock for the deadthread check). This means one less
nasty bug if ever in the future whatever might have been called
before the update played with schedlock or critical sections.
Discussed with: tjr
Notes:
svn path=/head/; revision=132682
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the system" resource limit code: When checking if the caller has superuser
privileges, we should be checking the *real* user, not the *effective*
user. (In general, resource limiting is done based on the real user, in
order to avoid resource-exhaustion-by-setuid-program attacks.)
Now that a SUSER_RUID flag to suser_cred exists, use it here to return
this code to its correct behaviour.
Pointed out by: rwatson
Notes:
svn path=/head/; revision=132655
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
somewhat clearer, but more importantly allows for a consistent naming
scheme for suser_cred flags.
The old name is still defined, but will be removed in a few days (unless I
hear any complaints...)
Discussed with: rwatson, scottl
Requested by: jhb
Notes:
svn path=/head/; revision=132653
|
|
|
|
|
|
|
|
| |
last commit; this assertion was provided by jhb for local debugging
and not intended for broader consumption.
Notes:
svn path=/head/; revision=132646
|
|
|
|
|
|
|
| |
td into unp_connect() instead of reading curthread.
Notes:
svn path=/head/; revision=132645
|
|
|
|
|
|
|
|
|
| |
here, close some races that existed in the pre-locking world during low
memory conditions. This locking isn't perfect, but it's closer than
before.
Notes:
svn path=/head/; revision=132644
|
|
|
|
|
|
|
| |
accordingly.
Notes:
svn path=/head/; revision=132640
|
|
|
|
| |
Notes:
svn path=/head/; revision=132639
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the license from /usr/src/COPYRIGHT. Since cvs annotate shows that
this was written by jasone, julian, jhb, peter, bmilekic and obrien.
cvs log shows that many others may have contributed to this file. As
such, go ahead and use the author of 'FreeBSD Project' for this file.
If this is a problem, please notify me.
# this eliminates the last file in the kernel with an indirect reference
# to /usr/src/COPYRIGHT in the kernel. A few more in userland remain.
Notes:
svn path=/head/; revision=132637
|
|
|
|
| |
Notes:
svn path=/head/; revision=132628
|
|
|
|
|
|
|
| |
diff reduction for upcoming commit.
Notes:
svn path=/head/; revision=132592
|
|
|
|
|
|
|
| |
Submitted by: bde
Notes:
svn path=/head/; revision=132589
|
|
|
|
| |
Notes:
svn path=/head/; revision=132587
|
|
|
|
|
|
|
| |
in the way of debugging.
Notes:
svn path=/head/; revision=132586
|
|
|
|
|
|
|
|
| |
KVA for explicitly managed mappings, i.e., mappings created with
pmap_qenter().
Notes:
svn path=/head/; revision=132585
|
|
|
|
|
|
|
| |
what event mask has been compiled into the kernel.
Notes:
svn path=/head/; revision=132583
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
can't yet be referenced by other threads.
In microbenchmarks, this appears to reduce the cost of
pipe();close();close() on UP by 10%, and SMP by 7%. The vast majority
of the cost of allocating a pipe remains VM magic.
Suggested by: silby
Notes:
svn path=/head/; revision=132579
|
|
|
|
|
|
|
| |
in preference to curthread, which costs slightly more.
Notes:
svn path=/head/; revision=132568
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Giant conditional on debug.mpsafenet in the socket soo_stat() routine,
unconditionally in vn_statfile() for VFS, and otherwise don't acquire
Giant. Accept an unlocked read in kqueue_stat(), and cryptof_stat() is
a no-op. Don't acquire Giant in fstat() system call.
Note: in fdescfs, fo_stat() is called while holding Giant due to the VFS
stack sitting on top, and therefore there will still be Giant recursion
in this case.
Notes:
svn path=/head/; revision=132554
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
individual file object implementations can optionally acquire Giant if
they require it:
- soo_close(): depends on debug.mpsafenet
- pipe_close(): Giant not acquired
- kqueue_close(): Giant required
- vn_close(): Giant required
- cryptof_close(): Giant required (conservative)
Notes:
Giant is still acquired in close() even when closing MPSAFE objects
due to kqueue requiring Giant in the calling closef() code.
Microbenchmarks indicate that this removal of Giant cuts 3%-3% off
of pipe create/destroy pairs from user space with SMP compiled into
the kernel.
The cryptodev and opencrypto code appears MPSAFE, but I'm unable to
test it extensively and so have left Giant over fo_close(). It can
probably be removed given some testing and review.
Notes:
svn path=/head/; revision=132549
|
|
|
|
|
|
|
|
|
|
|
|
| |
thread-local pointer, in practice that thread needs to be curthread. If
we're running with INVARIANTS, generate a warning if not. If we have
KDB compiled in, generate a stack trace. This doesn't fire at all in my
local test environment, but could be irritating if it fires frequently
for someone, so there will be motivation to fix things quickly when it
does.
Notes:
svn path=/head/; revision=132548
|
|
|
|
|
|
|
|
| |
switching to a different thread. This is just a hack to try to improve
stability some more, but likely points closer to the real culprit.
Notes:
svn path=/head/; revision=132543
|