| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Reviewed by: rwatson (mac provider)
Approved by: re (glebius)
MFC after: 1 week
|
|
|
|
|
|
| |
cast the pointer to avoid incorrect pointer scaling.
MFC after: 1 Week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- DTrace scripts to check for errors, performance, ...
they serve mostly as examples of what you can do with the static probe;s
with moderate load the scripts may be overwhelmed, excessive lock-tracing
may influence program behavior (see the last design decission)
Design decissions:
- use "linuxulator" as the provider for the native bitsize; add the
bitsize for the non-native emulation (e.g. "linuxuator32" on amd64)
- Add probes only for locks which are acquired in one function and released
in another function. Locks which are aquired and released in the same
function should be easy to pair in the code, inter-function
locking is more easy to verify in DTrace.
- Probes for locks should be fired after locking and before releasing to
prevent races (to provide data/function stability in DTrace, see the
man-page of "dtrace -v ..." and the corresponding DTrace docs).
|
|
|
|
| |
This means that their use is restricted to a single C file.
|
|
|
|
|
| |
Submitted by: netchild
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 Week
|
|
|
|
|
|
|
|
| |
if page mapped MAP_ANON linux uses private algorithm too.
Disscussed with: jhb
MFC after: 3 Days
|
|
|
|
|
|
|
|
|
|
|
|
| |
different processes that happen to use the same user address in the
separate processes will now be treated as distinct futexes rather than the
same futex. We can now honor shared futexes properly by mapping them to a
PROCESS_SHARED umtx_key. Private futexes use THREAD_SHARED umtx_key
objects.
In conjunction with: dchagin
Reviewed by: kib
MFC after: 1 week
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Otherwise, REQUEUE operations fails.
|
|
|
|
| |
Reimplement used_requeue logic with LINUX_XDEPR_REQUEUEOP flag.
|
|
|
|
|
| |
Submitted by: arundel
MFC after: 1 month.
|
|
|
|
|
| |
Submitted by: arundel
MFC after: 1 month.
|
|
|
|
|
|
|
| |
them consistent with the syscall and ipc messages.
Submitted by: arundel
MFC after: 3 days
|
|
|
|
|
| |
Submitted by: arundel
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
unsupported futex operation
- for those futex operations which are known to be not supported,
print out which futex operation it is
- shortcut the error return of the unsupported FUTEX_CLOCK_REALTIME in
some cases:
FUTEX_CLOCK_REALTIME can be used to tell linux to use
CLOCK_REALTIME instead of CLOCK_MONOTONIC. FUTEX_CLOCK_REALTIME
however must only be set, if either FUTEX_WAIT_BITSET or
FUTEX_WAIT_REQUEUE_PI are set too. If that's not the case
we can die with ENOSYS right at the beginning.
Submitted by: arundel
Reviewed by: rdivacky (earlier iteration of the patch)
MFC after: 1 week
|
|
|
|
|
| |
if the given timeout is invalid. Consistently use int type for timeout and
correct a format string in futex_sleep().
|
|
|
|
|
|
| |
Submitted by: arundel
Found by: clang analysis (automatic service by uqs@)
Reviewed by: rdivacky
|
|
|
|
|
| |
Submitted by: Marc Balmer <marc@msys.ch>
MFC after: 1 week
|
|
|
|
|
|
| |
Tested by: Alexander Best <alexbestms at math uni-muenster de>
Approved by: kib (mentor)
MFC after: 3 days
|
|
|
|
|
| |
Approved by: kib (mentor)
MFC after: 1 month
|
|
|
|
|
| |
Approved by: kib (mentor)
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Old implemention used Giant to protect the kernel data structures,
but at the same time called malloc(M_WAITOK), that could cause the
calling thread to sleep and lost Giant protection. User-visible
result was the missed wakeup.
New implementation uses one sx lock per futex. The sx protects
the futex structures and allows to sleep while copyin or copyout
are performed.
Unlike linux, we return EINVAL when FUTEX_CMP_REQUEUE operation
is requested and either caller specified futexes are equial or
second futex already exists. This is acceptable since the situation
can only occur from the application error, and glibc falls back to
old FUTEX_WAKE operation when FUTEX_CMP_REQUEUE returns an error.
Approved by: kib (mentor)
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Glibc does not use this operation since 2.3.3 version (Jun 2004),
as it is racy and replaced by FUTEX_CMP_REQUEUE operation.
Glibc versions prior to 2.3.3 fall back to FUTEX_WAKE when
FUTEX_REQUEUE returned EINVAL.
Any application directly using FUTEX_REQUEUE without return
value checking are definitely broken.
Limit quantity of messages per process about unsupported
operation.
Approved by: kib (mentor)
MFC after: 1 month
|
|
|
|
|
| |
Approved by: kib (mentor)
MFC after: 2 weeks
|
|
|
|
|
| |
Approved by: kib (mentor)
MFC after: 2 weeks
|
|
|
|
|
| |
Approved by: kib (mentor)
MFC after: 6 days
|
|
|
|
|
|
| |
and glibc actually supplies negative offsets. Change l_ulong to l_long.
Submitted by: dchagin
|
|
|
|
|
|
|
|
| |
user-mode pointers. Change types used in the structures definitions to
properly-sized architecture-specific types.
Submitted by: dchagin
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
what Linux does. This is because robust futexes are mostly
userspace thing which we cannot alter. Two syscalls maintain
pointer to userspace list and when process exits a routine
walks this list waking up processes sleeping on futexes
from that list.
Reviewed by: kib (mentor)
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
so the annoying message is not printed.
o Don't warn about FUTEX_FD not being implemented
and return ENOSYS instead of 0 (eg. success).
o Clear FUTEX_PRIVATE_FLAG as we actually implement
only private futexes so there is no reason to
return ENOSYS when app asks for a private futex.
We don't reject shared futexes because they worked
just fine with our implementation so far.
Approved by: kib (mentor)
Tested by: bsam
MFC after: 1 week
|
|
|
|
|
| |
Submitted by: rdivacky
Reported and tested by: Gary Stanley <gary velocity-servers net>
|
|
|
|
|
|
|
|
|
|
| |
Implement all futex atomic operations in assembler to not depend on the
fuword() that does not allow to distinguish between -1 and failure return.
Correctly return 0 from atomic operations on success.
In collaboration with: rdivacky
Tested by: Scot Hetzel <swhetzel gmail com>, Milos Vyletel <mvyletel mzm cz>
Sponsored by: Google SoC 2007
|
|
|
|
|
|
|
| |
Initial patch was submitted by kib and additional work was done
by Divacky Roman.
Tested by: emulation
|
|
|
|
|
|
| |
Sync with rev 1.7 in NetBSD.
Obtained from: NetBSD
|
|
|
|
|
|
|
|
|
| |
semi-automatic style(9)
The futex stuff already differs a lot (only a small part does not differ)
from NetBSD, so we are already way off and can't apply changes from NetBSD
automatically. As we need to merge everything by hand already, we can even
make the files comply to our world order.
|
|
|
|
|
|
|
|
| |
futex lock).
Sponsored by: Google SoC 2006
Submitted by: rdivacky
Suggested by: jhb
|
|
|
|
|
|
| |
- remove debuging printf [2]
Submitted by: intron <mag@intron.ac> [1], rdivacky [2]
|
|
|
|
|
| |
Sponsored by: Google SoC 2006
Submitted by: rdivacky
|
|
|
|
| |
Submitted by: rdivacky
|
|
|
|
|
|
|
|
|
| |
- linux_emul.c [1]
- linux_futex.c [2]
Sponsored by: Google SoC 2006 [1]
Submitted by: rdivacky [1]
netchild [2]
|
|
Please don't style(9) the NetBSD code, we want to stay in sync. Not imported
on a vendor branch since we need local changes.
Sponsored by: Google SoC 2006
Submitted by: rdivacky
With help from: manu@NetBSD.org
Obtained from: NetBSD (linux_{futex,time}.*)
|