Re: [PATCH 3/9] locktorture: Support mutexes

2014-09-12 Thread Davidlohr Bueso
On Fri, 2014-09-12 at 12:12 -0700, Paul E. McKenney wrote: > On Fri, Sep 12, 2014 at 11:56:31AM -0700, Davidlohr Bueso wrote: > > On Fri, 2014-09-12 at 11:02 -0700, Paul E. McKenney wrote: > > > On Thu, Sep 11, 2014 at 08:40:18PM -0700, Davidlohr Bueso wrote: > > > > +static void

Re: [PATCH 3/9] locktorture: Support mutexes

2014-09-12 Thread Paul E. McKenney
On Fri, Sep 12, 2014 at 11:56:31AM -0700, Davidlohr Bueso wrote: > On Fri, 2014-09-12 at 11:02 -0700, Paul E. McKenney wrote: > > On Thu, Sep 11, 2014 at 08:40:18PM -0700, Davidlohr Bueso wrote: > > > +static void torture_mutex_delay(struct torture_random_state *trsp) > > > +{ > > > + const

Re: [PATCH 3/9] locktorture: Support mutexes

2014-09-12 Thread Davidlohr Bueso
On Fri, 2014-09-12 at 11:02 -0700, Paul E. McKenney wrote: > On Thu, Sep 11, 2014 at 08:40:18PM -0700, Davidlohr Bueso wrote: > > +static void torture_mutex_delay(struct torture_random_state *trsp) > > +{ > > + const unsigned long longdelay_ms = 100; > > + > > + /* We want a long delay

Re: [PATCH 3/9] locktorture: Support mutexes

2014-09-12 Thread Paul E. McKenney
On Thu, Sep 11, 2014 at 08:40:18PM -0700, Davidlohr Bueso wrote: > Add a "mutex_lock" torture test. The main difference with the already > existing spinlock tests is that the latency of the critical region > is much larger. We randomly delay for (arbitrarily) either 500 ms or, > otherwise, 25 ms.

Re: [PATCH 3/9] locktorture: Support mutexes

2014-09-12 Thread Paul E. McKenney
On Thu, Sep 11, 2014 at 08:40:18PM -0700, Davidlohr Bueso wrote: Add a mutex_lock torture test. The main difference with the already existing spinlock tests is that the latency of the critical region is much larger. We randomly delay for (arbitrarily) either 500 ms or, otherwise, 25 ms. While

Re: [PATCH 3/9] locktorture: Support mutexes

2014-09-12 Thread Davidlohr Bueso
On Fri, 2014-09-12 at 11:02 -0700, Paul E. McKenney wrote: On Thu, Sep 11, 2014 at 08:40:18PM -0700, Davidlohr Bueso wrote: +static void torture_mutex_delay(struct torture_random_state *trsp) +{ + const unsigned long longdelay_ms = 100; + + /* We want a long delay occasionally to

Re: [PATCH 3/9] locktorture: Support mutexes

2014-09-12 Thread Paul E. McKenney
On Fri, Sep 12, 2014 at 11:56:31AM -0700, Davidlohr Bueso wrote: On Fri, 2014-09-12 at 11:02 -0700, Paul E. McKenney wrote: On Thu, Sep 11, 2014 at 08:40:18PM -0700, Davidlohr Bueso wrote: +static void torture_mutex_delay(struct torture_random_state *trsp) +{ + const unsigned long

Re: [PATCH 3/9] locktorture: Support mutexes

2014-09-12 Thread Davidlohr Bueso
On Fri, 2014-09-12 at 12:12 -0700, Paul E. McKenney wrote: On Fri, Sep 12, 2014 at 11:56:31AM -0700, Davidlohr Bueso wrote: On Fri, 2014-09-12 at 11:02 -0700, Paul E. McKenney wrote: On Thu, Sep 11, 2014 at 08:40:18PM -0700, Davidlohr Bueso wrote: +static void torture_mutex_delay(struct