Re: [PATCH v5 1/8] SUNRPC: introduce helpers for reference countedrpcbind clients

From: Stanislav Kinsbursky
Date: Tue Sep 20 2011 - 12:20:22 EST


20.09.2011 19:11, Jeff Layton ÐÐÑÐÑ:

In general, it's difficult to get locking right, especially when you
start mixing multiple locks on related resources. Personally, I'd go
with a simpler scheme here. There's not much value in protecting this
counter with a spinlock when the other parts need to be protected by a
mutex. If you do decide to do it with multiple locks, then please do
document in comments how the locking is expected to work.

An alternate scheme might be to consider doing this with krefs, but I
haven't really considered whether that idiom makes sense here.


Jeff, please, have a look at my answer to Bryan Schumaker.
Does it allay your apprehensions?

--
Best regards,
Stanislav Kinsbursky
--
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/