mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC/PATCH] FUSYN Realtime & robust mutexes for Linux try 2.2
@ 2004-04-21  4:03 inaky.perez-gonzalez
  2004-04-21  4:03 ` [RFC/PATCH] FUSYN 1/11: documentation files inaky.perez-gonzalez
  0 siblings, 1 reply; 13+ messages in thread
From: inaky.perez-gonzalez @ 2004-04-21  4:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: inaky.perez-gonzalez

Hi All

This is a new release of the code for providing a user and kernel
space synchronization infrastructure that provides real-time friendly
behavior, priority inversion protection (through serialized unlocks,
priority inheritance and protection), deadlock detection and
robustness.

It builds upon the design of futexes and its usage model as NPTL does.

Please look at the first patch, containing the documentation for
information on how is it implemented.

High level changelog since release 2.1:

- Ported to 2.6.5

- Priority inheritance rework: now it should be fully functional:
supports SCHED_NORMAL tasks, holding multiple mutexes (without bugs),
ownership/wait chains with complex propagation rules and plays fine
with the planned priority protection support. It required
kind of invasive surgery at sched.c; need to find a way to simplify
it as it is touching some very hot paths.

- Added unserialized mode: in this mode, during unlocks, the mutex is
not kept locked (this is how NPTL works). Performance increases, but
you loose robustness guarantees.

- Greg Weeks, from TimeSYS, provided the ports to ppc and ppc64;
haven't tested myself as I lack such a machine.

- Fix nasty bug when a signal is sent to a waiter--still can be
improved.

- Fix nastier bug in changing the priority of a waiter--can't call
fuqueue_waiter_chprio() from inside a task_rq_lock/unlock pair or
bad things might happen during priority inheritance (double spin
lock).

- Updated a wee bit the consistency() interface, now called ctl(), as
it does way more than consistency control. Made the implementation a
wee bit cleaner, still very ugly though.

- Clean up some symbol names for correctness and meaning; wipe out
some debugging stuff--still a lot left around, but will clean
up IANF.

Still to-do:

- Requeue-like support for speeding up conditional variables.

- Jamie's auto unlock-method detection.

- Ugly bug triggered by running rtnptl-test-misc::str03 with:

$ (ulimit -s 32; time ./str03 -b5 -d5 > /tmp/kk)

[triggers inconsistency warning on NPTL patched with the rtnptl
patch--haven't been able to reproduce it lately using the
unserialized mode, but need to try with the serialized one again].

- Finish implementing priority protection; most of the infrastructure
is there already.

- Add a flag to the passing of timeout information to indicate
if it is relative or absolute, and as we are there, the clock
source. This way we avoid a costly kernel access in
pthread_mutex_timelock() and friends. Plan to encapsulate the whole
thing (timespec, rel/abs, clock source) in a struct copied from user
space.

- Wipe out debug stuff

- research using single bit mode for fast-path on arches without
compare-and-exchange but with test-and-set bit.

- Call fuqueue_waiter_cancel() into try_to_wake_up?

- Add CONFIG option to compile out parts or all.

- Research more into safe static allocation as proposed by Scott
Wood--the basic idea has a bunch of problems, mainly that it
kills caching and some others, but needs further research.

Did I miss anything?

The patch is split in the following parts:

1/11: documentation files
2/11: modifications to the core
3/11: Support for i386
4/11: Support for ia64
5/11: Support for ppc
6/11: Support for ppc64
7/11: kernel fuqueues
8/11: user space/kernel space tracker
9/11: user space fuqueues
10/11: kernel fulocks
11/11: user space fulocks

We have a site at http://developer.osdl.org/dev/robustmutexes
with references to all the releases, test code and NPTL
modifications (rtnptl) to use this code. As well, the patch
is there in a single file, in case you don't want to paste
them manually.



^ permalink raw reply	[flat|nested] 13+ messages in thread
* [RFC/PATCH] FUSYN Realtime & robust mutexes for Linux try 2.2
@ 2004-07-23 15:48 inaky.perez-gonzalez
  2004-07-23 15:48 ` [RFC/PATCH] FUSYN 1/11: documentation files inaky.perez-gonzalez
  0 siblings, 1 reply; 13+ messages in thread
