linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 15/15] seqlock: drop seqcount_ww_mutex_t
       [not found] <20220407085946.744568-1-christian.koenig@amd.com>
@ 2022-04-07  8:59 ` Christian König
  2022-04-07  9:19   ` Daniel Vetter
  2022-04-07  9:26   ` Peter Zijlstra
  0 siblings, 2 replies; 4+ messages in thread
From: Christian König @ 2022-04-07  8:59 UTC (permalink / raw)
  To: daniel.vetter, dri-devel, linux-media, linaro-mm-sig, intel-gfx
  Cc: Christian König, Peter Zijlstra, Ingo Molnar, Will Deacon,
	Waiman Long, Boqun Feng, linux-kernel

Daniel pointed out that this series removes the last user of
seqcount_ww_mutex_t, so let's drop this.

Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Will Deacon <will@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: linux-kernel@vger.kernel.org
---
 include/linux/seqlock.h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index 37ded6b8fee6..3926e9027947 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -17,7 +17,6 @@
 #include <linux/kcsan-checks.h>
 #include <linux/lockdep.h>
 #include <linux/mutex.h>
-#include <linux/ww_mutex.h>
 #include <linux/preempt.h>
 #include <linux/spinlock.h>
 
@@ -164,7 +163,7 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
  * static initializer or init function. This enables lockdep to validate
  * that the write side critical section is properly serialized.
  *
- * LOCKNAME:	raw_spinlock, spinlock, rwlock, mutex, or ww_mutex.
+ * LOCKNAME:	raw_spinlock, spinlock, rwlock or mutex
  */
 
 /*
@@ -184,7 +183,6 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
 #define seqcount_spinlock_init(s, lock)		seqcount_LOCKNAME_init(s, lock, spinlock)
 #define seqcount_rwlock_init(s, lock)		seqcount_LOCKNAME_init(s, lock, rwlock)
 #define seqcount_mutex_init(s, lock)		seqcount_LOCKNAME_init(s, lock, mutex)
-#define seqcount_ww_mutex_init(s, lock)		seqcount_LOCKNAME_init(s, lock, ww_mutex)
 
 /*
  * SEQCOUNT_LOCKNAME()	- Instantiate seqcount_LOCKNAME_t and helpers
@@ -277,7 +275,6 @@ SEQCOUNT_LOCKNAME(raw_spinlock, raw_spinlock_t,  false,    s->lock,        raw_s
 SEQCOUNT_LOCKNAME(spinlock,     spinlock_t,      __SEQ_RT, s->lock,        spin,     spin_lock(s->lock))
 SEQCOUNT_LOCKNAME(rwlock,       rwlock_t,        __SEQ_RT, s->lock,        read,     read_lock(s->lock))
 SEQCOUNT_LOCKNAME(mutex,        struct mutex,    true,     s->lock,        mutex,    mutex_lock(s->lock))
-SEQCOUNT_LOCKNAME(ww_mutex,     struct ww_mutex, true,     &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
 
 /*
  * SEQCNT_LOCKNAME_ZERO - static initializer for seqcount_LOCKNAME_t
@@ -304,8 +301,7 @@ SEQCOUNT_LOCKNAME(ww_mutex,     struct ww_mutex, true,     &s->lock->base, ww_mu
 	__seqprop_case((s),	raw_spinlock,	prop),			\
 	__seqprop_case((s),	spinlock,	prop),			\
 	__seqprop_case((s),	rwlock,		prop),			\
-	__seqprop_case((s),	mutex,		prop),			\
-	__seqprop_case((s),	ww_mutex,	prop))
+	__seqprop_case((s),	mutex,		prop))
 
 #define seqprop_ptr(s)			__seqprop(s, ptr)
 #define seqprop_sequence(s)		__seqprop(s, sequence)
-- 
2.25.1


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

* Re: [PATCH 15/15] seqlock: drop seqcount_ww_mutex_t
  2022-04-07  8:59 ` [PATCH 15/15] seqlock: drop seqcount_ww_mutex_t Christian König
