1 Sep 2007 10:11
Re: [PATCH (updated)]: PTHREAD_PRIO_INHERIT support for ARM.
Remy Bohmer <linux <at> bohmer.net>
2007-09-01 08:11:21 GMT
2007-09-01 08:11:21 GMT
Hello George, > > A few weeks we mailed about the PTHREAD_PRIO_INHERIT patch. > Apologies, vacation and busy on other tasks, so did not get > back to this. No problem! ( I already expected this, I hope you had a nice vacation!) > > BTW: I noticed that the pi_stress tool makes the system completely > > hang while using your patch. Have you noticed this also already? > > Now that you point it out, yes, I've recently run pi_stress and believe > I see what you're referring to. I won't be able to look at this until > next Tuesday but will reply one way or another then. There is one thing more that keeps on bugging me here: A spinlock is used in your patch. On non-RT the spinlock disables interrupts, but on RT it is a mutex and thus preemptible. The piece of code we are talking about is part of the slow-path of the futex implementation, there is thus also a fast-path. So, this piece of code can thus only work properly if the userspace memory (that is modified here) is only modified in this slow-path, and nowhere else. So, the fast-path, implemented in gLibc may not touch this memory, otherwise we have a race condition here. Regardless of how it is implemented in gibc, taking the 'never trust the user'-kernel principle into account, I think it is not wise to depend such a kernel futex implementation on how the counterpart in glibc is implemented; someone might want to build a PI-futex implementation in uClibc or another C-library and do it different than in glibc, not knowing the restrictions in this ARM specific code.(Continue reading)
RSS Feed