On Tue, 2013-06-25 at 09:37 +0200, Peter Zijlstra wrote:
> On Mon, Jun 24, 2013 at 01:17:45PM -0700, Tim Chen wrote:
> > On second thought, I agree with you. I should change this to
> > something like
> >
> > int retval = true;
> > task_struct *sem_owner;
> >
> > /* Spin only if acti
On Mon, Jun 24, 2013 at 01:17:45PM -0700, Tim Chen wrote:
> On second thought, I agree with you. I should change this to
> something like
>
> int retval = true;
> task_struct *sem_owner;
>
> /* Spin only if active writer running */
> if (!sem->owner)
> retur
On 06/24/2013 05:58 PM, Tim Chen wrote:
On Sat, 2013-06-22 at 03:57 -0400, Peter Hurley wrote:
Will this spin for full scheduler value on a reader-owned lock?
+ /* wait_lock will be acquired if write_lock is obtained */
+ if (rwsem_try_write_lock(sem->count, true, s
On Sat, 2013-06-22 at 03:57 -0400, Peter Hurley wrote:
> Will this spin for full scheduler value on a reader-owned lock?
>
> > + /* wait_lock will be acquired if write_lock is obtained */
> > + if (rwsem_try_write_lock(sem->count, true, sem)) {
> > + ret = 1;
On Mon, 2013-06-24 at 16:48 -0400, Peter Hurley wrote:
>
> Also, I haven't given a lot of thought to if preemption must be disabled
> before calling rwsem_can_spin_on_owner(). If so, wouldn't you just drop
> rwsem_can_spin_on_owner() (because the conditions tested in the loop are
> equivalent)?
>
On 06/24/2013 04:17 PM, Tim Chen wrote:
On Mon, 2013-06-24 at 14:49 -0400, Peter Hurley wrote:
On 06/24/2013 01:11 PM, Tim Chen wrote:
On Sun, 2013-06-23 at 13:03 -0700, Davidlohr Bueso wrote:
On Sat, 2013-06-22 at 03:57 -0400, Peter Hurley wrote:
On 06/21/2013 07:51 PM, Tim Chen wrote:
+st
On 06/24/2013 03:13 PM, Tim Chen wrote:
On Mon, 2013-06-24 at 14:49 -0400, Peter Hurley wrote:
On 06/24/2013 01:11 PM, Tim Chen wrote:
On Sun, 2013-06-23 at 13:03 -0700, Davidlohr Bueso wrote:
On Sat, 2013-06-22 at 03:57 -0400, Peter Hurley wrote:
On 06/21/2013 07:51 PM, Tim Chen wrote:
+st
On Mon, 2013-06-24 at 14:49 -0400, Peter Hurley wrote:
> On 06/24/2013 01:11 PM, Tim Chen wrote:
> > On Sun, 2013-06-23 at 13:03 -0700, Davidlohr Bueso wrote:
> >> On Sat, 2013-06-22 at 03:57 -0400, Peter Hurley wrote:
> >>> On 06/21/2013 07:51 PM, Tim Chen wrote:
>
> +static inline bool
On Mon, 2013-06-24 at 14:49 -0400, Peter Hurley wrote:
> On 06/24/2013 01:11 PM, Tim Chen wrote:
> > On Sun, 2013-06-23 at 13:03 -0700, Davidlohr Bueso wrote:
> >> On Sat, 2013-06-22 at 03:57 -0400, Peter Hurley wrote:
> >>> On 06/21/2013 07:51 PM, Tim Chen wrote:
>
> +static inline bool
On 06/24/2013 01:11 PM, Tim Chen wrote:
On Sun, 2013-06-23 at 13:03 -0700, Davidlohr Bueso wrote:
On Sat, 2013-06-22 at 03:57 -0400, Peter Hurley wrote:
On 06/21/2013 07:51 PM, Tim Chen wrote:
+static inline bool rwsem_can_spin_on_owner(struct rw_semaphore *sem)
+{
+ int retval = true;
On Sun, 2013-06-23 at 13:03 -0700, Davidlohr Bueso wrote:
> On Sat, 2013-06-22 at 03:57 -0400, Peter Hurley wrote:
> > On 06/21/2013 07:51 PM, Tim Chen wrote:
> > > Introduce in this patch optimistic spinning for writer lock
> > > acquisition in read write semaphore. The logic is
> > > similar to
On Mon, 2013-06-24 at 10:46 +0200, Peter Zijlstra wrote:
> On Fri, Jun 21, 2013 at 04:51:40PM -0700, Tim Chen wrote:
> > Introduce in this patch optimistic spinning for writer lock
> > acquisition in read write semaphore. The logic is
> > similar to the optimistic spinning in mutex but without
> >
On Fri, Jun 21, 2013 at 04:51:40PM -0700, Tim Chen wrote:
> Introduce in this patch optimistic spinning for writer lock
> acquisition in read write semaphore. The logic is
> similar to the optimistic spinning in mutex but without
> the MCS lock queueing of the spinner. This provides a
> better ch
On Sat, 2013-06-22 at 03:57 -0400, Peter Hurley wrote:
> On 06/21/2013 07:51 PM, Tim Chen wrote:
> > Introduce in this patch optimistic spinning for writer lock
> > acquisition in read write semaphore. The logic is
> > similar to the optimistic spinning in mutex but without
> > the MCS lock queuei
On 06/21/2013 07:51 PM, Tim Chen wrote:
Introduce in this patch optimistic spinning for writer lock
acquisition in read write semaphore. The logic is
similar to the optimistic spinning in mutex but without
the MCS lock queueing of the spinner. This provides a
better chance for a writer to acqui
On Fri, 2013-06-21 at 16:51 -0700, Tim Chen wrote:
> Introduce in this patch optimistic spinning for writer lock
> acquisition in read write semaphore. The logic is
> similar to the optimistic spinning in mutex but without
> the MCS lock queueing of the spinner. This provides a
> better chance fo
Introduce in this patch optimistic spinning for writer lock
acquisition in read write semaphore. The logic is
similar to the optimistic spinning in mutex but without
the MCS lock queueing of the spinner. This provides a
better chance for a writer to acquire the lock before
being we block it and p
17 matches
Mail list logo