@ 2022-04-07  9:19   ` Daniel Vetter
  2022-04-07 11:48     ` Christian König
  2022-04-07  9:26   ` Peter Zijlstra
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2022-04-07  9:19 UTC (permalink / raw)
  To: Christian König
  Cc: daniel.vetter, dri-devel, linux-media, linaro-mm-sig, intel-gfx,
	Christian König, Peter Zijlstra, Ingo Molnar, Will Deacon,
	Waiman Long, Boqun Feng, linux-kernel

On Thu, Apr 07, 2022 at 10:59:46AM +0200, Christian König wrote:
> Daniel pointed out that this series removes the last user of
> seqcount_ww_mutex_t, so let's drop this.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Waiman Long <longman@redhat.com>
> Cc: Boqun Feng <boqun.feng@gmail.com>
> Cc: linux-kernel@vger.kernel.org

Yeah I don't think we'll ever need this again, ww_mutex aren't common and
the ww_mutex+seqlock thing wasn't the brighest idea.

Peter/Ingo, assuming you agree, can you ack this for merging through
drm-misc, or want to pick this up later on when the last user disappeared
in Linus' tree?

Cheers, Daniel

> ---
>  include/linux/seqlock.h | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
> index 37ded6b8fee6..3926e9027947 100644
> --- a/include/linux/seqlock.h
> +++ b/include/linux/seqlock.h
> @@ -17,7 +17,6 @@
>  #include <linux/kcsan-checks.h>
>  #include <linux/lockdep.h>
>  #include <linux/mutex.h>
> -#include <linux/ww_mutex.h>
>  #include <linux/preempt.h>
>  #include <linux/spinlock.h>
>  
> @@ -164,7 +163,7 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
>   * static initializer or init function. This enables lockdep to validate
>   * that the write side critical section is properly serialized.
>   *
> - * LOCKNAME:	raw_spinlock, spinlock, rwlock, mutex, or ww_mutex.
> + * LOCKNAME:	raw_spinlock, spinlock, rwlock or mutex
>   */
>  
>  /*
> @@ -184,7 +183,6 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
>  #define seqcount_spinlock_init(s, lock)		seqcount_LOCKNAME_init(s, lock, spinlock)
>  #define seqcount_rwlock_init(s, lock)		seqcount_LOCKNAME_init(s, lock, rwlock)
>  #define seqcount_mutex_init(s, lock)		seqcount_LOCKNAME_init(s, lock, mutex)
> -#define seqcount_ww_mutex_init(s, lock)		seqcount_LOCKNAME_init(s, lock, ww_mutex)
>  
>  /*
>   * SEQCOUNT_LOCKNAME()	- Instantiate seqcount_LOCKNAME_t and helpers
> @@ -277,7 +275,6 @@ SEQCOUNT_LOCKNAME(raw_spinlock, raw_spinlock_t,  false,    s->lock,        raw_s
>  SEQCOUNT_LOCKNAME(spinlock,     spinlock_t,      __SEQ_RT, s->lock,        spin,     spin_lock(s->lock))
>  SEQCOUNT_LOCKNAME(rwlock,       rwlock_t,        __SEQ_RT, s->lock,        read,     read_lock(s->lock))
>  SEQCOUNT_LOCKNAME(mutex,        struct mutex,    true,     s->lock,        mutex,    mutex_lock(s->lock))
> -SEQCOUNT_LOCKNAME(ww_mutex,     struct ww_mutex, true,     &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
>  
>  /*
>   * SEQCNT_LOCKNAME_ZERO - static initializer for seqcount_LOCKNAME_t
> @@ -304,8 +301,7 @@ SEQCOUNT_LOCKNAME(ww_mutex,     struct ww_mutex, true,     &s->lock->base, ww_mu
>  	__seqprop_case((s),	raw_spinlock,	prop),			\
>  	__seqprop_case((s),	spinlock,	prop),			\
>  	__seqprop_case((s),	rwlock,		prop),			\
> -	__seqprop_case((s),	mutex,		prop),			\
> -	__seqprop_case((s),	ww_mutex,	prop))
> +	__seqprop_case((s),	mutex,		prop))
>  
>  #define seqprop_ptr(s)			__seqprop(s, ptr)
>  #define seqprop_sequence(s)		__seqprop(s, sequence)
> -- 
> 2.25.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH 15/15] seqlock: drop seqcount_ww_mutex_t
  2022-04-07  8:59 ` [PATCH 15/15] seqlock: drop seqcount_ww_mutex_t Christian König
  2022-04-07  9:19   ` Daniel Vetter
@ 2022-04-07  9:26   ` Peter Zijlstra
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2022-04-07  9:26 UTC (permalink / raw)
  To: Christian König
  Cc: daniel.vetter, dri-devel, linux-media, linaro-mm-sig, intel-gfx,
	Christian König, Ingo Molnar, Will Deacon, Waiman Long,
	Boqun Feng, linux-kernel

On Thu, Apr 07, 2022 at 10:59:46AM +0200, Christian König wrote:
> Daniel pointed out that this series removes the last user of
> seqcount_ww_mutex_t, so let's drop this.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

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

* Re: [PATCH 15/15] seqlock: drop seqcount_ww_mutex_t
  2022-04-07  9:19   ` Daniel Vetter
@ 2022-04-07 11:48     ` Christian König
  0 siblings, 0 replies; 4+ messages in thread
From: Christian König @ 2022-04-07 11:48 UTC (permalink / raw)
  To: Christian König, dri-devel, linux-media, linaro-mm-sig,
	intel-gfx, Peter Zijlstra, Ingo Molnar, Will Deacon, Waiman Long,
	Boqun Feng, linux-kernel