From: inaky.perez-gonzalez @ 2004-07-23 15:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: inaky.perez-gonzalez, robustmutexes

Hi All

This is a new release of the code for providing a user and kernel
space synchronization infrastructure that provides real-time friendly
behavior, priority inversion protection (through serialized unlocks,
priority inheritance and protection), deadlock detection and
robustness [as in it doesn't fry when a mutex owner dies].

It builds upon the design of futexes and its usage model as NPTL does.

Please look at the first patch, containing the documentation for
information on how is it implemented. Kind of outdated, but useful
anyway. As well, the OLS 2004 paper is available on the web site.

High level changelog since release 2.2:

- Requeue-like support implemented for fuqueues and fulocks, to
speed up conditional variable broadcast.

- auto detection of the best unlock mode (based on an idea by
Jamie Lokier).

- Improve the taking of timeouts from user space by creating a
'struct timeout' that can take an absolute or relative
specification. POSIX uses absolute, so it is dumb to go to the
kernel twice, once to ask for the current time and then
compute a relative sleep and another one to do the actual
sleep.

- Added the ability to selectively compile out some parts of the
code via CONFIG_ options. Could add some more grain.

- Pages are no longer pinned while waiting.

- Fixed a big bunch of race conditions and bugs.

- priority lists are now fully O(140) ~= O(1) [except for
splice, which is still a hack that needs polishing].

Still to-do:

- Finally finish implementing priority protection; the core is
there, only the glue to use it is needed.

- Wipe out debug stuff

- Call fuqueue_waiter_cancel() into try_to_wake_up?

The patch is split in the following parts:


1/11: documentation files
2/11: priority based O(1) lists
3/11: kernel fuqueues
4/11: kernel fulocks
5/11: user space/kernel space tracker
6/11: user space fuqueues
7/11: user space fulocks
8/11: Arch-specific support
9/11: Modifications to the core: basic
10/11: Modifications to the core: struct timeout
11/11: Modifications to the core: scheduler

We have a site at http://developer.osdl.org/dev/robustmutexes
with references to all the releases, test code and NPTL
modifications (rtnptl) to use this code. As well, the patch
is there in a single file, in case you don't want to paste
them manually.



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

end of thread, other threads:[~2004-07-23 15:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-21  4:03 [RFC/PATCH] FUSYN Realtime & robust mutexes for Linux try 2.2 inaky.perez-gonzalez
2004-04-21  4:03 ` [RFC/PATCH] FUSYN 1/11: documentation files inaky.perez-gonzalez
2004-04-21  4:03   ` [RFC/PATCH] FUSYN 2/11: modifications to the core inaky.perez-gonzalez
2004-04-21  4:03     ` [RFC/PATCH] FUSYN 3/11: Support for i386 inaky.perez-gonzalez
2004-04-21  4:03       ` [RFC/PATCH] FUSYN 4/11: Support for ia64 inaky.perez-gonzalez
2004-04-21  4:03         ` [RFC/PATCH] FUSYN 5/11: Support for ppc inaky.perez-gonzalez
2004-04-21  4:03           ` [RFC/PATCH] FUSYN 6/11: Support for ppc64 inaky.perez-gonzalez
2004-04-21  4:04             ` [RFC/PATCH] FUSYN 7/11: kernel fuqueues inaky.perez-gonzalez
2004-04-21  4:04               ` [RFC/PATCH] FUSYN 8/11: user space/kernel space tracker inaky.perez-gonzalez
2004-04-21  4:04                 ` [RFC/PATCH] FUSYN 9/11: user space fuqueues inaky.perez-gonzalez
2004-04-21  4:04                   ` [RFC/PATCH] FUSYN 10/11: kernel fulocks inaky.perez-gonzalez
2004-04-21  4:04                     ` [RFC/PATCH] FUSYN 11/11: user space fulocks inaky.perez-gonzalez
2004-07-23 15:48 [RFC/PATCH] FUSYN Realtime & robust mutexes for Linux try 2.2 inaky.perez-gonzalez
2004-07-23 15:48 ` [RFC/PATCH] FUSYN 1/11: documentation files inaky.perez-gonzalez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®