Re: [patch] Real-Time Preemption, -RT-2.6.11-rc3-V0.7.38-01

Steven Rostedt
2005-03-11T10:15:47Z

On Fri, 11 Mar 2005, Ingo Molnar wrote:

>
> * Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > > The short term fix is probably to put back the preempt_disables, the long
> > > term is to get rid of these stupid bit_spin_lock busy loops.
> >
> > Doing a quick search on the kernel, it looks like only kjournald uses
> > the bit_spin_locks. I'll start converting them to spinlocks. The use
> > seems to be more of a hack, since it is using bits in the state field
> > for locking, and these bits aren't used for anything else.
>
> yeah. bit-spinlocks are really a hack.
>
> Ingo
>

And this really sucks too! I've been looking into a fix for this and have
yet to get something stable. As you probably already know, you can't just
put back the preempt_disable since your spinlocks now schedule. So I've
been looking into finding a way to get rid of these.

I've tried making two global spinlocks, one for the state bit and one for
the journal head bit use. But this deadlocks with j_state_lock. The
journal head lock seems to be ok to be global, but the state lock needs to
have one for every buffer head. I'm now hacking away to do this without
touching the actual buffer head. But I'm not sure what some of the
side effects this is having. I'll keep you posted when I get something
working. I'm now having a crash course in how kjournal and friends work.

-- Steve