| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
PR: kern/126128
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- It is opt-out for now so as to give it maximum testing, but it may be
turned opt-in for stable branches depending on the consensus. You
can turn it off with WITHOUT_SSP.
- WITHOUT_SSP was previously used to disable the build of GNU libssp.
It is harmless to steal the knob as SSP symbols have been provided
by libc for a long time, GNU libssp should not have been much used.
- SSP is disabled in a few corners such as system bootstrap programs
(sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves.
- It should be safe to use -fstack-protector-all to build world, however
libc will be automatically downgraded to -fstack-protector because it
breaks rtld otherwise.
- This option is unavailable on ia64.
Enable GCC stack protection (aka Propolice) for kernel:
- It is opt-out for now so as to give it maximum testing.
- Do not compile your kernel with -fstack-protector-all, it won't work.
Submitted by: Jeremie Le Hen <jeremie@le-hen.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
locked and unlocked completely in userland. by locking and unlocking mutex
in userland, it reduces the total time a mutex is locked by a thread,
in some application code, a mutex only protects a small piece of code, the
code's execution time is less than a simple system call, if a lock contention
happens, however in current implemenation, the lock holder has to extend its
locking time and enter kernel to unlock it, the change avoids this disadvantage,
it first sets mutex to free state and then enters kernel and wake one waiter
up. This improves performance dramatically in some sysbench mutex tests.
Tested by: kris
Sounds great: jeff
|
|
|
|
|
|
|
| |
use stack space to keep cleanup information, this eliminates overhead of
calling malloc() and free() in thread library.
Discussed on: thread@
|
|
|
|
|
|
| |
so that they get the benefit of the (limited) forward ABI compatibility.
MFC after: 1 week
|
|
|
|
| |
a semaphore.
|
|
|
|
|
| |
- Remove unused flags MUTEX_FLAGS_* and their code.
- Check validity of the timeout parameter in mutex_self_lock().
|
| |
|
| |
|
|
|
|
| |
time in kernel(avoid VM lookup).
|
|
|
|
|
|
|
|
| |
testing it turns out 200 was too short to give good adaptive
performance.
Reviewed by: jeff
MFC after: 1 week
|
| |
|
|
|
|
|
|
| |
for some const dequalifiers that needs more careful investigation.
Ok'ed by: davidxu
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
returns errno, because errno can be mucked by user's signal handler and
most of pthread api heavily depends on errno to be correct, this change
should improve stability of the thread library.
|
|
|
|
|
|
| |
implementation does not switch pointers when it resumes waiters.
Asked by: jeff
|
| |
|
|
|
|
| |
static branch prediction.
|
|
|
|
|
|
|
| |
eliminates internal mutex lock contention when most rwlock operations
are read.
Orignal patch provided by: jeff
|
|
|
|
| |
build libkse. This should fix WITHOUT_LIBTHR builds as a side effect.
|
| |
|
|
|
|
| |
Reviewed by: davidxu
|
|
|
|
| |
time clock id.
|
|
|
|
|
| |
otherwise rwlock is recursivly called when signal happens and the __error
was never resolved before.
|
|
|
|
| |
unbreak it. We should really start compiling this with warnings.
|
|
|
|
| |
any case safe.
|
|
|
|
|
|
| |
conformant to POSIX specification.
Bug reported by: modelnine at modelnine dt org
|
|
|
|
| |
for it, since the new thread will reduce it by itself.
|
|
|
|
| |
- Use a different sigmask variable name to avoid confusing.
|
|
|
|
| |
to speed up searching.
|
|
|
|
|
|
|
|
| |
_thr_suspend_check() which messes sigmask saved in thread structure.
- Don't suspend a thread has force_exit set.
- In pthread_exit(), if there is a suspension flag set, wake up waiting-
thread after setting PS_DEAD, this causes waiting-thread to break loop
in suspend_common().
|
|
|
|
| |
be masked when it is resumed.
|
|
|
|
| |
check waiter and semphore counter to see if we may wake up next thread.
|
| |
|
| |
|
|
|
|
|
|
| |
that there might be starvations, but because we have already locked the
thread, the cpuset settings will always be done before the new thread
does real-world work.
|
|
|
|
| |
error caused by nested SIGCANCEL stack, it is a bit complex.
|
|
|
|
|
|
|
| |
we set scheduling parameters and cpu binding fully in userland, and
because default scheduling policy is SCHED_RR (time-sharing), we set
default sched_inherit to PTHREAD_SCHED_INHERIT, this saves a system
call.
|
| |
|
|
|
|
| |
of API.
|
|
|
|
|
|
|
|
| |
however if current thread is executing cancellation handler, signal
SIGCANCEL may have already been blocked, this is unexpected, unblock the
signal in new thread if this happens.
MFC after: 1 week
|
| |
|
| |
|