On Fri, Jul 29, 2016 at 02:02:24PM -0700, Stephen Hemminger wrote: > On Thu, 28 Jul 2016 11:15:17 +0300 > Amir Levy <[email protected]> wrote: > > > +static LIST_HEAD(controllers_list); > > +static DECLARE_RWSEM(controllers_list_rwsem); > > Why use a semaphore when simple spinlock or mutex would be better?
And never use a RW semaphore unless you can benchmark the difference from a normal lock. If you can't benchmark it, then don't use it... -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
