Re: [PATCH v6 08/46] CPU hotplug: Provide APIs to prevent CPU offline from atomic context

2013-02-19 Thread Michel Lespinasse
On Tue, Feb 19, 2013 at 2:50 AM, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: But, the whole intention behind removing the parts depending on the recursive property of rwlocks would be to make it easier to make rwlocks fair (going forward) right? Then, that won't work for CPU

Re: [PATCH v6 08/46] CPU hotplug: Provide APIs to prevent CPU offline from atomic context

2013-02-19 Thread Srivatsa S. Bhat
On 02/19/2013 03:10 PM, Michel Lespinasse wrote: On Tue, Feb 19, 2013 at 2:50 AM, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: But, the whole intention behind removing the parts depending on the recursive property of rwlocks would be to make it easier to make rwlocks fair (going

RE: [PATCH v6 08/46] CPU hotplug: Provide APIs to prevent CPU offline from atomic context

2013-02-19 Thread David Laight
I wouldn't go that far... ;-) Unfairness is not a show-stopper right? IMHO, the warning/documentation should suffice for anybody wanting to try out this locking scheme for other use-cases. I presume that by 'fairness' you mean 'write preference'? I'd not sure how difficult it would be, but

Re: [PATCH v6 08/46] CPU hotplug: Provide APIs to prevent CPU offline from atomic context

2013-02-19 Thread Srivatsa S. Bhat
On 02/19/2013 04:12 PM, David Laight wrote: I wouldn't go that far... ;-) Unfairness is not a show-stopper right? IMHO, the warning/documentation should suffice for anybody wanting to try out this locking scheme for other use-cases. I presume that by 'fairness' you mean 'write preference'?

Re: [PATCH v6 08/46] CPU hotplug: Provide APIs to prevent CPU offline from atomic context

2013-02-18 Thread Michel Lespinasse
On Mon, Feb 18, 2013 at 8:39 PM, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: Some important design requirements and considerations: - 1. Scalable synchronization at the reader-side, especially in the fast-path Any

Re: [PATCH v6 08/46] CPU hotplug: Provide APIs to prevent CPU offline from atomic context

2013-02-18 Thread Srivatsa S. Bhat
On 02/18/2013 09:53 PM, Michel Lespinasse wrote: On Mon, Feb 18, 2013 at 8:39 PM, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: Some important design requirements and considerations: - [...] +/* + * Invoked by atomic hotplug

Re: [PATCH v6 08/46] CPU hotplug: Provide APIs to prevent CPU offline from atomic context

2013-02-18 Thread Michel Lespinasse
On Tue, Feb 19, 2013 at 12:43 AM, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: On 02/18/2013 09:53 PM, Michel Lespinasse wrote: I am wondering though, if you could take care of recursive uses in get/put_online_cpus_atomic() instead of doing it as a property of your rwlock:

Re: [PATCH v6 08/46] CPU hotplug: Provide APIs to prevent CPU offline from atomic context

2013-02-18 Thread Srivatsa S. Bhat
On 02/18/2013 10:51 PM, Michel Lespinasse wrote: On Tue, Feb 19, 2013 at 12:43 AM, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: On 02/18/2013 09:53 PM, Michel Lespinasse wrote: I am wondering though, if you could take care of recursive uses in get/put_online_cpus_atomic() instead