Am 07.04.22 um 11:19 schrieb Daniel Vetter:
> On Thu, Apr 07, 2022 at 10:59:46AM +0200, Christian König wrote:
>> Daniel pointed out that this series removes the last user of
>> seqcount_ww_mutex_t, so let's drop this.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> Cc: Peter Zijlstra <peterz@infradead.org>
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: Will Deacon <will@kernel.org>
>> Cc: Waiman Long <longman@redhat.com>
>> Cc: Boqun Feng <boqun.feng@gmail.com>
>> Cc: linux-kernel@vger.kernel.org
> Yeah I don't think we'll ever need this again, ww_mutex aren't common and
> the ww_mutex+seqlock thing wasn't the brighest idea.
>
> Peter/Ingo, assuming you agree, can you ack this for merging through
> drm-misc, or want to pick this up later on when the last user disappeared
> in Linus' tree?

Mpf, I didn't noticed that removing ww_mutex.h from seqlock.h is causing 
a problem for futex.h.

Just send out a patch to fix this because the build servers are pointing 
out now that drm-misc-next is broken.

Please review ASAP,
Christian.

>
> Cheers, Daniel
>
>> ---
>>   include/linux/seqlock.h | 8 ++------
>>   1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
>> index 37ded6b8fee6..3926e9027947 100644
>> --- a/include/linux/seqlock.h
>> +++ b/include/linux/seqlock.h
>> @@ -17,7 +17,6 @@
>>   #include <linux/kcsan-checks.h>
>>   #include <linux/lockdep.h>
>>   #include <linux/mutex.h>
>> -#include <linux/ww_mutex.h>
>>   #include <linux/preempt.h>
>>   #include <linux/spinlock.h>
>>   
>> @@ -164,7 +163,7 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
>>    * static initializer or init function. This enables lockdep to validate
>>    * that the write side critical section is properly serialized.
>>    *
>> - * LOCKNAME:	raw_spinlock, spinlock, rwlock, mutex, or ww_mutex.
>> + * LOCKNAME:	raw_spinlock, spinlock, rwlock or mutex
>>    */
>>   
>>   /*
>> @@ -184,7 +183,6 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
>>   #define seqcount_spinlock_init(s, lock)		seqcount_LOCKNAME_init(s, lock, spinlock)
>>   #define seqcount_rwlock_init(s, lock)		seqcount_LOCKNAME_init(s, lock, rwlock)
>>   #define seqcount_mutex_init(s, lock)		seqcount_LOCKNAME_init(s, lock, mutex)
>> -#define seqcount_ww_mutex_init(s, lock)		seqcount_LOCKNAME_init(s, lock, ww_mutex)
>>   
>>   /*
>>    * SEQCOUNT_LOCKNAME()	- Instantiate seqcount_LOCKNAME_t and helpers
>> @@ -277,7 +275,6 @@ SEQCOUNT_LOCKNAME(raw_spinlock, raw_spinlock_t,  false,    s->lock,        raw_s
>>   SEQCOUNT_LOCKNAME(spinlock,     spinlock_t,      __SEQ_RT, s->lock,        spin,     spin_lock(s->lock))
>>   SEQCOUNT_LOCKNAME(rwlock,       rwlock_t,        __SEQ_RT, s->lock,        read,     read_lock(s->lock))
>>   SEQCOUNT_LOCKNAME(mutex,        struct mutex,    true,     s->lock,        mutex,    mutex_lock(s->lock))
>> -SEQCOUNT_LOCKNAME(ww_mutex,     struct ww_mutex, true,     &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
>>   
>>   /*
>>    * SEQCNT_LOCKNAME_ZERO - static initializer for seqcount_LOCKNAME_t
>> @@ -304,8 +301,7 @@ SEQCOUNT_LOCKNAME(ww_mutex,     struct ww_mutex, true,     &s->lock->base, ww_mu
>>   	__seqprop_case((s),	raw_spinlock,	prop),			\
>>   	__seqprop_case((s),	spinlock,	prop),			\
>>   	__seqprop_case((s),	rwlock,		prop),			\
>> -	__seqprop_case((s),	mutex,		prop),			\
>> -	__seqprop_case((s),	ww_mutex,	prop))
>> +	__seqprop_case((s),	mutex,		prop))
>>   
>>   #define seqprop_ptr(s)			__seqprop(s, ptr)
>>   #define seqprop_sequence(s)		__seqprop(s, sequence)
>> -- 
>> 2.25.1
>>


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

end of thread, other threads:[~2022-04-07 11:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220407085946.744568-1-christian.koenig@amd.com>
2022-04-07  8:59 ` [PATCH 15/15] seqlock: drop seqcount_ww_mutex_t Christian König
2022-04-07  9:19   ` Daniel Vetter
2022-04-07 11:48     ` Christian König
2022-04-07  9:26   ` Peter Zijlstra

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).