Re: [PATCH 01/12] Use mutex instead of semaphore in driver core

From: David Miller
Date: Wed Jan 02 2008 - 00:25:19 EST


From: Greg KH <gregkh@xxxxxxx>
Date: Tue, 1 Jan 2008 21:18:28 -0800

> But is the usage of this semaphore in the class code really a problem?
> Has it been seen to cause issues anywhere? Does it show up on any
> benchmarks as being something that really needs to be replaced?

It's a question of maintainability and simplicity also Greg.

I actually have no idea why you're making any sort of fuss about this.
To me it's so clear cut that we should do that.

Mutexes provide a much simpler locking technology. The things that
semaphores can do that mutexes can't are rarely if ever used.

Therefore it's better to convert all of those cases only using the
simpler semantic set of mutexes from semaphores.

And we've been converting the entire tree this way for about 2 years,
I'm sorry that you've only just noticed that this is happening and
that there is general agreement that in general all such conversions
should be made.
--
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/