Re: [PATCH] bcache: Remove use of down/up_read_non_owner()

2013-08-21 Thread Steven Rostedt
On Tue, 20 Aug 2013 20:36:58 -0700 Kent Overstreet wrote: > I think we're mostly quibbling over semantics here, and it's not that > big a deal - that said, I don't really get your distinction between a > semaphore and a mutex; I'd distinguish them by saying a semaphore can > count an arbitrary

Re: [PATCH] bcache: Remove use of down/up_read_non_owner()

2013-08-21 Thread Steven Rostedt
On Tue, 20 Aug 2013 20:36:58 -0700 Kent Overstreet k...@daterainc.com wrote: I think we're mostly quibbling over semantics here, and it's not that big a deal - that said, I don't really get your distinction between a semaphore and a mutex; I'd distinguish them by saying a semaphore can count

Re: [PATCH] bcache: Remove use of down/up_read_non_owner()

2013-08-20 Thread Kent Overstreet
On Tue, Aug 20, 2013 at 10:41:53PM -0400, Steven Rostedt wrote: > > I get that there's a problem, but the bcache code REALLY IS USING THE > > RWSEM AS A LOCK; the answer isn't to open code the lock! > > Actually, it is using it as a semaphore. The problem with Linux > was that it only had spin

Re: [PATCH] bcache: Remove use of down/up_read_non_owner()

2013-08-20 Thread Steven Rostedt
On Tue, 20 Aug 2013 19:19:00 -0700 Kent Overstreet wrote: > On Tue, Aug 20, 2013 at 11:16:02AM -0400, Steven Rostedt wrote: > > > I _really_ disagree with this approach. I had a feeling you would love it. > > I get that there's a problem, but the bcache code REALLY IS USING THE > RWSEM AS A

Re: [PATCH] bcache: Remove use of down/up_read_non_owner()

2013-08-20 Thread Kent Overstreet
On Tue, Aug 20, 2013 at 11:16:02AM -0400, Steven Rostedt wrote: > > The down/up_read_non_owner() is a nasty hack in the API of the rwsem > operations. It was once removed, but then resurrected for use with > bcache. Not only is the API an abomination to the rwsem API, it also > prevents bcache

[PATCH] bcache: Remove use of down/up_read_non_owner()

2013-08-20 Thread Steven Rostedt
The down/up_read_non_owner() is a nasty hack in the API of the rwsem operations. It was once removed, but then resurrected for use with bcache. Not only is the API an abomination to the rwsem API, it also prevents bcache from ever being compiled with PREEMPT_RT, as the RT kernel requires all

[PATCH] bcache: Remove use of down/up_read_non_owner()

2013-08-20 Thread Steven Rostedt
The down/up_read_non_owner() is a nasty hack in the API of the rwsem operations. It was once removed, but then resurrected for use with bcache. Not only is the API an abomination to the rwsem API, it also prevents bcache from ever being compiled with PREEMPT_RT, as the RT kernel requires all

Re: [PATCH] bcache: Remove use of down/up_read_non_owner()

2013-08-20 Thread Kent Overstreet
On Tue, Aug 20, 2013 at 11:16:02AM -0400, Steven Rostedt wrote: The down/up_read_non_owner() is a nasty hack in the API of the rwsem operations. It was once removed, but then resurrected for use with bcache. Not only is the API an abomination to the rwsem API, it also prevents bcache from

Re: [PATCH] bcache: Remove use of down/up_read_non_owner()

2013-08-20 Thread Steven Rostedt
On Tue, 20 Aug 2013 19:19:00 -0700 Kent Overstreet k...@daterainc.com wrote: On Tue, Aug 20, 2013 at 11:16:02AM -0400, Steven Rostedt wrote: I _really_ disagree with this approach. I had a feeling you would love it. I get that there's a problem, but the bcache code REALLY IS USING THE

Re: [PATCH] bcache: Remove use of down/up_read_non_owner()

2013-08-20 Thread Kent Overstreet
On Tue, Aug 20, 2013 at 10:41:53PM -0400, Steven Rostedt wrote: I get that there's a problem, but the bcache code REALLY IS USING THE RWSEM AS A LOCK; the answer isn't to open code the lock! Actually, it is using it as a semaphore. The problem with Linux was that it only had spin locks and