All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 09/24] dept: Apply Dept to seqlock
  2022-03-04  7:06 [PATCH v4 00/24] DEPT(Dependency Tracker) Byungchul Park
@ 2022-03-04  7:06   ` Byungchul Park
  0 siblings, 0 replies; 6+ messages in thread
From: Byungchul Park @ 2022-03-04  7:06 UTC (permalink / raw)
  To: torvalds
  Cc: damien.lemoal, linux-ide, adilger.kernel, linux-ext4, mingo,
	linux-kernel, peterz, will, tglx, rostedt, joel, sashal,
	daniel.vetter, chris, duyuyang, johannes.berg, tj, tytso, willy,
	david, amir73il, bfields, gregkh, kernel-team, linux-mm, akpm,
	mhocko, minchan, hannes, vdavydov.dev, sj, jglisse, dennis, cl,
	penberg, rientjes, vbabka, ngupta, linux-block, paolo.valente,
	josef, linux-fsdevel, viro, jack, jack, jlayton, dan.j.williams,
	hch, djwong, dri-devel, airlied, rodrigosiqueiramelo, melissa.srw,
	hamohammed.sa

Makes Dept able to track dependencies by seqlock with adding wait
annotation on read side of seqlock.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
 include/linux/seqlock.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)

diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index 37ded6b..6e8ecd7 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -23,6 +23,25 @@
 
 #include <asm/processor.h>
 
+#ifdef CONFIG_DEPT
+#define DEPT_EVT_ALL		((1UL << DEPT_MAX_SUBCLASSES_EVT) - 1)
+#define dept_seq_wait(m, ip)	dept_wait(m, DEPT_EVT_ALL, ip, __func__, 0)
+#define dept_seq_writebegin(m, ip)				\
+do {								\
+	dept_ecxt_enter(m, 1UL, ip, __func__, "write_seqcount_end", 0);\
+	dept_ask_event(m);					\
+} while (0)
+#define dept_seq_writeend(m, ip)				\
+do {								\
+	dept_event(m, 1UL, ip, __func__);			\
+	dept_ecxt_exit(m, ip);					\
+} while (0)
+#else
+#define dept_seq_wait(m, ip)		do { } while (0)
+#define dept_seq_writebegin(m, ip)	do { } while (0)
+#define dept_seq_writeend(m, ip)	do { } while (0)
+#endif
+
 /*
  * The seqlock seqcount_t interface does not prescribe a precise sequence of
  * read begin/retry/end. For readers, typically there is a call to
@@ -148,7 +167,7 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
  * This lock-unlock technique must be implemented for all of PREEMPT_RT
  * sleeping locks.  See Documentation/locking/locktypes.rst
  */
-#if defined(CONFIG_LOCKDEP) || defined(CONFIG_PREEMPT_RT)
+#if defined(CONFIG_LOCKDEP) || defined(CONFIG_DEPT) || defined(CONFIG_PREEMPT_RT)
 #define __SEQ_LOCK(expr)	expr
 #else
 #define __SEQ_LOCK(expr)
@@ -203,6 +222,22 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
 	__SEQ_LOCK(locktype	*lock);					\
 } seqcount_##lockname##_t;						\
 									\
+static __always_inline void						\
+__seqprop_##lockname##_wait(const seqcount_##lockname##_t *s)		\
+{									\
+	__SEQ_LOCK(dept_seq_wait(&(lockmember)->dep_map.dmap, _RET_IP_));\
+}									\
+									\
+static __always_inline void						\
+__seqprop_##lockname##_writebegin(const seqcount_##lockname##_t *s)	\
+{									\
+}									\
+									\
+static __always_inline void						\
+__seqprop_##lockname##_writeend(const seqcount_##lockname##_t *s)	\
+{									\
+}									\
+									\
 static __always_inline seqcount_t *					\
 __seqprop_##lockname##_ptr(seqcount_##lockname##_t *s)			\
 {									\
@@ -271,6 +306,21 @@ static inline void __seqprop_assert(const seqcount_t *s)
 	lockdep_assert_preemption_disabled();
 }
 
+static inline void __seqprop_wait(seqcount_t *s)
+{
+	dept_seq_wait(&s->dep_map.dmap, _RET_IP_);
+}
+
+static inline void __seqprop_writebegin(seqcount_t *s)
+{
+	dept_seq_writebegin(&s->dep_map.dmap, _RET_IP_);
+}
+
+static inline void __seqprop_writeend(seqcount_t *s)
+{
+	dept_seq_writeend(&s->dep_map.dmap, _RET_IP_);
+}
+
 #define __SEQ_RT	IS_ENABLED(CONFIG_PREEMPT_RT)
 
 SEQCOUNT_LOCKNAME(raw_spinlock, raw_spinlock_t,  false,    s->lock,        raw_spin, raw_spin_lock(s->lock))
@@ -311,6 +361,9 @@ static inline void __seqprop_assert(const seqcount_t *s)
 #define seqprop_sequence(s)		__seqprop(s, sequence)
 #define seqprop_preemptible(s)		__seqprop(s, preemptible)
 #define seqprop_assert(s)		__seqprop(s, assert)
+#define seqprop_dept_wait(s)		__seqprop(s, wait)
+#define seqprop_dept_writebegin(s)	__seqprop(s, writebegin)
+#define seqprop_dept_writeend(s)	__seqprop(s, writeend)
 
 /**
  * __read_seqcount_begin() - begin a seqcount_t read section w/o barrier
@@ -360,6 +413,7 @@ static inline void __seqprop_assert(const seqcount_t *s)
 #define read_seqcount_begin(s)						\
 ({									\
 	seqcount_lockdep_reader_access(seqprop_ptr(s));			\
+	seqprop_dept_wait(s);						\
 	raw_read_seqcount_begin(s);					\
 })
 
@@ -512,6 +566,7 @@ static inline void do_raw_write_seqcount_end(seqcount_t *s)
 		preempt_disable();					\
 									\
 	do_write_seqcount_begin_nested(seqprop_ptr(s), subclass);	\
+	seqprop_dept_writebegin(s);					\
 } while (0)
 
 static inline void do_write_seqcount_begin_nested(seqcount_t *s, int subclass)
@@ -538,6 +593,7 @@ static inline void do_write_seqcount_begin_nested(seqcount_t *s, int subclass)
 		preempt_disable();					\
 									\
 	do_write_seqcount_begin(seqprop_ptr(s));			\
+	seqprop_dept_writebegin(s);					\
 } while (0)
 
 static inline void do_write_seqcount_begin(seqcount_t *s)
@@ -554,6 +610,7 @@ static inline void do_write_seqcount_begin(seqcount_t *s)
  */
 #define write_seqcount_end(s)						\
 do {									\
+	seqprop_dept_writeend(s);					\
 	do_write_seqcount_end(seqprop_ptr(s));				\
 									\
 	if (seqprop_preemptible(s))					\
-- 
1.9.1


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

* [PATCH v4 09/24] dept: Apply Dept to seqlock
@ 2022-03-04  7:06   ` Byungchul Park
  0 siblings, 0 replies; 6+ messages in thread
