All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [PATCH 0/9] Fast mutex rework, native support
@ 2008-09-01  8:53 Jan Kiszka
  2008-09-01  8:39 ` [Xenomai-core] [PATCH 1/9] Always register threads by their base Jan Kiszka
                   ` (8 more replies)
  0 siblings, 9 replies; 26+ messages in thread
From: Jan Kiszka @ 2008-09-01  8:53 UTC (permalink / raw)
  To: xenomai-core

Here comes our current patch series to fix and enhance fast mutexes for
both the POSIX as well as the native skin. After the long discussion on
this list, it is clear that this is not the last word. However, we are
currently not aware of regressions or still broken corner cases, so this
series may at least serve as a reference for future versions.

Patches 1-4 should already be mergeable. They introduce handle-based
owner tracking for the fast locks and clean up some code.

Patch 5 adds lock stealing support to pthread_mutex_trylock (something
that the glibc does not provide, BTW...). It "misuses"
xnsynch_sleep_on(..., XN_NONBLOCK) for this, but reuses a lot of code
this way. To compensate for the overhead if this path, patch 9 optimizes
xnsynch_sleep_on for XN_NONBLOCK users. Take this as a reference for one
of the three possible approaches. Another one, some dedicated
xnsynch_try_acquire (or so), may later be examined as well so that we
can compare pros and cons. But first the third one, lock stealing via
fast locks, should be analyzed /wrt feasibility.

Patch 6 is an intermediate helper to break out of the lock stealing loop
in xnsynch_sleep_on (XNSYNCH_FWDROB). Patch 7 applies it on the POSIX
skin, overcoming the duplicated sleeper tracking. XNSYNCH_FWROB will be
obsolete once we merge fast lock support into xnsynch.

Patch 8 introduces fast mutexes to the native skin. This approach is
built upon the same mechanisms as the POSIX skin (XNSYNCH_FWROB, trylock
via xnsynch_sleep_on) to compare both implementations. The reason for
differences is mostly the simpler native API. It passes an analogous
test case like Gilles wrote for POSIX (augmented with lock stealing
tests). The testsuite will be posted later after some refactoring work.

Feedback welcome.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux




^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2008-09-05  9:57 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-01  8:53 [Xenomai-core] [PATCH 0/9] Fast mutex rework, native support Jan Kiszka
2008-09-01  8:39 ` [Xenomai-core] [PATCH 1/9] Always register threads by their base Jan Kiszka
2008-09-01  8:44 ` [Xenomai-core] [PATCH 2/9] Switch to handle-based fast mutex owners Jan Kiszka
2008-09-01 11:58   ` Gilles Chanteperdrix
2008-09-01 13:48     ` Jan Kiszka
2008-09-01 14:00       ` Gilles Chanteperdrix
2008-09-01 14:03         ` Jan Kiszka
2008-09-01 14:08           ` Jan Kiszka
2008-09-02 12:31           ` Gilles Chanteperdrix
2008-09-05  8:34   ` [Xenomai-core] [PATCH 2/9] Switch to handle-based fast mutex owners - v2 Jan Kiszka
2008-09-05  9:40     ` Gilles Chanteperdrix
2008-09-05  9:46       ` Jan Kiszka
2008-09-05  9:50         ` Gilles Chanteperdrix
2008-09-05  9:55           ` Jan Kiszka
2008-09-05  9:57             ` Gilles Chanteperdrix
2008-09-01  8:45 ` [Xenomai-core] [PATCH 3/9] Remove xnarch_atomic_intptr wrappers Jan Kiszka
2008-09-01  8:47 ` [Xenomai-core] [PATCH 4/9] Spread xeno_set_current Jan Kiszka
2008-09-01  8:54 ` [Xenomai-core] [RFC][PATCH 5/9] Allow lock stealing via pthread_mutex_trylock Jan Kiszka
2008-09-01  9:58   ` Gilles Chanteperdrix
2008-09-01  8:57 ` [Xenomai-core] [RFC][PATCH 6/9] Add XNSYNCH_FWDROB Jan Kiszka
2008-09-01 10:00   ` Gilles Chanteperdrix
2008-09-01  9:01 ` [Xenomai-core] [RFC][PATCH 8/9] Native support for fast mutexes Jan Kiszka
2008-09-05  8:36   ` [Xenomai-core] [RFC][PATCH 8/9] Native support for fast mutexes - v2 Jan Kiszka
2008-09-01  9:06 ` [Xenomai-core] [RFC][PATCH 9/9] Optimize xnsynch_sleep_on for XN_NONBLOCK Jan Kiszka
2008-09-01  9:12 ` [Xenomai-core] [RFC][PATCH 7/9] Switch POSIX mutexes to XNSYNCH_FWDROB Jan Kiszka
2008-09-01 10:01   ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.