linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] locking: locktorture: Do not include rwlock.h directly
@ 2019-09-16 14:54 Sebastian Andrzej Siewior
  2019-09-16 15:36 ` Paul E. McKenney
  2019-09-17  7:16 ` Davidlohr Bueso
  0 siblings, 2 replies; 6+ messages in thread
From: Sebastian Andrzej Siewior @ 2019-09-16 14:54 UTC (permalink / raw)
  To: linux-kernel
  Cc: Davidlohr Bueso, Paul E. McKenney, Josh Triplett, Thomas Gleixner

From: Wolfgang M. Reimer <linuxball@gmail.com>

Including rwlock.h directly will cause kernel builds to fail
if CONFIG_PREEMPT_RT is defined. The correct header file
(rwlock_rt.h OR rwlock.h) will be included by spinlock.h which
is included by locktorture.c anyway.

Remove the include of linux/rwlock.h.

Signed-off-by: Wolfgang M. Reimer <linuxball@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 kernel/locking/locktorture.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
index c513031cd7e33..9fb042d610d23 100644
--- a/kernel/locking/locktorture.c
+++ b/kernel/locking/locktorture.c
@@ -16,7 +16,6 @@
 #include <linux/kthread.h>
 #include <linux/sched/rt.h>
 #include <linux/spinlock.h>
-#include <linux/rwlock.h>
 #include <linux/mutex.h>
 #include <linux/rwsem.h>
 #include <linux/smp.h>
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] locking: locktorture: Do not include rwlock.h directly
  2019-09-16 14:54 [PATCH] locking: locktorture: Do not include rwlock.h directly Sebastian Andrzej Siewior
@ 2019-09-16 15:36 ` Paul E. McKenney
  2019-09-17  7:16 ` Davidlohr Bueso
  1 sibling, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2019-09-16 15:36 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: linux-kernel, Davidlohr Bueso, Josh Triplett, Thomas Gleixner

On Mon, Sep 16, 2019 at 04:54:04PM +0200, Sebastian Andrzej Siewior wrote:
> From: Wolfgang M. Reimer <linuxball@gmail.com>
> 
> Including rwlock.h directly will cause kernel builds to fail
> if CONFIG_PREEMPT_RT is defined. The correct header file
> (rwlock_rt.h OR rwlock.h) will be included by spinlock.h which
> is included by locktorture.c anyway.
> 
> Remove the include of linux/rwlock.h.
> 
> Signed-off-by: Wolfgang M. Reimer <linuxball@gmail.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Queued for further review and testing, thank you both!

							Thanx, Paul

> ---
>  kernel/locking/locktorture.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
> index c513031cd7e33..9fb042d610d23 100644
> --- a/kernel/locking/locktorture.c
> +++ b/kernel/locking/locktorture.c
> @@ -16,7 +16,6 @@
>  #include <linux/kthread.h>
>  #include <linux/sched/rt.h>
>  #include <linux/spinlock.h>
> -#include <linux/rwlock.h>
>  #include <linux/mutex.h>
>  #include <linux/rwsem.h>
>  #include <linux/smp.h>
> -- 
> 2.23.0
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] locking: locktorture: Do not include rwlock.h directly
  2019-09-16 14:54 [PATCH] locking: locktorture: Do not include rwlock.h directly Sebastian Andrzej Siewior
  2019-09-16 15:36 ` Paul E. McKenney
@ 2019-09-17  7:16 ` Davidlohr Bueso
  2019-09-17 17:06   ` Paul E. McKenney
  1 sibling, 1 reply; 6+ messages in thread
From: Davidlohr Bueso @ 2019-09-17  7:16 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: linux-kernel, Paul E. McKenney, Josh Triplett, Thomas Gleixner

On Mon, 16 Sep 2019, Sebastian Andrzej Siewior wrote:

>From: Wolfgang M. Reimer <linuxball@gmail.com>
>
>Including rwlock.h directly will cause kernel builds to fail
>if CONFIG_PREEMPT_RT is defined. The correct header file
>(rwlock_rt.h OR rwlock.h) will be included by spinlock.h which
>is included by locktorture.c anyway.
>
>Remove the include of linux/rwlock.h.
>

Acked-by: Davidlohr Bueso <dbueso@suse.de>

>Signed-off-by: Wolfgang M. Reimer <linuxball@gmail.com>
>Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>---
> kernel/locking/locktorture.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
>index c513031cd7e33..9fb042d610d23 100644
>--- a/kernel/locking/locktorture.c
>+++ b/kernel/locking/locktorture.c
>@@ -16,7 +16,6 @@
> #include <linux/kthread.h>
> #include <linux/sched/rt.h>
> #include <linux/spinlock.h>
>-#include <linux/rwlock.h>
> #include <linux/mutex.h>
> #include <linux/rwsem.h>
> #include <linux/smp.h>
>-- 
>2.23.0
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] locking: locktorture: Do not include rwlock.h directly
  2019-09-17  7:16 ` Davidlohr Bueso
@ 2019-09-17 17:06   ` Paul E. McKenney
  2019-09-18  6:24     ` Davidlohr Bueso
  0 siblings, 1 reply; 6+ messages in thread
From: Paul E. McKenney @ 2019-09-17 17:06 UTC (permalink / raw)
  To: Davidlohr Bueso
  Cc: Sebastian Andrzej Siewior, linux-kernel, Josh Triplett, Thomas Gleixner

