Re: 2.6.13-rc6-rt9

From: Steven Rostedt
Date: Tue Aug 23 2005 - 07:51:16 EST


On Tue, 2005-08-23 at 14:36 +0200, Ingo Molnar wrote:
> * Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> > Ingo, can't you get rt.c to be more confusing. I mean it is too
> > simple. We need to add a few more underscores here and there :-)
> > Seriously, that rt.c is mind boggling. It was nice before, now it is
> > just screaming for a cleanup (come now, do we really need the four
> > underscores?). Same with latency.c.
>
> i agree that it's ugly, but some of that ugliness is to achieve the
> 7-instructions fail-through codepath for the common acquire (and
> release) codepath:
>
> c03a5320 <__down_mutex>:
> c03a5320: 89 c1 mov %eax,%ecx
> c03a5322: 8b 15 08 76 3a c0 mov 0xc03a7608,%edx
> c03a5328: 31 c0 xor %eax,%eax
> c03a532a: 0f b1 51 14 cmpxchg %edx,0x14(%ecx)
> c03a532e: 85 c0 test %eax,%eax
> c03a5330: 75 01 jne c03a5333 <__down_mutex+0x13>
> c03a5332: c3 ret
>

Impressive!

> that's how much it takes to acquire an RT lock, and i worked hard to get
> there. As long as the fastpath is kept this tight, feel free to do
> cleanups. But i really want to avoid having to write mutex_down/up in
> assembly for 24 architectures ...

Warning! I'm hacking hard to get rid of the global pi_lock, and I'm not
worrying now about efficiency. I figure that if I can get it to work,
then we can speed it up afterwards. Since it's complex enough keeping
all the locks straight, I just want it to work without deadlocking.

Once I get it to work, I'll let you figure out how get it back down to
7-instructions :-)

-- Steve


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/