Re: locking: Add kselftests for ww_mutex

2017-02-22 Thread Geert Uytterhoeven
Hi Chris, On Thu, Dec 1, 2016 at 12:47 PM, Chris Wilson wrote: > Nicolai Hähnle was looking into a deadlock within ww_mutexes (that has > been fixed by Peter's mutex rewrite) and to support his changes, I > thought it was be useful to have a small validation suite for ww_mutex. How long do these

[PATCH v2 5/8] locking: Add kselftests for ww_mutex ABBA deadlock detection

2016-12-01 Thread Chris Wilson
Signed-off-by: Chris Wilson Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Maarten Lankhorst Cc: Nicolai Hähnle --- kernel/locking/test-ww_mutex.c | 98 ++ 1 file changed, 98 insertions(+) diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mu

locking: Add kselftests for ww_mutex

2016-12-01 Thread Chris Wilson
Nicolai Hähnle was looking into a deadlock within ww_mutexes (that has been fixed by Peter's mutex rewrite) and to support his changes, I thought it was be useful to have a small validation suite for ww_mutex. -Chris

[PATCH v2 7/8] locking: Add kselftests for ww_mutex stress

2016-12-01 Thread Chris Wilson
v2: Use both inorder and reorder locking strategies Signed-off-by: Chris Wilson Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Maarten Lankhorst Cc: Nicolai Hähnle --- kernel/locking/test-ww_mutex.c | 254 + 1 file changed, 254 insertions(+) diff --git a/kern

[PATCH v2 4/8] locking: Add kselftests for ww_mutex AA deadlock detection

2016-12-01 Thread Chris Wilson
Signed-off-by: Chris Wilson Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Maarten Lankhorst Cc: Nicolai Hähnle --- kernel/locking/test-ww_mutex.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mutex

Re: [PATCH 4/4] locking: Add kselftests for ww_mutex stress

2016-11-30 Thread Chris Wilson
On Wed, Nov 30, 2016 at 01:29:39PM +0100, Maarten Lankhorst wrote: > > +static void stress_work(struct work_struct *work) > > +{ > > + struct stress *stress = container_of(work, typeof(*stress), work); > > + const int nlocks = stress->nlocks; > > + struct ww_mutex *locks = stress->locks; > >

Re: [PATCH 4/4] locking: Add kselftests for ww_mutex stress

2016-11-30 Thread Maarten Lankhorst
Op 30-11-16 om 01:35 schreef Chris Wilson: > Signed-off-by: Chris Wilson > Cc: Peter Zijlstra > Cc: Maarten Lankhorst > Cc: Nicolai Hähnle > --- > kernel/locking/test-ww_mutex.c | 134 > + > 1 file changed, 134 insertions(+) > > diff --git a/kernel/lock

[PATCH 2/4] locking: Add kselftests for ww_mutex AA deadlock detection

2016-11-29 Thread Chris Wilson
Signed-off-by: Chris Wilson Cc: Peter Zijlstra Cc: Maarten Lankhorst Cc: Nicolai Hähnle --- kernel/locking/test-ww_mutex.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mutex.c index e94b807e

[PATCH 3/4] locking: Add kselftests for ww_mutex ABBA deadlock detection

2016-11-29 Thread Chris Wilson
Signed-off-by: Chris Wilson Cc: Peter Zijlstra Cc: Maarten Lankhorst Cc: Nicolai Hähnle --- kernel/locking/test-ww_mutex.c | 75 ++ 1 file changed, 75 insertions(+) diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mutex.c index 02a4b

[PATCH 4/4] locking: Add kselftests for ww_mutex stress

2016-11-29 Thread Chris Wilson
Signed-off-by: Chris Wilson Cc: Peter Zijlstra Cc: Maarten Lankhorst Cc: Nicolai Hähnle --- kernel/locking/test-ww_mutex.c | 134 + 1 file changed, 134 insertions(+) diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mutex.c index 63a5