Skip to contentSkip to conversation

preempt-rt, need old style rwlocks for systemtap

DISCUSSION Frank Ch. Eigler 3 participants 4 messages May 3, 2008

lore
Share & tools
lore
#0 lore raw

Hi -

It has come to my attention that the preempt-rt patch suite deliberately defeats the potential concurrency intended by systemtap's use of rwlocks to permit concurrent readers of various data structures. Since systemtap's probe handlers are all atomic, nonblocking, nonpreemptable, it does not seem like there is any real-time-oriented benefit in this. What can we do to work around this and permit reader concurrency again in preempt-rt?

- FChE

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 10 lines · Frank Ch. Eigler

Hi -

It has come to my attention that the preempt-rt patch suite deliberately defeats the potential concurrency intended by systemtap's use of rwlocks to permit concurrent readers of various data structures. Since systemtap's probe handlers are all atomic, nonblocking, nonpreemptable, it does not seem like there is any real-time-oriented benefit in this. What can we do to work around this and permit reader concurrency again in preempt-rt?

The reason it "defeats" the concurrent behavior is that it's really complicated to have concurrent readers with Priority Inheritance, so the initial cut of rtmutexes serialized all lock accesses.

Steven has posted a patch for comment (with no takers yet) that implements r/w locks with concurrent readers and PI. We've just started running it on the MRG RT kernel with some success, but I wouldn't say that it's ready for prime time.

You're welcome to help test it though...

Clark

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkgcd+gACgkQHyuj/+TTEp2JCwCg4ZhqdqHCb9SZM+zrkKcyohtL 2coAoKLyUGZnRKha5NH7UDrM1QsP5ZaE
=FQas
-----END PGP SIGNATURE-----

#2 lore raw

Hi -

Quoted 8 lines · Clark Williams

[...]

Quoted 3 lines

It has come to my attention that the preempt-rt patch suite deliberately defeats the potential concurrency intended by systemtap's use of rwlocks to permit concurrent readers [...]

The reason it "defeats" the concurrent behavior is that it's really complicated to have concurrent readers with Priority Inheritance, so the initial cut of rtmutexes serialized all lock accesses. [...]

Do you believe priority inheritance to be an essential property of every use of these primitives, regardless of the nature of the specifical critical sections being protected? Is there no way & need to opt out of the extra machinery?

- FChE

#3 lore raw
Quoted 12 lines · Frank Ch. Eigler

Hi -

Quoted 8 lines · Clark Williams

[...]

Quoted 3 lines

It has come to my attention that the preempt-rt patch suite deliberately defeats the potential concurrency intended by systemtap's use of rwlocks to permit concurrent readers [...]

The reason it "defeats" the concurrent behavior is that it's really complicated to have concurrent readers with Priority Inheritance, so the initial cut of rtmutexes serialized all lock accesses. [...]

Quoted 6 lines

Do you believe priority inheritance to be an essential property of every use of these primitives, regardless of the nature of the specifical critical sections being protected? Is there no way & need to opt out of the extra machinery?

- FChE

Yes, for (at least) two reasons. And No.

Without PI the best case is indeterminate latencies. The worst case is deadlock. Please read Steven's excellent description of the issues in the Documentation directory of a kernel tree.

Best,
-PWM

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html