Re: [PATCH v3 0/2] Use blocked_lock_lock only to protect blocked_hash
From: Jeff Layton
Date: Sat Mar 07 2015 - 09:09:49 EST
On Sat, 7 Mar 2015 09:00:41 -0500
Jeff Layton <jlayton@xxxxxxxxxxxxxxx> wrote:
> On Fri, 6 Mar 2015 08:53:30 +0100
> Daniel Wagner <daniel.wagner@xxxxxxxxxxxx> wrote:
>
> > Hi,
> >
> > Finally, I got a bigger machine and did a quick test round. I expected
> > to see some improvements but the resutls do not show any real gain. So
> > they are merely refactoring patches.
> >
>
> Ok, in that case is there any point in merging these? I'm all for
> breaking up global locks when it makes sense, but if you can't
> demonstrate a clear benefit then I'm less inclined to take the churn.
>
> Perhaps we should wait to see if a benefit emerges when/if you convert
> the lglock code to use normal spinlocks (like Andi suggested)? That
> seems like a rather simple conversion, and I don't think it's
> "cheating" in any sense of the word.
>
> I do however wonder why Nick used arch_spinlock_t there when he wrote
> the lglock code instead of normal spinlocks. Was it simply memory usage
> considerations or something else?
>
Hmm...to answer my own question. The (old) LWN article here seems to
suggest that he did it that way to avoid preemption:
http://lwn.net/Articles/401738/
I don't think we need to avoid being preempted in the file-locking
code, but I'm not sure about stop_machine.c. Is that necessary there?
The comment in queue_stop_cpus_work seems to indicate that it may be.
--
Jeff Layton <jlayton@xxxxxxxxxxxxxxx>
--
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/