From: Byungchul Park @ 2022-03-04  7:06 UTC (permalink / raw)
  To: torvalds
  Cc: hamohammed.sa, jack, peterz, daniel.vetter, amir73il, david,
	dri-devel, chris, bfields, linux-ide, adilger.kernel, joel, cl,
	will, duyuyang, sashal, paolo.valente, damien.lemoal, willy, hch,
	airlied, mingo, djwong, vdavydov.dev, rientjes, dennis,
	linux-ext4, linux-mm, ngupta, johannes.berg, jack, dan.j.williams,
	josef, rostedt, linux-block, linux-fsdevel, jglisse, viro, tglx,
	mhocko, vbabka, melissa.srw, sj, tytso, rodrigosiqueiramelo,
	kernel-team, gregkh, jlayton, linux-kernel, penberg, minchan,
	hannes, tj, akpm

Makes Dept able to track dependencies by seqlock with adding wait
annotation on read side of seqlock.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
 include/linux/seqlock.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)

diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index 37ded6b..6e8ecd7 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -23,6 +23,25 @@
 
 #include <asm/processor.h>
 
+#ifdef CONFIG_DEPT
+#define DEPT_EVT_ALL		((1UL << DEPT_MAX_SUBCLASSES_EVT) - 1)
+#define dept_seq_wait(m, ip)	dept_wait(m, DEPT_EVT_ALL, ip, __func__, 0)
+#define dept_seq_writebegin(m, ip)				\
+do {								\
+	dept_ecxt_enter(m, 1UL, ip, __func__, "write_seqcount_end", 0);\
+	dept_ask_event(m);					\
+} while (0)
+#define dept_seq_writeend(m, ip)				\
+do {								\
+	dept_event(m, 1UL, ip, __func__);			\
+	dept_ecxt_exit(m, ip);					\
+} while (0)
+#else
+#define dept_seq_wait(m, ip)		do { } while (0)
+#define dept_seq_writebegin(m, ip)	do { } while (0)
+#define dept_seq_writeend(m, ip)	do { } while (0)
+#endif
+
 /*
  * The seqlock seqcount_t interface does not prescribe a precise sequence of
  * read begin/retry/end. For readers, typically there is a call to
@@ -148,7 +167,7 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
  * This lock-unlock technique must be implemented for all of PREEMPT_RT
  * sleeping locks.  See Documentation/locking/locktypes.rst
  */
