Re: [PATCH] netfilter: use per-CPU recursive lock {XV}

From: Stephen Hemminger
Date: Sun Apr 26 2009 - 17:58:16 EST


On Sun, 26 Apr 2009 14:56:46 -0400
Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx> wrote:

> * Eric Dumazet (dada1@xxxxxxxxxxxxx) wrote:
> > From: Stephen Hemminger <shemminger@xxxxxxxxxx>
> >
> > > Epilogue due to master Jarek. Lockdep carest not about the locking
> > > doth bestowed. Therefore no keys are needed.
> > >
> > > Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxxxx>
> >
> > So far, so good, should be ready for inclusion now, nobody complained :)
> >
> > I include the final patch, merge of your last two patches.
> >
> > David, could you please review it once again and apply it if it's OK ?
>
> > Thanks to all for your help and patience
> >
> > [PATCH] netfilter: use per-CPU recursive lock {XV}
>
> Hi Eric,
>
> Suitable name would probably be :
>

But Linus is trying to delude himself.

This usage is recursive even if he doesn't like the terminology.
The same CPU has to be able to reacquire the read lock without deadlocking.
If reader/writer locks were implemented in a pure writer gets priority
method, then this code would break! So yes read locks can be used recursively
now in Linux, but if the were implemented differently then this code
would break. For example, the -rt kernel turns all read/write locks into
mutexs, so the -rt kernel developers will have to address this.
--
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/