Re: [PATCH 3/3] brlocks/lglocks: turn into functions

From: Rusty Russell
Date: Mon May 07 2012 - 01:25:38 EST


On Fri, 20 Apr 2012 21:21:49 +1000, Nick Piggin <npiggin@xxxxxxxxx> wrote:
> This still not merged?

No, I've been away. I've put it in -next for tomorrow, though I'm not
sure what the best way to get it to Linus next merge window.

> There is a reason, which is performance. Extra function call, but also
> IIRC the percpu accessor was not so fast doing it this way. Maybe
> that's improved...
>
> So what's the performance difference?

What benchmarks you usually run? Feel free to try it out and report
back; I only have small hardware here.

> >
> > Since there are at least two users it makes sense to share this code in a
> > library. This is also easier maintainable than a macro forest.
> >
> > This will also make it later possible to dynamically allocate lglocks and
> > also use them in modules (this would both still need some additional, but
> > now straightforward, code)
>
> Yes, but let's not do either of those things :)
>
> I was slightly crazy when committing that patch to the kernel, I'll
> admit. So if performance isn't significantly affected, then definitely.
> If it is... well, it's much easier to gain 1% performance by maintaining
> 100 self contained lines of hilarious code like this than to actually
> use your brain to improve somewhere else!

Cheers,
Rusty.
--
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/