-#if defined(CONFIG_LOCKDEP) || defined(CONFIG_PREEMPT_RT)
+#if defined(CONFIG_LOCKDEP) || defined(CONFIG_DEPT) || defined(CONFIG_PREEMPT_RT)
 #define __SEQ_LOCK(expr)	expr
 #else
 #define __SEQ_LOCK(expr)
@@ -203,6 +222,22 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
 	__SEQ_LOCK(locktype	*lock);					\
 } seqcount_##lockname##_t;						\
 									\
+static __always_inline void						\
+__seqprop_##lockname##_wait(const seqcount_##lockname##_t *s)		\
+{									\
+	__SEQ_LOCK(dept_seq_wait(&(lockmember)->dep_map.dmap, _RET_IP_));\
+}									\
+									\
+static __always_inline void						\
+__seqprop_##lockname##_writebegin(const seqcount_##lockname##_t *s)	\
+{									\
+}									\
+									\
+static __always_inline void						\
+__seqprop_##lockname##_writeend(const seqcount_##lockname##_t *s)	\
+{									\
+}									\
+									\
 static __always_inline seqcount_t *					\
 __seqprop_##lockname##_ptr(seqcount_##lockname##_t *s)			\
 {									\
@@ -271,6 +306,21 @@ static inline void __seqprop_assert(const seqcount_t *s)
 	lockdep_assert_preemption_disabled();
 }
 
+static inline void __seqprop_wait(seqcount_t *s)
+{
+	dept_seq_wait(&s->dep_map.dmap, _RET_IP_);
+}
+
+static inline void __seqprop_writebegin(seqcount_t *s)
+{
+	dept_seq_writebegin(&s->dep_map.dmap, _RET_IP_);
+}
+
+static inline void __seqprop_writeend(seqcount_t *s)
+{
+	dept_seq_writeend(&s->dep_map.dmap, _RET_IP_);
+}
+
 #define __SEQ_RT	IS_ENABLED(CONFIG_PREEMPT_RT)
 
 SEQCOUNT_LOCKNAME(raw_spinlock, raw_spinlock_t,  false,    s->lock,        raw_spin, raw_spin_lock(s->lock))
@@ -311,6 +361,9 @@ static inline void __seqprop_assert(const seqcount_t *s)
 #define seqprop_sequence(s)		__seqprop(s, sequence)
 #define seqprop_preemptible(s)		__seqprop(s, preemptible)
 #define seqprop_assert(s)		__seqprop(s, assert)