On Tue, Sep 17, 2019 at 12:16:14AM -0700, Davidlohr Bueso wrote:
> On Mon, 16 Sep 2019, Sebastian Andrzej Siewior wrote:
> 
> > From: Wolfgang M. Reimer <linuxball@gmail.com>
> > 
> > Including rwlock.h directly will cause kernel builds to fail
> > if CONFIG_PREEMPT_RT is defined. The correct header file
> > (rwlock_rt.h OR rwlock.h) will be included by spinlock.h which
> > is included by locktorture.c anyway.
> > 
> > Remove the include of linux/rwlock.h.
> > 
> 
> Acked-by: Davidlohr Bueso <dbueso@suse.de>

Applied, thank you!

But does anyone actually run locktorture?

							Thanx, Paul

> > Signed-off-by: Wolfgang M. Reimer <linuxball@gmail.com>
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> > ---
> > kernel/locking/locktorture.c | 1 -
> > 1 file changed, 1 deletion(-)
> > 
> > diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
> > index c513031cd7e33..9fb042d610d23 100644
> > --- a/kernel/locking/locktorture.c
> > +++ b/kernel/locking/locktorture.c
> > @@ -16,7 +16,6 @@
> > #include <linux/kthread.h>
> > #include <linux/sched/rt.h>
> > #include <linux/spinlock.h>
> > -#include <linux/rwlock.h>
> > #include <linux/mutex.h>
> > #include <linux/rwsem.h>
> > #include <linux/smp.h>
> > -- 
> > 2.23.0
> > 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] locking: locktorture: Do not include rwlock.h directly
  2019-09-17 17:06   ` Paul E. McKenney
@ 2019-09-18  6:24     ` Davidlohr Bueso
  2019-09-18 16:06       ` Paul E. McKenney
  0 siblings, 1 reply; 6+ messages in thread
From: Davidlohr Bueso @ 2019-09-18  6:24 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: Sebastian Andrzej Siewior, linux-kernel, Josh Triplett, Thomas Gleixner

On Tue, 17 Sep 2019, Paul E. McKenney wrote:

>On Tue, Sep 17, 2019 at 12:16:14AM -0700, Davidlohr Bueso wrote:
>> On Mon, 16 Sep 2019, Sebastian Andrzej Siewior wrote:
>>
>> > From: Wolfgang M. Reimer <linuxball@gmail.com>
>> >
>> > Including rwlock.h directly will cause kernel builds to fail
>> > if CONFIG_PREEMPT_RT is defined. The correct header file
>> > (rwlock_rt.h OR rwlock.h) will be included by spinlock.h which
>> > is included by locktorture.c anyway.
>> >
>> > Remove the include of linux/rwlock.h.
>> >
>>
>> Acked-by: Davidlohr Bueso <dbueso@suse.de>
>
>Applied, thank you!
>
>But does anyone actually run locktorture?

I do at least. I also know of cases of other folks making use of the
"framework" to test/pound on custom tailored locks -- ie btrfs tree lock.

I've also seen it in one or two academic papers.

Thanks,
Davidlohr

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] locking: locktorture: Do not include rwlock.h directly
  2019-09-18  6:24     ` Davidlohr Bueso
@ 2019-09-18 16:06       ` Paul E. McKenney
  0 siblings, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2019-09-18 16:06 UTC (permalink / raw)
  To: Davidlohr Bueso
  Cc: Sebastian Andrzej Siewior, linux-kernel, Josh Triplett, Thomas Gleixner

On Tue, Sep 17, 2019 at 11:24:04PM -0700, Davidlohr Bueso wrote:
> On Tue, 17 Sep 2019, Paul E. McKenney wrote:
> 
> > On Tue, Sep 17, 2019 at 12:16:14AM -0700, Davidlohr Bueso wrote:
> > > On Mon, 16 Sep 2019, Sebastian Andrzej Siewior wrote:
> > > 
> > > > From: Wolfgang M. Reimer <linuxball@gmail.com>
> > > >
> > > > Including rwlock.h directly will cause kernel builds to fail
> > > > if CONFIG_PREEMPT_RT is defined. The correct header file
> > > > (rwlock_rt.h OR rwlock.h) will be included by spinlock.h which
> > > > is included by locktorture.c anyway.
> > > >
> > > > Remove the include of linux/rwlock.h.
> > > >
> > > 
> > > Acked-by: Davidlohr Bueso <dbueso@suse.de>
> > 
> > Applied, thank you!
> > 
> > But does anyone actually run locktorture?
> 
> I do at least. I also know of cases of other folks making use of the
> "framework" to test/pound on custom tailored locks -- ie btrfs tree lock.
> 
> I've also seen it in one or two academic papers.

OK, I will hold off on a patch removing it, then.  ;-)

							Thanx, Paul

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-18 16:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16 14:54 [PATCH] locking: locktorture: Do not include rwlock.h directly Sebastian Andrzej Siewior
2019-09-16 15:36 ` Paul E. McKenney
2019-09-17  7:16 ` Davidlohr Bueso
2019-09-17 17:06   ` Paul E. McKenney
2019-09-18  6:24     ` Davidlohr Bueso
2019-09-18 16:06       ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).