Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-02 Thread Tim Chen
> > /* > > + * Guide to the rw_semaphore's count field for common values. > > + * (32 bit case illustrated, similar for 64 bit) > > The values below are x86-specific; the actual defines are arch-dependent. > Do other archs use different values? This is also the value used also for generic

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-02 Thread Peter Hurley
On 05/01/2014 07:05 PM, Tim Chen wrote: On Thu, 2014-05-01 at 16:18 -0400, Peter Hurley wrote: On 05/01/2014 01:50 PM, Tim Chen wrote: It takes me a while to understand how rwsem's count field mainifest itself in different scenarios. I'm adding comments to provide a quick reference on the the

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-02 Thread Tim Chen
On Thu, 2014-05-01 at 11:38 -0700, Davidlohr Bueso wrote: > On Thu, 2014-05-01 at 10:50 -0700, Tim Chen wrote: > > It takes me a while to understand how rwsem's count field mainifest > > itself in different scenarios. I'm adding comments to provide a quick > > reference on the the rwsem's count

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-02 Thread Tim Chen
On Fri, 2014-05-02 at 06:10 -0700, Randy Dunlap wrote: > > > > It takes me quite a while to understand how rwsem's count field mainifest > > manifests > > > itself in different scenarios. I'm adding comments to provide a quick > >

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-02 Thread Randy Dunlap
On 05/01/2014 04:05 PM, Tim Chen wrote: On Thu, 2014-05-01 at 16:18 -0400, Peter Hurley wrote: On 05/01/2014 01:50 PM, Tim Chen wrote: It takes me a while to understand how rwsem's count field mainifest itself in different scenarios. I'm adding comments to provide a quick reference on the the

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-02 Thread Randy Dunlap
On 05/01/2014 04:05 PM, Tim Chen wrote: On Thu, 2014-05-01 at 16:18 -0400, Peter Hurley wrote: On 05/01/2014 01:50 PM, Tim Chen wrote: It takes me a while to understand how rwsem's count field mainifest itself in different scenarios. I'm adding comments to provide a quick reference on the the

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-02 Thread Tim Chen
On Fri, 2014-05-02 at 06:10 -0700, Randy Dunlap wrote: It takes me quite a while to understand how rwsem's count field mainifest manifests itself in different scenarios. I'm adding comments to provide a quick reference

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-02 Thread Tim Chen
On Thu, 2014-05-01 at 11:38 -0700, Davidlohr Bueso wrote: On Thu, 2014-05-01 at 10:50 -0700, Tim Chen wrote: It takes me a while to understand how rwsem's count field mainifest itself in different scenarios. I'm adding comments to provide a quick reference on the the rwsem's count field

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-02 Thread Peter Hurley
On 05/01/2014 07:05 PM, Tim Chen wrote: On Thu, 2014-05-01 at 16:18 -0400, Peter Hurley wrote: On 05/01/2014 01:50 PM, Tim Chen wrote: It takes me a while to understand how rwsem's count field mainifest itself in different scenarios. I'm adding comments to provide a quick reference on the the

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-02 Thread Tim Chen
/* + * Guide to the rw_semaphore's count field for common values. + * (32 bit case illustrated, similar for 64 bit) The values below are x86-specific; the actual defines are arch-dependent. Do other archs use different values? This is also the value used also for generic case. I

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-01 Thread Tim Chen
On Thu, 2014-05-01 at 16:18 -0400, Peter Hurley wrote: > On 05/01/2014 01:50 PM, Tim Chen wrote: > > It takes me a while to understand how rwsem's count field mainifest > > itself in different scenarios. I'm adding comments to provide a quick > > reference on the the rwsem's count field for each

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-01 Thread Peter Hurley
On 05/01/2014 01:50 PM, Tim Chen wrote: It takes me a while to understand how rwsem's count field mainifest itself in different scenarios. I'm adding comments to provide a quick reference on the the rwsem's count field for each scenario where readers and writers are contending/holding the lock.

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-01 Thread Davidlohr Bueso
On Thu, 2014-05-01 at 10:50 -0700, Tim Chen wrote: > It takes me a while to understand how rwsem's count field mainifest > itself in different scenarios. I'm adding comments to provide a quick > reference on the the rwsem's count field for each scenario where readers > and writers are

[PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-01 Thread Tim Chen
It takes me a while to understand how rwsem's count field mainifest itself in different scenarios. I'm adding comments to provide a quick reference on the the rwsem's count field for each scenario where readers and writers are contending/holding the lock. Hopefully it will be useful for future

[PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-01 Thread Tim Chen
It takes me a while to understand how rwsem's count field mainifest itself in different scenarios. I'm adding comments to provide a quick reference on the the rwsem's count field for each scenario where readers and writers are contending/holding the lock. Hopefully it will be useful for future

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-01 Thread Davidlohr Bueso
On Thu, 2014-05-01 at 10:50 -0700, Tim Chen wrote: It takes me a while to understand how rwsem's count field mainifest itself in different scenarios. I'm adding comments to provide a quick reference on the the rwsem's count field for each scenario where readers and writers are

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-01 Thread Peter Hurley
On 05/01/2014 01:50 PM, Tim Chen wrote: It takes me a while to understand how rwsem's count field mainifest itself in different scenarios. I'm adding comments to provide a quick reference on the the rwsem's count field for each scenario where readers and writers are contending/holding the lock.

Re: [PATCH] rwsem: Comments to explain the meaning of the rwsem's count field

2014-05-01 Thread Tim Chen
On Thu, 2014-05-01 at 16:18 -0400, Peter Hurley wrote: On 05/01/2014 01:50 PM, Tim Chen wrote: It takes me a while to understand how rwsem's count field mainifest itself in different scenarios. I'm adding comments to provide a quick reference on the the rwsem's count field for each