+#define seqprop_dept_wait(s)		__seqprop(s, wait)
+#define seqprop_dept_writebegin(s)	__seqprop(s, writebegin)
+#define seqprop_dept_writeend(s)	__seqprop(s, writeend)
 
 /**
  * __read_seqcount_begin() - begin a seqcount_t read section w/o barrier
@@ -360,6 +413,7 @@ static inline void __seqprop_assert(const seqcount_t *s)
 #define read_seqcount_begin(s)						\
 ({									\
 	seqcount_lockdep_reader_access(seqprop_ptr(s));			\
+	seqprop_dept_wait(s);						\
 	raw_read_seqcount_begin(s);					\
 })
 
@@ -512,6 +566,7 @@ static inline void do_raw_write_seqcount_end(seqcount_t *s)
 		preempt_disable();					\
 									\
 	do_write_seqcount_begin_nested(seqprop_ptr(s), subclass);	\
+	seqprop_dept_writebegin(s);					\
 } while (0)
 
 static inline void do_write_seqcount_begin_nested(seqcount_t *s, int subclass)
@@ -538,6 +593,7 @@ static inline void do_write_seqcount_begin_nested(seqcount_t *s, int subclass)
 		preempt_disable();					\
 									\
 	do_write_seqcount_begin(seqprop_ptr(s));			\
+	seqprop_dept_writebegin(s);					\
 } while (0)
 
 static inline void do_write_seqcount_begin(seqcount_t *s)
@@ -554,6 +610,7 @@ static inline void do_write_seqcount_begin(seqcount_t *s)
  */
 #define write_seqcount_end(s)						\
 do {									\
+	seqprop_dept_writeend(s);					\
 	do_write_seqcount_end(seqprop_ptr(s));				\
 									\
 	if (seqprop_preemptible(s))					\
-- 
1.9.1


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

* Re: [PATCH v4 09/24] dept: Apply Dept to seqlock
@ 2022-03-08 18:13 kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-03-08 18:13 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 4108 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <1646377603-19730-10-git-send-email-byungchul.park@lge.com>
References: <1646377603-19730-10-git-send-email-byungchul.park@lge.com>
TO: Byungchul Park <byungchul.park@lge.com>
TO: torvalds(a)linux-foundation.org
CC: hamohammed.sa(a)gmail.com
CC: jack(a)suse.cz
CC: peterz(a)infradead.org
CC: daniel.vetter(a)ffwll.ch
CC: amir73il(a)gmail.com
CC: david(a)fromorbit.com
CC: dri-devel(a)lists.freedesktop.org
CC: chris(a)chris-wilson.co.uk
CC: bfields(a)fieldses.org
CC: linux-ide(a)vger.kernel.org
CC: adilger.kernel(a)dilger.ca
CC: joel(a)joelfernandes.org
CC: cl(a)linux.com
CC: will(a)kernel.org
CC: duyuyang(a)gmail.com
CC: sashal(a)kernel.org
CC: paolo.valente(a)linaro.org
CC: damien.lemoal(a)opensource.wdc.com
CC: willy(a)infradead.org
CC: hch(a)infradead.org
CC: airlied(a)linux.ie
CC: mingo(a)redhat.com
CC: djwong(a)kernel.org
CC: vdavydov.dev(a)gmail.com
CC: rientjes(a)google.com
CC: dennis(a)kernel.org
CC: linux-ext4(a)vger.kernel.org
CC: linux-mm(a)kvack.org
CC: ngupta(a)vflare.org

Hi Byungchul,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/sched/core]
[also build test WARNING on linux/master linus/master v5.17-rc7]
[cannot apply to tip/locking/core hnaz-mm/master next-20220308]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Byungchul-Park/DEPT-Dependency-Tracker/20220304-150943
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 25795ef6299f07ce3838f3253a9cb34f64efcfae
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: s390-randconfig-m031-20220307 (https://download.01.org/0day-ci/archive/20220309/202203090250.tz4le5AI-lkp(a)intel.com/config)
compiler: s390-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
include/linux/cpuset.h:176 set_mems_allowed() warn: statement has no effect 31
kernel/cgroup/cpuset.c:1743 cpuset_change_task_nodemask() warn: statement has no effect 31
net/xfrm/xfrm_state.c:179 xfrm_hash_resize() warn: statement has no effect 31
net/xfrm/xfrm_policy.c:600 xfrm_bydst_resize() warn: statement has no effect 31
net/xfrm/xfrm_policy.c:1091 __xfrm_policy_inexact_prune_bin() warn: statement has no effect 31
net/xfrm/xfrm_policy.c:1148 xfrm_policy_inexact_alloc_chain() warn: statement has no effect 31
net/xfrm/xfrm_policy.c:1358 xfrm_hash_rebuild() warn: statement has no effect 31

Old smatch warnings:
net/xfrm/xfrm_policy.c:1162 xfrm_policy_inexact_alloc_chain() warn: statement has no effect 31
net/xfrm/xfrm_policy.c:1178 xfrm_policy_inexact_alloc_chain() warn: statement has no effect 31

vim +176 include/linux/cpuset.h

c0ff7453bb5c7c Miao Xie    2010-05-24  167  
58568d2a8215cb Miao Xie    2009-06-16  168  static inline void set_mems_allowed(nodemask_t nodemask)
58568d2a8215cb Miao Xie    2009-06-16  169  {
db751fe3ea6880 John Stultz 2013-10-07  170  	unsigned long flags;
db751fe3ea6880 John Stultz 2013-10-07  171  
c0ff7453bb5c7c Miao Xie    2010-05-24  172  	task_lock(current);
db751fe3ea6880 John Stultz 2013-10-07  173  	local_irq_save(flags);
cc9a6c8776615f Mel Gorman  2012-03-21  174  	write_seqcount_begin(&current->mems_allowed_seq);
58568d2a8215cb Miao Xie    2009-06-16  175  	current->mems_allowed = nodemask;
cc9a6c8776615f Mel Gorman  2012-03-21 @176  	write_seqcount_end(&current->mems_allowed_seq);
db751fe3ea6880 John Stultz 2013-10-07  177  	local_irq_restore(flags);
c0ff7453bb5c7c Miao Xie    2010-05-24  178  	task_unlock(current);
58568d2a8215cb Miao Xie    2009-06-16  179  }
58568d2a8215cb Miao Xie    2009-06-16  180  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

* Re: [PATCH v4 09/24] dept: Apply Dept to seqlock
@ 2022-03-08 20:15 kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-03-08 20:15 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5436 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <1646377603-19730-10-git-send-email-byungchul.park@lge.com>
References: <1646377603-19730-10-git-send-email-byungchul.park@lge.com>
TO: Byungchul Park <byungchul.park@lge.com>
TO: torvalds(a)linux-foundation.org
CC: hamohammed.sa(a)gmail.com
CC: jack(a)suse.cz
CC: peterz(a)infradead.org
CC: daniel.vetter(a)ffwll.ch
CC: amir73il(a)gmail.com
CC: david(a)fromorbit.com
CC: dri-devel(a)lists.freedesktop.org
CC: chris(a)chris-wilson.co.uk
CC: bfields(a)fieldses.org
CC: linux-ide(a)vger.kernel.org
CC: adilger.kernel(a)dilger.ca
CC: joel(a)joelfernandes.org
CC: cl(a)linux.com
CC: will(a)kernel.org
CC: duyuyang(a)gmail.com
CC: sashal(a)kernel.org
CC: paolo.valente(a)linaro.org
CC: damien.lemoal(a)opensource.wdc.com
CC: willy(a)infradead.org
CC: hch(a)infradead.org
CC: airlied(a)linux.ie
CC: mingo(a)redhat.com
CC: djwong(a)kernel.org
CC: vdavydov.dev(a)gmail.com
CC: rientjes(a)google.com
CC: dennis(a)kernel.org
CC: linux-ext4(a)vger.kernel.org
CC: linux-mm(a)kvack.org
CC: ngupta(a)vflare.org

Hi Byungchul,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/sched/core]
[also build test WARNING on linux/master linus/master v5.17-rc7]
[cannot apply to tip/locking/core hnaz-mm/master next-20220308]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Byungchul-Park/DEPT-Dependency-Tracker/20220304-150943
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 25795ef6299f07ce3838f3253a9cb34f64efcfae
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
config: i386-randconfig-m021-20220307 (https://download.01.org/0day-ci/archive/20220309/202203090409.joHNlb9j-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
kernel/time/timekeeping.c:1745 timekeeping_inject_sleeptime64() warn: statement has no effect 31
kernel/time/timekeeping.c:2462 hardpps() warn: statement has no effect 31

vim +1745 kernel/time/timekeeping.c

0fa88cb4b82b5cf Xunlei Pang     2015-04-01  1717  
304529b1b6f8612 John Stultz     2011-04-01  1718  /**
04d9089086a8231 pang.xunlei     2014-11-18  1719   * timekeeping_inject_sleeptime64 - Adds suspend interval to timeekeeping values
04d9089086a8231 pang.xunlei     2014-11-18  1720   * @delta: pointer to a timespec64 delta value
304529b1b6f8612 John Stultz     2011-04-01  1721   *
2ee966320028ac8 Xunlei Pang     2015-04-01  1722   * This hook is for architectures that cannot support read_persistent_clock64
304529b1b6f8612 John Stultz     2011-04-01  1723   * because their RTC/persistent clock is only accessible when irqs are enabled.
0fa88cb4b82b5cf Xunlei Pang     2015-04-01  1724   * and also don't have an effective nonstop clocksource.
304529b1b6f8612 John Stultz     2011-04-01  1725   *
304529b1b6f8612 John Stultz     2011-04-01  1726   * This function should only be called by rtc_resume(), and allows
304529b1b6f8612 John Stultz     2011-04-01  1727   * a suspend offset to be injected into the timekeeping values.
304529b1b6f8612 John Stultz     2011-04-01  1728   */
985e695074d3576 Ondrej Mosnacek 2018-07-13  1729  void timekeeping_inject_sleeptime64(const struct timespec64 *delta)
304529b1b6f8612 John Stultz     2011-04-01  1730  {
3fdb14fd1df7032 Thomas Gleixner 2014-07-16  1731  	struct timekeeper *tk = &tk_core.timekeeper;
92c1d3ed4dc0b8c John Stultz     2011-11-14  1732  	unsigned long flags;
304529b1b6f8612 John Stultz     2011-04-01  1733  
9a7a71b1d0968fc Thomas Gleixner 2013-02-21  1734  	raw_spin_lock_irqsave(&timekeeper_lock, flags);
3fdb14fd1df7032 Thomas Gleixner 2014-07-16  1735  	write_seqcount_begin(&tk_core.seq);
70471f2f061d593 John Stultz     2011-11-14  1736  
f473e5f467f6049 Mukesh Ojha     2018-07-17  1737  	suspend_timing_needed = false;
f473e5f467f6049 Mukesh Ojha     2018-07-17  1738  
4e250fdde9be505 John Stultz     2012-07-27  1739  	timekeeping_forward_now(tk);
304529b1b6f8612 John Stultz     2011-04-01  1740  
04d9089086a8231 pang.xunlei     2014-11-18  1741  	__timekeeping_inject_sleeptime(tk, delta);
304529b1b6f8612 John Stultz     2011-04-01  1742  
780427f0e113b4c David Vrabel    2013-06-27  1743  	timekeeping_update(tk, TK_CLEAR_NTP | TK_MIRROR | TK_CLOCK_WAS_SET);
304529b1b6f8612 John Stultz     2011-04-01  1744  
3fdb14fd1df7032 Thomas Gleixner 2014-07-16 @1745  	write_seqcount_end(&tk_core.seq);
9a7a71b1d0968fc Thomas Gleixner 2013-02-21  1746  	raw_spin_unlock_irqrestore(&timekeeper_lock, flags);
304529b1b6f8612 John Stultz     2011-04-01  1747  
17a1b8826b451c8 Thomas Gleixner 2021-07-13  1748  	/* Signal hrtimers about time change */
17a1b8826b451c8 Thomas Gleixner 2021-07-13  1749  	clock_was_set(CLOCK_SET_WALL | CLOCK_SET_BOOT);
304529b1b6f8612 John Stultz     2011-04-01  1750  }
7f2981393af31a8 Xunlei Pang     2015-04-01  1751  #endif
304529b1b6f8612 John Stultz     2011-04-01  1752  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

* Re: [PATCH v4 09/24] dept: Apply Dept to seqlock
@ 2022-03-09  2:14 kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-03-09  2:14 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 4146 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <1646377603-19730-10-git-send-email-byungchul.park@lge.com>
References: <1646377603-19730-10-git-send-email-byungchul.park@lge.com>
TO: Byungchul Park <byungchul.park@lge.com>
TO: torvalds(a)linux-foundation.org
CC: hamohammed.sa(a)gmail.com
CC: jack(a)suse.cz
CC: peterz(a)infradead.org
CC: daniel.vetter(a)ffwll.ch
CC: amir73il(a)gmail.com
CC: david(a)fromorbit.com
CC: dri-devel(a)lists.freedesktop.org
CC: chris(a)chris-wilson.co.uk
CC: bfields(a)fieldses.org
CC: linux-ide(a)vger.kernel.org
CC: adilger.kernel(a)dilger.ca
CC: joel(a)joelfernandes.org
CC: cl(a)linux.com
CC: will(a)kernel.org
CC: duyuyang(a)gmail.com
CC: sashal(a)kernel.org
CC: paolo.valente(a)linaro.org
CC: damien.lemoal(a)opensource.wdc.com
CC: willy(a)infradead.org
CC: hch(a)infradead.org
CC: airlied(a)linux.ie
CC: mingo(a)redhat.com
CC: djwong(a)kernel.org
CC: vdavydov.dev(a)gmail.com
CC: rientjes(a)google.com
CC: dennis(a)kernel.org
CC: linux-ext4(a)vger.kernel.org
CC: linux-mm(a)kvack.org
CC: ngupta(a)vflare.org

Hi Byungchul,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/sched/core]
[also build test WARNING on linux/master linus/master v5.17-rc7]
[cannot apply to tip/locking/core hnaz-mm/master next-20220308]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Byungchul-Park/DEPT-Dependency-Tracker/20220304-150943
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 25795ef6299f07ce3838f3253a9cb34f64efcfae
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
config: s390-randconfig-m031-20220307 (https://download.01.org/0day-ci/archive/20220309/202203091030.l5aOvVhx-lkp(a)intel.com/config)
compiler: s390-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
arch/s390/kvm/../../../virt/kvm/eventfd.c:264 irqfd_update() warn: statement has no effect 31
arch/s390/kvm/../../../virt/kvm/eventfd.c:560 kvm_irqfd_deassign() warn: statement has no effect 31

vim +264 arch/s390/kvm/../../../virt/kvm/eventfd.c

721eecbf4fe995c Gregory Haskins    2009-05-20  246  
bd2b53b20fcd0d6 Michael S. Tsirkin 2010-11-18  247  /* Must be called under irqfds.lock */
166c9775f1f8b8f Eric Auger         2015-09-18  248  static void irqfd_update(struct kvm *kvm, struct kvm_kernel_irqfd *irqfd)
bd2b53b20fcd0d6 Michael S. Tsirkin 2010-11-18  249  {
bd2b53b20fcd0d6 Michael S. Tsirkin 2010-11-18  250  	struct kvm_kernel_irq_routing_entry *e;
8ba918d488caded Paul Mackerras     2014-06-30  251  	struct kvm_kernel_irq_routing_entry entries[KVM_NR_IRQCHIPS];
351dc6477cd3513 Andrey Smetanin    2015-10-16  252  	int n_entries;
8ba918d488caded Paul Mackerras     2014-06-30  253  
9957c86d659a4d5 Paul Mackerras     2014-06-30  254  	n_entries = kvm_irq_map_gsi(kvm, entries, irqfd->gsi);
bd2b53b20fcd0d6 Michael S. Tsirkin 2010-11-18  255  
56f89f3629ffd1a Paul Mackerras     2014-06-30  256  	write_seqcount_begin(&irqfd->irq_entry_sc);
56f89f3629ffd1a Paul Mackerras     2014-06-30  257  
8ba918d488caded Paul Mackerras     2014-06-30  258  	e = entries;
351dc6477cd3513 Andrey Smetanin    2015-10-16  259  	if (n_entries == 1)
56f89f3629ffd1a Paul Mackerras     2014-06-30  260  		irqfd->irq_entry = *e;
351dc6477cd3513 Andrey Smetanin    2015-10-16  261  	else
351dc6477cd3513 Andrey Smetanin    2015-10-16  262  		irqfd->irq_entry.type = 0;
56f89f3629ffd1a Paul Mackerras     2014-06-30  263  
56f89f3629ffd1a Paul Mackerras     2014-06-30 @264  	write_seqcount_end(&irqfd->irq_entry_sc);
bd2b53b20fcd0d6 Michael S. Tsirkin 2010-11-18  265  }
bd2b53b20fcd0d6 Michael S. Tsirkin 2010-11-18  266  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

* Re: [PATCH v4 09/24] dept: Apply Dept to seqlock
@ 2022-03-10  3:22 kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-03-10  3:22 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5090 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <1646377603-19730-10-git-send-email-byungchul.park@lge.com>
References: <1646377603-19730-10-git-send-email-byungchul.park@lge.com>
TO: Byungchul Park <byungchul.park@lge.com>
TO: torvalds(a)linux-foundation.org
CC: hamohammed.sa(a)gmail.com
CC: jack(a)suse.cz
CC: peterz(a)infradead.org
CC: daniel.vetter(a)ffwll.ch
CC: amir73il(a)gmail.com
CC: david(a)fromorbit.com
CC: dri-devel(a)lists.freedesktop.org
CC: chris(a)chris-wilson.co.uk
CC: bfields(a)fieldses.org
CC: linux-ide(a)vger.kernel.org
CC: adilger.kernel(a)dilger.ca
CC: joel(a)joelfernandes.org
CC: cl(a)linux.com
CC: will(a)kernel.org
CC: duyuyang(a)gmail.com
CC: sashal(a)kernel.org
CC: paolo.valente(a)linaro.org
CC: damien.lemoal(a)opensource.wdc.com
CC: willy(a)infradead.org
CC: hch(a)infradead.org
CC: airlied(a)linux.ie
CC: mingo(a)redhat.com
CC: djwong(a)kernel.org
CC: vdavydov.dev(a)gmail.com
CC: rientjes(a)google.com
CC: dennis(a)kernel.org
CC: linux-ext4(a)vger.kernel.org
CC: linux-mm(a)kvack.org
CC: ngupta(a)vflare.org

Hi Byungchul,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/sched/core]
[also build test WARNING on linux/master linus/master v5.17-rc7]
[cannot apply to tip/locking/core hnaz-mm/master next-20220309]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Byungchul-Park/DEPT-Dependency-Tracker/20220304-150943
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 25795ef6299f07ce3838f3253a9cb34f64efcfae
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: i386-randconfig-m031-20220307 (https://download.01.org/0day-ci/archive/20220310/202203101159.1eFVxMBQ-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
arch/x86/kvm/../../../virt/kvm/eventfd.c:264 irqfd_update() warn: statement has no effect 31
arch/x86/kvm/../../../virt/kvm/eventfd.c:560 kvm_irqfd_deassign() warn: statement has no effect 31
arch/x86/kvm/x86.c:2852 kvm_end_pvclock_update() warn: statement has no effect 31
drivers/md/raid5.c:8241 raid5_start_reshape() warn: statement has no effect 31

Old smatch warnings:
arch/x86/kvm/x86.c:1021 __kvm_set_xcr() warn: bitwise AND condition is false here
arch/x86/kvm/x86.c:1022 __kvm_set_xcr() warn: bitwise AND condition is false here
arch/x86/kvm/x86.c:5135 kvm_arch_tsc_set_attr() warn: check for integer overflow 'offset'
arch/x86/kvm/x86.c:5176 kvm_vcpu_ioctl_device_attr() error: uninitialized symbol 'r'.
arch/x86/kvm/x86.c:9569 enter_smm() warn: inconsistent indenting
drivers/md/raid5.c:2841 raid5_end_write_request() error: uninitialized symbol 'rdev'.
drivers/md/raid5.c:2846 raid5_end_write_request() error: uninitialized symbol 'rdev'.
drivers/md/raid5.c:6989 alloc_thread_groups() warn: double check that we're allocating correct size: 148 vs 1
drivers/md/raid5.c:8311 raid5_start_reshape() warn: statement has no effect 31

vim +264 arch/x86/kvm/../../../virt/kvm/eventfd.c

721eecbf4fe995 Gregory Haskins    2009-05-20  246  
bd2b53b20fcd0d Michael S. Tsirkin 2010-11-18  247  /* Must be called under irqfds.lock */
166c9775f1f8b8 Eric Auger         2015-09-18  248  static void irqfd_update(struct kvm *kvm, struct kvm_kernel_irqfd *irqfd)
bd2b53b20fcd0d Michael S. Tsirkin 2010-11-18  249  {
bd2b53b20fcd0d Michael S. Tsirkin 2010-11-18  250  	struct kvm_kernel_irq_routing_entry *e;
8ba918d488cade Paul Mackerras     2014-06-30  251  	struct kvm_kernel_irq_routing_entry entries[KVM_NR_IRQCHIPS];
351dc6477cd351 Andrey Smetanin    2015-10-16  252  	int n_entries;
8ba918d488cade Paul Mackerras     2014-06-30  253  
9957c86d659a4d Paul Mackerras     2014-06-30  254  	n_entries = kvm_irq_map_gsi(kvm, entries, irqfd->gsi);
bd2b53b20fcd0d Michael S. Tsirkin 2010-11-18  255  
56f89f3629ffd1 Paul Mackerras     2014-06-30  256  	write_seqcount_begin(&irqfd->irq_entry_sc);
56f89f3629ffd1 Paul Mackerras     2014-06-30  257  
8ba918d488cade Paul Mackerras     2014-06-30  258  	e = entries;
351dc6477cd351 Andrey Smetanin    2015-10-16  259  	if (n_entries == 1)
56f89f3629ffd1 Paul Mackerras     2014-06-30  260  		irqfd->irq_entry = *e;
351dc6477cd351 Andrey Smetanin    2015-10-16  261  	else
351dc6477cd351 Andrey Smetanin    2015-10-16  262  		irqfd->irq_entry.type = 0;
56f89f3629ffd1 Paul Mackerras     2014-06-30  263  
56f89f3629ffd1 Paul Mackerras     2014-06-30 @264  	write_seqcount_end(&irqfd->irq_entry_sc);
bd2b53b20fcd0d Michael S. Tsirkin 2010-11-18  265  }
bd2b53b20fcd0d Michael S. Tsirkin 2010-11-18  266  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

end of thread, other threads:[~2022-03-10  3:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-08 18:13 [PATCH v4 09/24] dept: Apply Dept to seqlock kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-03-10  3:22 kernel test robot
2022-03-09  2:14 kernel test robot
2022-03-08 20:15 kernel test robot
2022-03-04  7:06 [PATCH v4 00/24] DEPT(Dependency Tracker) Byungchul Park
2022-03-04  7:06 ` [PATCH v4 09/24] dept: Apply Dept to seqlock Byungchul Park
2022-03-04  7:06   ` Byungchul Park

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.