locking/lockdep: restore cross-release checks
Subsystems (11)
PATCH 1/12 locking/lockdep: restore cross-release checks
This reverts the following commits:
527187d28569 ("locking/lockdep: Remove cross-release leftovers") dba04eb76df9 ("locking/Documentation: Remove stale crossrelease_fullstack parameter") e966eaeeb623 ("locking/lockdep: Remove the cross-release locking checks")
Since the first two are just fixups for the cross-release removal I figured I'll squash them all into one.
--- .../admin-guide/kernel-parameters.txt | 3 + Documentation/locking/crossrelease.txt | 874 ++++++++++++++++++ include/linux/completion.h | 46 + include/linux/irqflags.h | 4 + include/linux/lockdep.h | 127 +++ include/linux/sched.h | 11 + kernel/locking/lockdep.c | 652 ++++++++++++- kernel/sched/completion.c | 5 + lib/Kconfig.debug | 33 + 9 files changed, 1720 insertions(+), 35 deletions(-) create mode 100644 Documentation/locking/crossrelease.txt
Documentation/admin-guide/kernel-parameters.txt +3 -0
@@ -724,6 +724,9 @@ It will be ignored when crashkernel=X,high is not used or memory reserved is below 4G. + crossrelease_fullstack + [KNL] Allow to record full stack trace in cross-release + cryptomgr.notests [KNL] Disable crypto self-tests
Documentation/locking/crossrelease.txt new file +874 -0
874 lines not on this page · raw message
include/linux/completion.h +46 -0
67 lines not on this page · raw message
include/linux/irqflags.h +4 -0
@@ -38,18 +38,22 @@# define trace_hardirq_enter () \ do { \ current->hardirq_context++; \ + crossrelease_hist_start(XHLOCK_HARD); \ } while (0)# define trace_hardirq_exit () \ do { \ current->hardirq_context--; \ + crossrelease_hist_end(XHLOCK_HARD); \ } while (0)# define lockdep_softirq_enter () \ do { \ current->softirq_context++; \ + crossrelease_hist_start(XHLOCK_SOFT); \ } while (0)# define lockdep_softirq_exit () \ do { \ current->softirq_context--; \ + crossrelease_hist_end(XHLOCK_SOFT); \ } while (0)#else # define trace_hardirqs_on () do { } while (0)
include/linux/lockdep.h +127 -0
156 lines not on this page · raw message
include/linux/sched.h +11 -0
@@ -936,6 +936,17 @@ struct task_struct {struct held_lock held_locks[MAX_LOCK_DEPTH ];#endif +#ifdef CONFIG_LOCKDEP_CROSSRELEASE +#define MAX_XHLOCKS_NR 64UL +struct hist_lock *xhlocks;/* Crossrelease history locks */ +unsigned int xhlock_idx; +/* For restoring at history boundaries */ +unsigned int xhlock_idx_hist[XHLOCK_CTX_NR ]; +unsigned int hist_id; +/* For overwrite check at each context exit */ +unsigned int hist_id_save[XHLOCK_CTX_NR ]; +#endif +#ifdef CONFIG_UBSAN unsigned int in_ubsan;#endif
kernel/locking/lockdep.c +617 -35
746 lines not on this page · raw message
kernel/sched/completion.c +5 -0
@@ -31,6 +31,11 @@ void complete(struct completion *x)spin_lock_irqsave (&x->wait.lock, flags); +/* +* Perform commit of crossrelease here. +*/ +complete_release_commit (x); +if (x->done !=UINT_MAX ) x->done++;__wake_up_locked (&x->wait,TASK_NORMAL ,1 );
lib/Kconfig.debug +33 -0
@@ -1055,6 +1055,8 @@ config PROVE_LOCKING select DEBUG_RWSEMS if RWSEM_SPIN_ON_OWNER select DEBUG_WW_MUTEX_SLOWPATH select DEBUG_LOCK_ALLOC + select LOCKDEP_CROSSRELEASE + select LOCKDEP_COMPLETIONS select TRACE_IRQFLAGS default n help
@@ -1187,6 +1189,37 @@ config LOCKDEP config LOCKDEP_SMALL bool +config LOCKDEP_CROSSRELEASE + bool + help + This makes lockdep work for crosslock which is a lock allowed to + be released in a different context from the acquisition context. + Normally a lock must be released in the context acquiring the lock. + However, relexing this constraint helps synchronization primitives + such as page locks or completions can use the lock correctness + detector, lockdep. + +config LOCKDEP_COMPLETIONS + bool + help + A deadlock caused by wait_for_completion() and complete() can be + detected by lockdep using crossrelease feature. + +config BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK + bool "Enable the boot parameter, crossrelease_fullstack" + depends on LOCKDEP_CROSSRELEASE + default n + help + The lockdep "cross-release" feature needs to record stack traces + (of calling functions) for all acquisitions, for eventual later + use during analysis. By default only a single caller is recorded, + because the unwind operation can be very expensive with deeper + stack chains. + + However a boot parameter, crossrelease_fullstack, was + introduced since sometimes deeper traces are required for full + analysis. This option turns on the boot parameter. + config DEBUG_LOCKDEP bool "Lock dependency engine debugging" depends on DEBUG_KERNEL && LOCKDEP
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/12 kthread: finer-grained lockdep/cross-release completion
When cross release was originally merged we've hit a bunch of lockdep splats around the 2 kthread completions. In all cases they are because totally independent uses of kthread are mixed up by lockdep into the same locking class, creating artificial deadlocks.
Fix this by converting kthread code in the same way as e.g. alloc_workqueue already works: Use macros for the public api so we can have a callsite specific lockdep key, then pass that through the entire callchain. Due to the many entry points this is slightly tedious.
Cc: Tvrtko Ursulin <[email protected]>
Cc: Marta Lofstedt <[email protected]>
Cc: Byungchul Park <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Shaohua Li <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: "Steven Rostedt (VMware)" <[email protected]>
Cc: Snild Dolkow <[email protected]>
References: https://bugs.freedesktop.org/show_bug.cgi?id=103950
--
Peter acked the original patch but then cross-release got removed before this one here landed.
-Daniel
--- include/linux/kthread.h | 48 ++++++++++++++++++++++++----- kernel/kthread.c | 68 ++++++++++++++++++++++++++++------------- 2 files changed, 88 insertions(+), 28 deletions(-)
include/linux/kthread.h +41 -7
@@ -6,10 +6,12 @@#include <linux/sched.h> #include <linux/cgroup.h> -__printf(4, 5) -struct task_struct *kthread_create_on_node (int (*threadfn)(void *data), +__printf(6, 7) +struct task_struct *_kthread_create_on_node (int (*threadfn)(void *data),void *data,int node, +struct lock_class_key *exited_key, +struct lock_class_key *parked_key,const char namefmt[], ...);/**
@@ -25,12 +27,27 @@ struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),*/ #define kthread_create(threadfn, data, namefmt, arg...) \ kthread_create_on_node(threadfn, data, NUMA_NO_NODE, namefmt, ##arg) +#define kthread_create_on_node(threadfn, data, node, namefmt, arg...) \ +({ \ + static struct lock_class_key __exited_key, __parked_key; \ + _kthread_create_on_node(threadfn, data, node, &__exited_key, \ + &__parked_key, namefmt, ##arg); \ +}) -struct task_struct *kthread_create_on_cpu (int (*threadfn)(void *data), +struct task_struct *_kthread_create_on_cpu (int (*threadfn)(void *data),void *data,unsigned int cpu, +struct lock_class_key *exited_key, +struct lock_class_key *parked_key,const char *namefmt); +#define kthread_create_on_cpu (threadfn, data, cpu, namefmt) \ +({ \ + static struct lock_class_key __exited_key, __parked_key; \ + _kthread_create_on_cpu(threadfn, data, cpu, &__exited_key,\ + &__parked_key, namefmt); \ +}) +/** * kthread_run - create and wake a thread.
@@ -171,13 +188,30 @@ extern void __kthread_init_worker(struct kthread_worker *worker,int kthread_worker_fn (void *worker_ptr); -__printf(2, 3) +__printf(4, 5)struct kthread_worker * -kthread_create_worker (unsigned int flags,const char namefmt[], ...); +_kthread_create_worker (unsigned int flags, +struct lock_class_key *exited_key, +struct lock_class_key *parked_key, +const char namefmt[], ...); +#define kthread_create_worker(flags, namefmt...) \ +({ \ + static struct lock_class_key __exited_key, __parked_key; \ + _kthread_create_worker(flags, &__exited_key, &__parked_key, \ + ##namefmt); \ +}) -__printf(3, 4) struct kthread_worker * -kthread_create_worker_on_cpu (int cpu,unsigned int flags, +__printf(5, 6) struct kthread_worker * +_kthread_create_worker_on_cpu (int cpu,unsigned int flags, +struct lock_class_key *exited_key, +struct lock_class_key *parked_key,const char namefmt[], ...); +#define kthread_create_worker_on_cpu(cpu, flags, namefmt...) \ +({ \ + static struct lock_class_key __exited_key, __parked_key; \ + _kthread_create_worker_on_cpu(cpu, flags, &__exited_key, &__parked_key,\ + ##namefmt); \ +})bool kthread_queue_work (struct kthread_worker *worker,struct kthread_work *work);
kernel/kthread.c +47 -21
164 lines not on this page · raw message
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/12 lockdep: Remove GFP_NOLOCKDEP annotation
In reply to Daniel VetterThis was originally added in 7e7844226f10 ("lockdep: allow to disable reclaim lockup detection") but a git log -G "GFP_NOLOCKDEP" indicates it was never used.
--- include/linux/gfp.h | 10 +--------- mm/page_alloc.c | 3 --- 2 files changed, 1 insertion(+), 12 deletions(-)
include/linux/gfp.h +1 -9
@@ -39,11 +39,6 @@ struct vm_area_struct;#define ___GFP_ACCOUNT 0x100000u#define ___GFP_DIRECT_RECLAIM 0x200000u#define ___GFP_KSWAPD_RECLAIM 0x400000u -#ifdef CONFIG_LOCKDEP -#define ___GFP_NOLOCKDEP 0x800000u -#else -#define ___GFP_NOLOCKDEP 0 -#endif /* If the above are modified, __GFP_BITS_SHIFT may need updating */ /*
@@ -213,11 +208,8 @@ struct vm_area_struct;#define __GFP_COMP ((__force gfp_t)___GFP_COMP)#define __GFP_ZERO ((__force gfp_t)___GFP_ZERO) -/* Disable lockdep for GFP context tracking */ -#define __GFP_NOLOCKDEP ((__force gfp_t)___GFP_NOLOCKDEP) -/* Room for N __GFP_FOO bits */ -#define __GFP_BITS_SHIFT (23 + IS_ENABLED(CONFIG_LOCKDEP)) +#define __GFP_BITS_SHIFT 23#define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1))/**
mm/page_alloc.c +0 -3
@@ -3717,9 +3717,6 @@ static bool __need_fs_reclaim(gfp_t gfp_mask)if (!(gfp_mask & __GFP_FS))return false; -if (gfp_mask & __GFP_NOLOCKDEP) -return false; -return true; }
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/12 kernel/lockdep: Make cross-release a config option
In reply to Daniel Vettercross-release annotations will need some serious amounts of vetting before they can be enabled by default, or we'll just annoy everyone.
Instead split it into a separate option, which for now stays disabled by default even if you enable overall lockdep.
--- lib/Kconfig.debug | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
lib/Kconfig.debug +12 -12
@@ -1055,8 +1055,6 @@ config PROVE_LOCKING select DEBUG_RWSEMS if RWSEM_SPIN_ON_OWNER select DEBUG_WW_MUTEX_SLOWPATH select DEBUG_LOCK_ALLOC - select LOCKDEP_CROSSRELEASE - select LOCKDEP_COMPLETIONS select TRACE_IRQFLAGS default n help
@@ -1093,6 +1091,18 @@ config PROVE_LOCKING For more details, see Documentation/locking/lockdep-design.txt. +config LOCKDEP_CROSSRELEASE + bool "Enable cross-release checking" + depends on PROVE_LOCKING + select LOCKDEP_COMPLETIONS + help + This makes lockdep work for crosslock which is a lock allowed to + be released in a different context from the acquisition context. + Normally a lock must be released in the context acquiring the lock. + However, relexing this constraint helps synchronization primitives + such as page locks or completions can use the lock correctness + detector, lockdep. + config LOCK_STAT bool "Lock usage statistics" depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
@@ -1189,16 +1199,6 @@ config LOCKDEP config LOCKDEP_SMALL bool -config LOCKDEP_CROSSRELEASE - bool - help - This makes lockdep work for crosslock which is a lock allowed to - be released in a different context from the acquisition context. - Normally a lock must be released in the context acquiring the lock. - However, relexing this constraint helps synchronization primitives - such as page locks or completions can use the lock correctness - detector, lockdep. - config LOCKDEP_COMPLETIONS bool help
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/12 mm: Check if mmu notifier callbacks are allowed to fail
In reply to Daniel VetterJust a bit of paranoia, since if we start pushing this deep into callchains it's hard to spot all places where an mmu notifier implementation might fail when it's not allowed to.
--- mm/mmu_notifier.c | 2 ++ 1 file changed, 2 insertions(+)
mm/mmu_notifier.c +2 -0
@@ -190,6 +190,8 @@ int __mmu_notifier_invalidate_range_start(struct mm_struct *mm,pr_info ("%pS callback failed with %d in %sblockable context.\n" , mn->ops->invalidate_range_start, _ret, !blockable ?"non-" :"" ); +WARN (blockable,"%pS callback failure not allowed\n" , + mn->ops->invalidate_range_start); ret = _ret; } }
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/12 mm, notifier: Catch sleeping/blocking for !blockable
In reply to Daniel VetterWe need to make sure implementations don't cheat and don't have a possible schedule/blocking point deeply burried where review can't catch it.
I'm not sure whether this is the best way to make sure all the might_sleep() callsites trigger, and it's a bit ugly in the code flow. But it gets the job done.
--- mm/mmu_notifier.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
mm/mmu_notifier.c +7 -1
@@ -185,7 +185,13 @@ int __mmu_notifier_invalidate_range_start(struct mm_struct *mm, id =srcu_read_lock (&srcu);hlist_for_each_entry_rcu (mn, &mm->mmu_notifier_mm->list, hlist) {if (mn->ops->invalidate_range_start) { -int _ret = mn->ops->invalidate_range_start (mn, mm, start, end, blockable); +int _ret; + +if (IS_ENABLED (CONFIG_DEBUG_ATOMIC_SLEEP ) && !blockable) +preempt_disable (); + _ret = mn->ops->invalidate_range_start (mn, mm, start, end, blockable); +if (IS_ENABLED (CONFIG_DEBUG_ATOMIC_SLEEP ) && !blockable) +preempt_enable ();if (_ret) { pr_info("%pS callback failed with %d in %sblockable context.\n", mn->ops->invalidate_range_start, _ret,
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/12 mm, notifier: Add a lockdep map for invalidate_range_start
In reply to Daniel VetterThis is a similar idea to the fs_reclaim fake lockdep lock. It's fairly easy to provoke a specific notifier to be run on a specific
range: Just prep it, and then munmap() it.
A bit harder, but still doable, is to provoke the mmu notifiers for all the various callchains that might lead to them. But both at the same time is really hard to reliable hit, especially when you want to exercise paths like direct reclaim or compaction, where it's not easy to control what exactly will be unmapped.
By introducing a lockdep map to tie them all together we allow lockdep to see a lot more dependencies, without having to actually hit them in a single challchain while testing.
Aside: Since I typed this to test i915 mmu notifiers I've only rolled this out for the invaliate_range_start callback. If there's interest, we should probably roll this out to all of them. But my undestanding of core mm is seriously lacking, and I'm not clear on whether we need a lockdep map for each callback, or whether some can be shared.
--- include/linux/mmu_notifier.h | 7 +++++++ mm/mmu_notifier.c | 7 +++++++ 2 files changed, 14 insertions(+)
include/linux/mmu_notifier.h +7 -0
@@ -16,6 +16,10 @@ struct mmu_notifier_ops;#ifdef CONFIG_MMU_NOTIFIER +#ifdef CONFIG_LOCKDEP +extern struct lockdep_map __mmu_notifier_invalidate_range_start_map; +#endif +/* * The mmu notifier_mm structure is allocated and installed in * mm->mmu_notifier_mm inside the mm_take_all_locks() protected
@@ -283,8 +287,11 @@ static inline void mmu_notifier_change_pte(struct mm_struct *mm,static inline void mmu_notifier_invalidate_range_start (struct mm_struct *mm,unsigned long start,unsigned long end) { +mutex_acquire (&__mmu_notifier_invalidate_range_start_map,0 ,0 , + _RET_IP_);if (mm_has_notifiers (mm))__mmu_notifier_invalidate_range_start (mm, start, end, true); +mutex_release (&__mmu_notifier_invalidate_range_start_map,1 , _RET_IP_); } static inline int mmu_notifier_invalidate_range_start_nonblock(struct mm_struct *mm,
mm/mmu_notifier.c +7 -0
@@ -23,6 +23,13 @@/* global SRCU for all MMs */ DEFINE_STATIC_SRCU (srcu); +#ifdef CONFIG_LOCKDEP +struct lockdep_map __mmu_notifier_invalidate_range_start_map = { + .name ="mmu_notifier_invalidate_range_start" +}; +EXPORT_SYMBOL_GPL (__mmu_notifier_invalidate_range_start_map); +#endif +/* * This function allows mmu_notifier::release callback to delay a call to * a function that will free appropriate resources. The function must be
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 8/12 dma-fence: cross-release annotations
In reply to Daniel Vetterdma-fence is a completion on steriods, which also allows hardware to directly sync work among each another. It's supposed to be deadlock free, so let's try to make sure that holds at least for the cpu-only interactions and waits.
It's a bit much #ifdef, but I figured for the single case it's not worth it to pull it all out.
Also, the single global lockdep map is intentional: dma_fences are supposed to be shared, we need all drivers to be compatible to each another in their locking hierarchy.
v2:
- handle #idef mess cleaner
- also annotate dma_fence_signal()
v3:
- Add a dma_fence_might_wait() function to annotate fastpaths
- Put it all into headers for other code to use
--- drivers/dma-buf/dma-fence.c | 14 ++++++++++++++ include/linux/dma-fence.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+)
drivers/dma-buf/dma-fence.c +14 -0
@@ -30,6 +30,13 @@EXPORT_TRACEPOINT_SYMBOL (dma_fence_emit);EXPORT_TRACEPOINT_SYMBOL (dma_fence_enable_signal); + +#ifdef CONFIG_LOCKDEP_CROSSRELEASE +struct lockdep_map_cross dma_fence_wait_map = +STATIC_CROSS_LOCKDEP_MAP_INIT ("dma_fence_signal" , &dma_fence_wait_map); +EXPORT_SYMBOL (dma_fence_wait_map); +#endif +/* * fence context counter: each execution context should have its own * fence context, this allows checking if fences belong to the same
@@ -106,6 +113,8 @@ int dma_fence_signal_locked(struct dma_fence *fence)lockdep_assert_held (fence->lock); +dma_fence_wait_release_commit (); +if (WARN_ON (!fence))return -EINVAL ;
@@ -153,6 +162,8 @@ int dma_fence_signal(struct dma_fence *fence)if (test_and_set_bit (DMA_FENCE_FLAG_SIGNALED_BIT , &fence->flags))return -EINVAL ; +dma_fence_wait_release_commit (); + fence->timestamp =ktime_get ();set_bit (DMA_FENCE_FLAG_TIMESTAMP_BIT , &fence->flags);trace_dma_fence_signaled (fence);
@@ -197,12 +208,15 @@ dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout)if (WARN_ON (timeout <0 ))return -EINVAL ; +dma_fence_wait_acquire ();trace_dma_fence_wait_start (fence);if (fence->ops->wait) ret = fence->ops->wait (fence, intr, timeout);else ret =dma_fence_default_wait (fence, intr, timeout);trace_dma_fence_wait_end (fence); +dma_fence_wait_release (); +return ret; }EXPORT_SYMBOL (dma_fence_wait_timeout);
include/linux/dma-fence.h +28 -0
@@ -34,6 +34,34 @@ struct dma_fence;struct dma_fence_ops ;struct dma_fence_cb ; +#ifdef CONFIG_LOCKDEP_CROSSRELEASE +#include <linux/lockdep.h> +extern struct lockdep_map_cross dma_fence_wait_map; + +static inline void dma_fence_wait_acquire (void ) +{ +lock_acquire_exclusive (&dma_fence_wait_map.map,0 ,0 ,NULL , _RET_IP_); +} +static inline void dma_fence_wait_release (void ) +{ +lock_release (&dma_fence_wait_map.map,0 , _RET_IP_); +} +static inline void dma_fence_wait_release_commit (void ) +{ +lock_commit_crosslock (&dma_fence_wait_map.map); +} +#else +static inline void dma_fence_wait_acquire (void ) {} +static inline void dma_fence_wait_release (void ) {} +static inline void dma_fence_wait_release_commit (void ) {} +#endif + +static inline void dma_fence_might_wait (void ) +{ +dma_fence_wait_acquire (); +dma_fence_wait_release (); +} +/** * struct dma_fence - software synchronization primitive * @refcount: refcount for this fence
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 9/12 reservation: Annotate dma_fence waits
In reply to Daniel Vetterreservations have an optimized fastpath that bypasses dma_fence_wait(), make sure we still catch all dependencies in lockdep.
To avoid lockdep complaining about recursion on the fake dma_fence_wait lock we use the dma_fence_might_sleep annotation.
--- drivers/dma-buf/reservation.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/dma-buf/reservation.c +2 -0
@@ -429,6 +429,8 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj,long ret = timeout ? timeout :1 ;int i; +dma_fence_might_wait (); + retry: shared_count =0 ; seq =read_seqcount_begin (&obj->seq);
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 10/12 drm/i915: Annotate dma_fence waits
In reply to Daniel Vetteri915_request_wait is simply our i915-optimized version of dma_fence_wait. They both use the exact same code. To help lockdep discovering all the dependencies, annotate it.
--- drivers/gpu/drm/i915/i915_request.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_request.c +18 -1
@@ -30,6 +30,10 @@#include "i915_drv.h" +static long __i915_request_wait (struct i915_request *rq, +unsigned int flags, +long timeout); +static const char *i915_fence_get_driver_name (struct dma_fence *fence) {return "i915" ;
@@ -66,7 +70,7 @@ static signed long i915_fence_wait(struct dma_fence *fence,bool interruptible, signed long timeout) { - return i915_request_wait(to_request(fence), interruptible, timeout); + return __i915_request_wait(to_request(fence), interruptible, timeout); }static void i915_fence_release (struct dma_fence *fence)
@@ -1201,6 +1205,19 @@ static bool __i915_wait_request_check_and_reset(struct i915_request *request)long i915_request_wait (struct i915_request *rq,unsigned int flags,long timeout) +{ +long ret; + +dma_fence_wait_acquire (); + ret =__i915_request_wait (rq, flags, timeout); +dma_fence_wait_release (); + +return ret; +} + +static long __i915_request_wait (struct i915_request *rq, +unsigned int flags, +long timeout) {const int state = flags &I915_WAIT_INTERRUPTIBLE ?TASK_INTERRUPTIBLE :TASK_UNINTERRUPTIBLE ;
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915: Annotate dma_fence waits
i915_request_wait is simply our i915-optimized version of dma_fence_wait. They both use the exact same code. To help lockdep discovering all the dependencies, annotate it.
v2: We do opportunistic retiring of dma-fences while holding struct_mutex. The recursion this causes is intentional, and we do have other paths which (hopefully) do depend upon the struct_mutex. 2nd option to fix these annotations (and probably even better) would be creating a dma_fence_signal_opportunistic, which doesnt have the lockdep annotations. But that also doesn't guarantee that we'll actually manage to signal fences without depending upon struct_mutex somewhere, so might as well go with this trick here.
Aside, for non-i915 people: struct_mutex is our bkl. The locking rules are ... complicated.
--- drivers/gpu/drm/i915/i915_request.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_request.c +20 -1
@@ -30,6 +30,10 @@#include "i915_drv.h" +static long __i915_request_wait (struct i915_request *rq, +unsigned int flags, +long timeout); +static const char *i915_fence_get_driver_name (struct dma_fence *fence) {return "i915" ;
@@ -66,7 +70,7 @@ static signed long i915_fence_wait(struct dma_fence *fence,bool interruptible, signed long timeout) { - return i915_request_wait(to_request(fence), interruptible, timeout); + return __i915_request_wait(to_request(fence), interruptible, timeout); }static void i915_fence_release (struct dma_fence *fence)
@@ -1201,6 +1205,21 @@ static bool __i915_wait_request_check_and_reset(struct i915_request *request)long i915_request_wait (struct i915_request *rq,unsigned int flags,long timeout) +{ +long ret; + +if (!lockdep_is_held (&rq->i915->drm.struct_mutex)) +dma_fence_wait_acquire (); + ret =__i915_request_wait (rq, flags, timeout); +if (!lockdep_is_held (&rq->i915->drm.struct_mutex)) +dma_fence_wait_release (); + +return ret; +} + +static long __i915_request_wait (struct i915_request *rq, +unsigned int flags, +long timeout) {const int state = flags &I915_WAIT_INTERRUPTIBLE ?TASK_INTERRUPTIBLE :TASK_UNINTERRUPTIBLE ;
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
kbuild test robot
build botRe: [PATCH] drm/i915: Annotate dma_fence waits
Thank you for the patch! Yet something to improve:
Hi Daniel,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.20-rc1 next-20181106]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Daniel-Vetter/drm-i915-Annotate-dma_fence-waits/20181106-232827 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: x86_64-randconfig-x016-201844 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/gpu//drm/i915/i915_request.c: In function 'i915_request_wait':
>> drivers/gpu//drm/i915/i915_request.c:1291:7: error: implicit declaration of function 'lockdep_is_held'; did you mean 'lockdep_assert_held'? [-Werror=implicit-function-declaration]
if (!lockdep_is_held(&rq->i915->drm.struct_mutex))
^~~~~~~~~~~~~~~
lockdep_assert_held
drivers/gpu//drm/i915/i915_request.c:1292:3: error: implicit declaration of function 'dma_fence_wait_acquire'; did you mean 'dma_fence_wait_timeout'? [-Werror=implicit-function-declaration]
dma_fence_wait_acquire();
^~~~~~~~~~~~~~~~~~~~~~
dma_fence_wait_timeout
drivers/gpu//drm/i915/i915_request.c:1295:3: error: implicit declaration of function 'dma_fence_wait_release'; did you mean 'dma_fence_release'? [-Werror=implicit-function-declaration]
dma_fence_wait_release();
^~~~~~~~~~~~~~~~~~~~~~
dma_fence_releasecc1: some warnings being treated as errors
vim +1291 drivers/gpu//drm/i915/i915_request.c
1265
1266 /**
1267 * i915_request_wait - wait until execution of request has finished
1268 * @rq: the request to wait upon
1269 * @flags: how to wait
1270 * @timeout: how long to wait in jiffies
1271 *
1272 * i915_request_wait() waits for the request to be completed, for a
1273 * maximum of @timeout jiffies (with MAX_SCHEDULE_TIMEOUT implying an
1274 * unbounded wait).
1275 *
1276 * If the caller holds the struct_mutex, the caller must pass I915_WAIT_LOCKED
1277 * in via the flags, and vice versa if the struct_mutex is not held, the caller
1278 * must not specify that the wait is locked.
1279 *
1280 * Returns the remaining time (in jiffies) if the request completed, which may
1281 * be zero or -ETIME if the request is unfinished after the timeout expires.
1282 * May return -EINTR is called with I915_WAIT_INTERRUPTIBLE and a signal is
1283 * pending before the request completes.
1284 */
1285 long i915_request_wait(struct i915_request *rq,
1286 unsigned int flags,
1287 long timeout)
1288 {
1289 long ret;
1290
> 1291 if (!lockdep_is_held(&rq->i915->drm.struct_mutex))
1292 dma_fence_wait_acquire();
1293 ret = __i915_request_wait(rq, flags, timeout);
1294 if (!lockdep_is_held(&rq->i915->drm.struct_mutex))
1295 dma_fence_wait_release();
1296
1297 return ret;
1298 }
1299
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
kbuild test robot
build botRe: [PATCH] drm/i915: Annotate dma_fence waits
In reply to Daniel VetterThank you for the patch! Yet something to improve:
Hi Daniel,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.20-rc1 next-20181106]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Daniel-Vetter/drm-i915-Annotate-dma_fence-waits/20181106-232827 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: i386-randconfig-x000-201844 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386
All errors (new ones prefixed by >>):
drivers/gpu//drm/i915/i915_request.c: In function 'i915_request_wait':
>> drivers/gpu//drm/i915/i915_request.c:1292:3: error: implicit declaration of function 'dma_fence_wait_acquire'; did you mean 'dma_fence_wait_timeout'? [-Werror=implicit-function-declaration]
dma_fence_wait_acquire();
^~~~~~~~~~~~~~~~~~~~~~
dma_fence_wait_timeout
>> drivers/gpu//drm/i915/i915_request.c:1295:3: error: implicit declaration of function 'dma_fence_wait_release'; did you mean 'dma_fence_release'? [-Werror=implicit-function-declaration]
dma_fence_wait_release();
^~~~~~~~~~~~~~~~~~~~~~
dma_fence_releasecc1: some warnings being treated as errors
vim +1292 drivers/gpu//drm/i915/i915_request.c
1265
1266 /**
1267 * i915_request_wait - wait until execution of request has finished
1268 * @rq: the request to wait upon
1269 * @flags: how to wait
1270 * @timeout: how long to wait in jiffies
1271 *
1272 * i915_request_wait() waits for the request to be completed, for a
1273 * maximum of @timeout jiffies (with MAX_SCHEDULE_TIMEOUT implying an
1274 * unbounded wait).
1275 *
1276 * If the caller holds the struct_mutex, the caller must pass I915_WAIT_LOCKED
1277 * in via the flags, and vice versa if the struct_mutex is not held, the caller
1278 * must not specify that the wait is locked.
1279 *
1280 * Returns the remaining time (in jiffies) if the request completed, which may
1281 * be zero or -ETIME if the request is unfinished after the timeout expires.
1282 * May return -EINTR is called with I915_WAIT_INTERRUPTIBLE and a signal is
1283 * pending before the request completes.
1284 */
1285 long i915_request_wait(struct i915_request *rq,
1286 unsigned int flags,
1287 long timeout)
1288 {
1289 long ret;
1290
1291 if (!lockdep_is_held(&rq->i915->drm.struct_mutex))
> 1292 dma_fence_wait_acquire(); 1293 ret = __i915_request_wait(rq, flags, timeout); 1294 if (!lockdep_is_held(&rq->i915->drm.struct_mutex)) > 1295 dma_fence_wait_release();
1296
1297 return ret;
1298 }
1299
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 11/12 drm/i915: annotate intel_atomic_commit_fence_wait
In reply to Daniel VetterIn i915 we also have i915_sw_fence, as some kind of super fence. Since those include dma-fences (it's the main use really, aside from chaining them for the scheduler) they're relevant for any lockdep cycles involving dma_fence.
But i915_sw_fence is also really tough to properly annonate:
- Most of the use (all of it in the scheduler) is entirely driven by callbacks. That creates dependency chains, but for all practical purposes we could treat that as part of the hw magic that executes requests for us. Eventually a dma_fence_signal() comes out of that, which we do annotate.
- For dma-fences we only annotate cpu waits, and don't follow any of the chains going through the hardware. Since dma_fence are supposed to be ordered an always complete that should be good enough, as long as we don't accidentally deadlock on the cpu side. So treating i915_sw_fence as part of the hw magic shouldn't reduce our deadlock coverage, as long as i915_sw_fence itself doesn't deadlock. And there's lots of debug checks for that already.
- There's one exception: intel_atomic_commit_fence_wait() is the only cpu wait on a i915_sw_fence we have. That one we should annotate, and annotate should be able to teach lockdep about our gpu reset vs modeset locking inversion. But in reality this is a dma-fence wait, and it using i915_sw_fence is really just an implementation detail. All other kms drivers use drm_atomic_helper_wait_for_fences() instead.
- There is a i915_sw_fence_wait for normal cpu waits (the one in the modeset code is open-coded because it also waits for gpu reset wakups), but that's only used for selftests.
So the simplest solution for annotating i915_sw_fence is therefore to annotate intel_atomic_commit_fence() as a dma_fence wait.
--- drivers/gpu/drm/i915/intel_display.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/intel_display.c +2 -0
@@ -12728,6 +12728,7 @@ static void intel_atomic_commit_fence_wait(struct intel_atomic_state *intel_statstruct wait_queue_entry wait_fence, wait_reset;struct drm_i915_private *dev_priv =to_i915 (intel_state->base.dev); +dma_fence_wait_acquire ();init_wait_entry (&wait_fence,0 );init_wait_entry (&wait_reset,0 );for (;;) {
@@ -12745,6 +12746,7 @@ static void intel_atomic_commit_fence_wait(struct intel_atomic_state *intel_stat }finish_wait (&intel_state->commit_ready.wait, &wait_fence);finish_wait (&dev_priv->gpu_error.wait_queue, &wait_reset); +dma_fence_wait_release (); }static void intel_atomic_cleanup_work (struct work_struct *work)
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 12/12 HAX FOR CI: Enable cross-release
In reply to Daniel VetterOnly way to convince our CI to enable stuff that's new and defaulting to off. Obviously not for merging.
--- lib/Kconfig.debug | 1 + 1 file changed, 1 insertion(+)
lib/Kconfig.debug +1 -0
@@ -1095,6 +1095,7 @@ config LOCKDEP_CROSSRELEASE bool "Enable cross-release checking" depends on PROVE_LOCKING select LOCKDEP_COMPLETIONS + default y help This makes lockdep work for crosslock which is a lock allowed to be released in a different context from the acquisition context.
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for series starting with [01/12] locking/lockdep: restore cross-release checks
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with [01/12] locking/lockdep: restore cross-release checks
URL : https://patchwork.freedesktop.org/series/51923/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
11e54ecf16c4 locking/lockdep: restore cross-release checks
-:8: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 527187d28569 ("locking/lockdep: Remove cross-release leftovers")'
#8:
527187d28569 ("locking/lockdep: Remove cross-release leftovers")-:9: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #9:dba04eb76df9 ("locking/Documentation: Remove stale crossrelease_fullstack parameter")
-:9: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit dba04eb76df9 ("locking/Documentation: Remove stale crossrelease_fullstack parameter")' #9:dba04eb76df9 ("locking/Documentation: Remove stale crossrelease_fullstack parameter")
-:10: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit e966eaeeb623 ("locking/lockdep: Remove the cross-release locking checks")' #10:e966eaeeb623 ("locking/lockdep: Remove the cross-release locking checks")
-:66: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #66:
new file mode 100644
-:642: WARNING:TYPO_SPELLING: 'prefered' may be misspelled - perhaps 'preferred'? #642: FILE: Documentation/locking/crossrelease.txt:572:
+deadlock or its possibility sooner. So the former way would be prefered
-:814: WARNING:TYPO_SPELLING: 'implmentation' may be misspelled - perhaps 'implementation'? #814: FILE: Documentation/locking/crossrelease.txt:744:
+like how lockdep handles held_locks. Lockless implmentation is important
-:837: WARNING:TYPO_SPELLING: 'occured' may be misspelled - perhaps 'occurred'? #837: FILE: Documentation/locking/crossrelease.txt:767:
+that it has not occured yet, lockdep should consider all possible
-:984: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects? #984: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m) \
+do { \
+ lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map, \
+ (m)->name, (m)->key, 0); \
+ __init_completion(x); \
+} while (0)
-:984: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'm' - possible side-effects? #984: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m) \
+do { \
+ lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map, \
+ (m)->name, (m)->key, 0); \
+ __init_completion(x); \
+} while (0)
-:991: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects? #991: FILE: include/linux/completion.h:60:
+#define init_completion(x) \
+do { \
+ static struct lock_class_key __key; \
+ lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map, \
+ "(completion)" #x, \
+ &__key, 0); \
+ __init_completion(x); \
+} while (0)
-:1008: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'work' - possible side-effects? #1008: FILE: include/linux/completion.h:77:
+#define COMPLETION_INITIALIZER(work) \
+ { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait), \
+ STATIC_CROSS_LOCKDEP_MAP_INIT("(completion)" #work, &(work)) }
-:1106: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'? #1106: FILE: include/linux/lockdep.h:310:
+ * Seperate stack_trace data. This will be used at commit step.
-:1112: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'? #1112: FILE: include/linux/lockdep.h:316:
+ * Seperate hlock instance. This will be used at commit step.
-:1140: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'? #1140: FILE: include/linux/lockdep.h:344:
+ * Seperate hlock instance. This will be used at commit step.
-:1163: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1163: FILE: include/linux/lockdep.h:561:
+extern void lockdep_init_map_crosslock(struct lockdep_map *lock,
-:1167: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1167: FILE: include/linux/lockdep.h:565:
+extern void lock_commit_crosslock(struct lockdep_map *lock);
-:1187: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1187: FILE: include/linux/lockdep.h:585:
+extern void crossrelease_hist_start(enum xhlock_context_t c);
-:1188: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1188: FILE: include/linux/lockdep.h:586:
+extern void crossrelease_hist_end(enum xhlock_context_t c);
-:1189: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1189: FILE: include/linux/lockdep.h:587:
+extern void lockdep_invariant_state(bool force);
-:1190: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1190: FILE: include/linux/lockdep.h:588:
+extern void lockdep_init_task(struct task_struct *task);
-:1191: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1191: FILE: include/linux/lockdep.h:589:
+extern void lockdep_free_task(struct task_struct *task);
-:1306: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1306: FILE: kernel/locking/lockdep.c:1158:
+ printk(" Possible unsafe locking scenario by crosslock:\n\n");
-:1307: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1307: FILE: kernel/locking/lockdep.c:1159:
+ printk(" CPU0 CPU1\n");
-:1308: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1308: FILE: kernel/locking/lockdep.c:1160:
+ printk(" ---- ----\n");
-:1309: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1309: FILE: kernel/locking/lockdep.c:1161:
+ printk(" lock(");
-:1311: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1311: FILE: kernel/locking/lockdep.c:1163:
+ printk(KERN_CONT ");\n");
-:1311: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1311: FILE: kernel/locking/lockdep.c:1163:
+ printk(KERN_CONT ");\n");
-:1312: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1312: FILE: kernel/locking/lockdep.c:1164:
+ printk(" lock(");
-:1314: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1314: FILE: kernel/locking/lockdep.c:1166:
+ printk(KERN_CONT ");\n");
-:1314: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1314: FILE: kernel/locking/lockdep.c:1166:
+ printk(KERN_CONT ");\n");
-:1315: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1315: FILE: kernel/locking/lockdep.c:1167:
+ printk(" lock(");
-:1317: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1317: FILE: kernel/locking/lockdep.c:1169:
+ printk(KERN_CONT ");\n");
-:1317: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1317: FILE: kernel/locking/lockdep.c:1169:
+ printk(KERN_CONT ");\n");
-:1318: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1318: FILE: kernel/locking/lockdep.c:1170:
+ printk(" unlock(");
-:1320: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1320: FILE: kernel/locking/lockdep.c:1172:
+ printk(KERN_CONT ");\n");
-:1320: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1320: FILE: kernel/locking/lockdep.c:1172:
+ printk(KERN_CONT ");\n");
-:1321: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1321: FILE: kernel/locking/lockdep.c:1173:
+ printk("\n *** DEADLOCK ***\n\n");
-:1323: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1323: FILE: kernel/locking/lockdep.c:1175:
+ printk(" Possible unsafe locking scenario:\n\n");
-:1324: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1324: FILE: kernel/locking/lockdep.c:1176:
+ printk(" CPU0 CPU1\n");
-:1325: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1325: FILE: kernel/locking/lockdep.c:1177:
+ printk(" ---- ----\n");
-:1326: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1326: FILE: kernel/locking/lockdep.c:1178:
+ printk(" lock(");
-:1328: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1328: FILE: kernel/locking/lockdep.c:1180:
+ printk(KERN_CONT ");\n");
-:1328: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1328: FILE: kernel/locking/lockdep.c:1180:
+ printk(KERN_CONT ");\n");
-:1329: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1329: FILE: kernel/locking/lockdep.c:1181:
+ printk(" lock(");
-:1331: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1331: FILE: kernel/locking/lockdep.c:1183:
+ printk(KERN_CONT ");\n");
-:1331: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1331: FILE: kernel/locking/lockdep.c:1183:
+ printk(KERN_CONT ");\n");
-:1332: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1332: FILE: kernel/locking/lockdep.c:1184:
+ printk(" lock(");
-:1334: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1334: FILE: kernel/locking/lockdep.c:1186:
+ printk(KERN_CONT ");\n");
-:1334: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1334: FILE: kernel/locking/lockdep.c:1186:
+ printk(KERN_CONT ");\n");
-:1335: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1335: FILE: kernel/locking/lockdep.c:1187:
+ printk(" lock(");
-:1337: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1337: FILE: kernel/locking/lockdep.c:1189:
+ printk(KERN_CONT ");\n");
-:1337: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1337: FILE: kernel/locking/lockdep.c:1189:
+ printk(KERN_CONT ");\n");
-:1338: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1338: FILE: kernel/locking/lockdep.c:1190:
+ printk("\n *** DEADLOCK ***\n\n");
-:1434: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #1434: FILE: kernel/locking/lockdep.c:3287:
+void lockdep_init_map_crosslock(struct lockdep_map *lock, const char *name,
+ struct lock_class_key *key, int subclass)
-:1819: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) #1819: FILE: kernel/locking/lockdep.c:4945:
+ if (nr_stack_trace_entries >= MAX_STACK_TRACE_ENTRIES-1) {
^
-:1846: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #1846: FILE: kernel/locking/lockdep.c:4972:
+ if (!add_chain_cache_classes(xid, pid, xhlock->hlock.irq_context,
+ chain_key))
-:1981: CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*task->xhlocks)...) over kzalloc(sizeof(struct hist_lock)...) #1981: FILE: kernel/locking/lockdep.c:5107:
+ task->xhlocks = kzalloc(sizeof(struct hist_lock) * MAX_XHLOCKS_NR,
-:1989: WARNING:TYPO_SPELLING: 'Diable' may be misspelled - perhaps 'Disable'? #1989: FILE: kernel/locking/lockdep.c:5115:
+ /* Diable crossrelease for current */
-:2061: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 3 errors, 42 warnings, 15 checks, 1947 lines checked d5e92af47f86 kthread: finer-grained lockdep/cross-release completion -:49: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #49: FILE: include/linux/kthread.h:11:
+struct task_struct *_kthread_create_on_node(int (*threadfn)(void *data),
void *data,
-:70: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #70: FILE: include/linux/kthread.h:39:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
void *data,
-:108: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #108: FILE: include/linux/kthread.h:206:
+_kthread_create_worker_on_cpu(int cpu, unsigned int flags,
+ struct lock_class_key *exited_key,
-:139: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #139: FILE: kernel/kthread.c:234:
+ lockdep_init_map_crosslock(&self->exited.map.map,
+ "(kthread completion)->exited",
-:139: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string #139: FILE: kernel/kthread.c:234:
+ "(kthread completion)->exited",
-:143: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #143: FILE: kernel/kthread.c:238:
+ lockdep_init_map_crosslock(&self->parked.map.map,
+ "(kthread completion)->parked",
-:143: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string #143: FILE: kernel/kthread.c:238:
+ "(kthread completion)->parked",
-:209: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #209: FILE: kernel/kthread.c:454:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
void *data, unsigned int cpu,
-:297: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 3 warnings, 6 checks, 240 lines checked21688b527b8d lockdep: Remove GFP_NOLOCKDEP annotation
-:6: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 7e7844226f10 ("lockdep: allow to disable reclaim lockup detection")' #6:
This was originally added in 7e7844226f10 ("lockdep: allow to disable
-:70: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 1 errors, 1 warnings, 0 checks, 32 lines checked80a1555c61a6 kernel/lockdep: Make cross-release a config option
-:74: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 42 lines checked 7e4ead273b8d mm: Check if mmu notifier callbacks are allowed to fail -:31: ERROR:SPACING: space required after that ',' (ctx:VxV) #31: FILE: mm/mmu_notifier.c:193:
+ WARN(blockable,"%pS callback failure not allowed\n",
^
-:35: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 1 errors, 1 warnings, 0 checks, 8 lines checked82d4533cb449 mm, notifier: Catch sleeping/blocking for !blockable
-:44: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 14 lines checkedd532af81d6ac mm, notifier: Add a lockdep map for invalidate_range_start
-:85: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 34 lines checked 27877d64e988 dma-fence: cross-release annotations -:40: CHECK:LINE_SPACING: Please don't use multiple blank lines #40: FILE: drivers/dma-buf/dma-fence.c:33:
+
-:100: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #100: FILE: include/linux/dma-fence.h:45:
+}
+static inline void dma_fence_wait_release(void)
-:104: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #104: FILE: include/linux/dma-fence.h:49:
+}
+static inline void dma_fence_wait_release_commit(void)
-:122: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 3 checks, 78 lines checked4c2654cb3a9e reservation: Annotate dma_fence waits6d110e32e829 drm/i915: Annotate dma_fence waits
-:59: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 37 lines checkeddb3377b5b42b drm/i915: annotate intel_atomic_commit_fence_wait
-:66: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 14 lines checked262367da82b7 HAX FOR CI: Enable cross-release
-:22: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 7 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.SPARSE: warning for series starting with [01/12] locking/lockdep: restore cross-release checks
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with [01/12] locking/lockdep: restore cross-release checks
URL : https://patchwork.freedesktop.org/series/51923/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: locking/lockdep: restore cross-release checks + +Error in reading or end of file.
Commit: kthread: finer-grained lockdep/cross-release completion Okay!
Commit: lockdep: Remove GFP_NOLOCKDEP annotation
Okay!
Commit: kernel/lockdep: Make cross-release a config option Okay!
Commit: mm: Check if mmu notifier callbacks are allowed to fail Okay!
Commit: mm, notifier: Catch sleeping/blocking for !blockable Okay!
Commit: mm, notifier: Add a lockdep map for invalidate_range_start Okay!
Commit: dma-fence: cross-release annotations
Okay!
Commit: reservation: Annotate dma_fence waits
Okay!
Commit: drm/i915: Annotate dma_fence waits
Okay!
Commit: drm/i915: annotate intel_atomic_commit_fence_wait Okay!
Commit: HAX FOR CI: Enable cross-release
Okay!
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [01/12] locking/lockdep: restore cross-release checks
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with [01/12] locking/lockdep: restore cross-release checks
URL : https://patchwork.freedesktop.org/series/51923/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_5077 -> Patchwork_10706 =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_10706 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_10706, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/51923/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10706:
=== IGT changes ===
==== Possible regressions ====
igt@gem_exec_gttfill@basic:
fi-kbl-7567u: PASS -> DMESG-WARN
igt@gem_sync@basic-each:
fi-bdw-gvtdvm: PASS -> DMESG-WARN
fi-kbl-guc: PASS -> DMESG-WARN
fi-bdw-5557u: PASS -> DMESG-WARN
fi-kbl-r: PASS -> DMESG-WARN
fi-hsw-4770r: PASS -> DMESG-WARN
fi-skl-6260u: PASS -> DMESG-WARN
fi-bsw-kefka: PASS -> DMESG-WARN
fi-kbl-x1275: PASS -> DMESG-WARN
fi-skl-gvtdvm: PASS -> DMESG-WARN
fi-bsw-n3050: PASS -> DMESG-WARN
fi-skl-6700k2: PASS -> DMESG-WARN
fi-skl-6770hq: PASS -> DMESG-WARN
fi-cfl-guc: PASS -> DMESG-WARN
fi-skl-iommu: PASS -> DMESG-WARN
fi-apl-guc: PASS -> DMESG-WARN
fi-bxt-dsi: PASS -> DMESG-WARN
fi-kbl-7560u: PASS -> DMESG-WARN
fi-ivb-3770: PASS -> DMESG-WARN
fi-skl-6600u: PASS -> DMESG-WARN
fi-whl-u: PASS -> DMESG-WARN
fi-cfl-8700k: PASS -> DMESG-WARN
fi-kbl-7500u: PASS -> DMESG-WARN
fi-skl-guc: PASS -> DMESG-WARN
fi-cnl-u: PASS -> DMESG-WARN
fi-glk-j4005: PASS -> DMESG-WARN
fi-glk-dsi: PASS -> DMESG-WARN
fi-hsw-peppy: PASS -> DMESG-WARN
fi-skl-6700hq: PASS -> DMESG-WARN
fi-bxt-j4205: PASS -> DMESG-WARN
fi-icl-u2: PASS -> DMESG-WARN
fi-cfl-s3: PASS -> DMESG-WARN
igt@gem_sync@basic-many-each:
fi-byt-j1900: PASS -> DMESG-WARN
fi-byt-clapper: PASS -> DMESG-WARN
fi-snb-2600: PASS -> DMESG-WARN
fi-ivb-3520m: PASS -> DMESG-WARN
fi-hsw-4770: PASS -> DMESG-WARN
igt@prime_vgem@basic-fence-flip:
fi-gdg-551: PASS -> DMESG-WARN
fi-pnv-d510: PASS -> DMESG-WARN== Known issues ==
Here are the changes found in Patchwork_10706 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_ctx_switch@basic-default:
fi-icl-u: NOTRUN -> INCOMPLETE (fdo#108535, fdo#108315)
igt@gem_exec_suspend@basic-s3:
fi-kbl-soraka: NOTRUN -> INCOMPLETE (fdo#107859, fdo#107774, fdo#107556)
igt@kms_flip@basic-flip-vs-modeset:
fi-skl-6700hq: PASS -> DMESG-WARN (fdo#105998) +1
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: PASS -> DMESG-WARN (fdo#102614)
==== Possible fixes ====
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
fi-byt-clapper: FAIL (fdo#107362, fdo#103191) -> PASS +1
==== Warnings ====
igt@drv_selftest@live_contexts:
fi-icl-u2: DMESG-FAIL (fdo#108569) -> INCOMPLETE (fdo#108315) fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
fdo#107774 https://bugs.freedesktop.org/show_bug.cgi?id=107774
fdo#107859 https://bugs.freedesktop.org/show_bug.cgi?id=107859
fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315
fdo#108535 https://bugs.freedesktop.org/show_bug.cgi?id=108535
fdo#108569 https://bugs.freedesktop.org/show_bug.cgi?id=108569
== Participating hosts (43 -> 42) ==
Additional (2): fi-kbl-soraka fi-icl-u
Missing (3): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan
== Build changes ==
* Linux: CI_DRM_5077 -> Patchwork_10706
CI_DRM_5077: 1915c67b9e2886117ec217e75ff9cfde8b1e3099 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4704: ace031dcb1e8bf2b32b4b0d54a55eb30e8f41d6f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10706: 262367da82b761679e95dd0817a377b4a4dd4556 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
262367da82b7 HAX FOR CI: Enable cross-releasedb3377b5b42b drm/i915: annotate intel_atomic_commit_fence_wait 6d110e32e829 drm/i915: Annotate dma_fence waits4c2654cb3a9e reservation: Annotate dma_fence waits 27877d64e988 dma-fence: cross-release annotations d532af81d6ac mm, notifier: Add a lockdep map for invalidate_range_start 82d4533cb449 mm, notifier: Catch sleeping/blocking for !blockable 7e4ead273b8d mm: Check if mmu notifier callbacks are allowed to fail 80a1555c61a6 kernel/lockdep: Make cross-release a config option 21688b527b8d lockdep: Remove GFP_NOLOCKDEP annotation d5e92af47f86 kthread: finer-grained lockdep/cross-release completion 11e54ecf16c4 locking/lockdep: restore cross-release checks
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10706/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [01/12] locking/lockdep: restore cross-release checks (rev2)
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with [01/12] locking/lockdep: restore cross-release checks (rev2)
URL : https://patchwork.freedesktop.org/series/51923/
State : failure
== Summary ==
CALL scripts/checksyscalls.sh
DESCEND objtool
CHK include/generated/compile.h
CC kernel/locking/lockdep.okernel/locking/lockdep.c: In function ‘commit_xhlock’:kernel/locking/lockdep.c:4915:7: error: implicit declaration of function ‘add_chain_cache_classes’; did you mean ‘add_chain_cache’? [-Werror=implicit-function-declaration]
if (!add_chain_cache_classes(xid, pid, xhlock->hlock.irq_context,
^~~~~~~~~~~~~~~~~~~~~~~
add_chain_cachecc1: some warnings being treated as errors scripts/Makefile.build:293: recipe for target 'kernel/locking/lockdep.o' failed make[2]: *** [kernel/locking/lockdep.o] Error 1 scripts/Makefile.build:518: recipe for target 'kernel/locking' failed make[1]: *** [kernel/locking] Error 2
Makefile:1060: recipe for target 'kernel' failed
make: *** [kernel] Error 2
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 locking/lockdep: restore cross-release checks
In reply to Daniel VetterThis reverts the following commits:
commit 527187d28569 ("locking/lockdep: Remove cross-release leftovers") commit dba04eb76df9 ("locking/Documentation: Remove stale crossrelease_fullstack parameter") commit e966eaeeb623 ("locking/lockdep: Remove the cross-release locking checks") commit 44318d5b07be ("locking/lockdep: Remove add_chain_cache_classes()")
Since the first two are just fixups for the cross-release removal I figured I'll squash them all into one.
v2: Revert more cleanup patches.
--- .../admin-guide/kernel-parameters.txt | 3 + Documentation/locking/crossrelease.txt | 874 ++++++++++++++++++ include/linux/completion.h | 46 + include/linux/irqflags.h | 4 + include/linux/lockdep.h | 127 +++ include/linux/sched.h | 11 + kernel/locking/lockdep.c | 722 ++++++++++++++- kernel/sched/completion.c | 5 + lib/Kconfig.debug | 33 + 9 files changed, 1790 insertions(+), 35 deletions(-) create mode 100644 Documentation/locking/crossrelease.txt
Documentation/admin-guide/kernel-parameters.txt +3 -0
@@ -724,6 +724,9 @@ It will be ignored when crashkernel=X,high is not used or memory reserved is below 4G. + crossrelease_fullstack + [KNL] Allow to record full stack trace in cross-release + cryptomgr.notests [KNL] Disable crypto self-tests
Documentation/locking/crossrelease.txt new file +874 -0
874 lines not on this page · raw message
include/linux/completion.h +46 -0
67 lines not on this page · raw message
include/linux/irqflags.h +4 -0
@@ -38,18 +38,22 @@# define trace_hardirq_enter () \ do { \ current->hardirq_context++; \ + crossrelease_hist_start(XHLOCK_HARD); \ } while (0)# define trace_hardirq_exit () \ do { \ current->hardirq_context--; \ + crossrelease_hist_end(XHLOCK_HARD); \ } while (0)# define lockdep_softirq_enter () \ do { \ current->softirq_context++; \ + crossrelease_hist_start(XHLOCK_SOFT); \ } while (0)# define lockdep_softirq_exit () \ do { \ current->softirq_context--; \ + crossrelease_hist_end(XHLOCK_SOFT); \ } while (0)#else # define trace_hardirqs_on () do { } while (0)
include/linux/lockdep.h +127 -0
156 lines not on this page · raw message
include/linux/sched.h +11 -0
@@ -940,6 +940,17 @@ struct task_struct {struct held_lock held_locks[MAX_LOCK_DEPTH ];#endif +#ifdef CONFIG_LOCKDEP_CROSSRELEASE +#define MAX_XHLOCKS_NR 64UL +struct hist_lock *xhlocks;/* Crossrelease history locks */ +unsigned int xhlock_idx; +/* For restoring at history boundaries */ +unsigned int xhlock_idx_hist[XHLOCK_CTX_NR ]; +unsigned int hist_id; +/* For overwrite check at each context exit */ +unsigned int hist_id_save[XHLOCK_CTX_NR ]; +#endif +#ifdef CONFIG_UBSAN unsigned int in_ubsan;#endif
kernel/locking/lockdep.c +687 -35
822 lines not on this page · raw message
kernel/sched/completion.c +5 -0
@@ -31,6 +31,11 @@ void complete(struct completion *x)spin_lock_irqsave (&x->wait.lock, flags); +/* +* Perform commit of crossrelease here. +*/ +complete_release_commit (x); +if (x->done !=UINT_MAX ) x->done++;__wake_up_locked (&x->wait,TASK_NORMAL ,1 );
lib/Kconfig.debug +33 -0
@@ -1055,6 +1055,8 @@ config PROVE_LOCKING select DEBUG_RWSEMS if RWSEM_SPIN_ON_OWNER select DEBUG_WW_MUTEX_SLOWPATH select DEBUG_LOCK_ALLOC + select LOCKDEP_CROSSRELEASE + select LOCKDEP_COMPLETIONS select TRACE_IRQFLAGS default n help
@@ -1187,6 +1189,37 @@ config LOCKDEP config LOCKDEP_SMALL bool +config LOCKDEP_CROSSRELEASE + bool + help + This makes lockdep work for crosslock which is a lock allowed to + be released in a different context from the acquisition context. + Normally a lock must be released in the context acquiring the lock. + However, relexing this constraint helps synchronization primitives + such as page locks or completions can use the lock correctness + detector, lockdep. + +config LOCKDEP_COMPLETIONS + bool + help + A deadlock caused by wait_for_completion() and complete() can be + detected by lockdep using crossrelease feature. + +config BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK + bool "Enable the boot parameter, crossrelease_fullstack" + depends on LOCKDEP_CROSSRELEASE + default n + help + The lockdep "cross-release" feature needs to record stack traces + (of calling functions) for all acquisitions, for eventual later + use during analysis. By default only a single caller is recorded, + because the unwind operation can be very expensive with deeper + stack chains. + + However a boot parameter, crossrelease_fullstack, was + introduced since sometimes deeper traces are required for full + analysis. This option turns on the boot parameter. + config DEBUG_LOCKDEP bool "Lock dependency engine debugging" depends on DEBUG_KERNEL && LOCKDEP
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for series starting with locking/lockdep: restore cross-release checks (rev3)
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with locking/lockdep: restore cross-release checks (rev3)
URL : https://patchwork.freedesktop.org/series/51923/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
8236b690a94e locking/lockdep: restore cross-release checks
-:9: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#9:
commit dba04eb76df9 ("locking/Documentation: Remove stale crossrelease_fullstack parameter")-:69: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #69:
new file mode 100644
-:645: WARNING:TYPO_SPELLING: 'prefered' may be misspelled - perhaps 'preferred'? #645: FILE: Documentation/locking/crossrelease.txt:572:
+deadlock or its possibility sooner. So the former way would be prefered
-:817: WARNING:TYPO_SPELLING: 'implmentation' may be misspelled - perhaps 'implementation'? #817: FILE: Documentation/locking/crossrelease.txt:744:
+like how lockdep handles held_locks. Lockless implmentation is important
-:840: WARNING:TYPO_SPELLING: 'occured' may be misspelled - perhaps 'occurred'? #840: FILE: Documentation/locking/crossrelease.txt:767:
+that it has not occured yet, lockdep should consider all possible
-:987: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects? #987: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m) \
+do { \
+ lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map, \
+ (m)->name, (m)->key, 0); \
+ __init_completion(x); \
+} while (0)
-:987: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'm' - possible side-effects? #987: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m) \
+do { \
+ lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map, \
+ (m)->name, (m)->key, 0); \
+ __init_completion(x); \
+} while (0)
-:994: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects? #994: FILE: include/linux/completion.h:60:
+#define init_completion(x) \
+do { \
+ static struct lock_class_key __key; \
+ lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map, \
+ "(completion)" #x, \
+ &__key, 0); \
+ __init_completion(x); \
+} while (0)
-:1011: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'work' - possible side-effects? #1011: FILE: include/linux/completion.h:77:
+#define COMPLETION_INITIALIZER(work) \
+ { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait), \
+ STATIC_CROSS_LOCKDEP_MAP_INIT("(completion)" #work, &(work)) }
-:1109: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'? #1109: FILE: include/linux/lockdep.h:305:
+ * Seperate stack_trace data. This will be used at commit step.
-:1115: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'? #1115: FILE: include/linux/lockdep.h:311:
+ * Seperate hlock instance. This will be used at commit step.
-:1143: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'? #1143: FILE: include/linux/lockdep.h:339:
+ * Seperate hlock instance. This will be used at commit step.
-:1166: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1166: FILE: include/linux/lockdep.h:556:
+extern void lockdep_init_map_crosslock(struct lockdep_map *lock,
-:1170: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1170: FILE: include/linux/lockdep.h:560:
+extern void lock_commit_crosslock(struct lockdep_map *lock);
-:1190: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1190: FILE: include/linux/lockdep.h:580:
+extern void crossrelease_hist_start(enum xhlock_context_t c);
-:1191: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1191: FILE: include/linux/lockdep.h:581:
+extern void crossrelease_hist_end(enum xhlock_context_t c);
-:1192: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1192: FILE: include/linux/lockdep.h:582:
+extern void lockdep_invariant_state(bool force);
-:1193: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1193: FILE: include/linux/lockdep.h:583:
+extern void lockdep_init_task(struct task_struct *task);
-:1194: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #1194: FILE: include/linux/lockdep.h:584:
+extern void lockdep_free_task(struct task_struct *task);
-:1309: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1309: FILE: kernel/locking/lockdep.c:1158:
+ printk(" Possible unsafe locking scenario by crosslock:\n\n");
-:1310: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1310: FILE: kernel/locking/lockdep.c:1159:
+ printk(" CPU0 CPU1\n");
-:1311: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1311: FILE: kernel/locking/lockdep.c:1160:
+ printk(" ---- ----\n");
-:1312: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1312: FILE: kernel/locking/lockdep.c:1161:
+ printk(" lock(");
-:1314: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1314: FILE: kernel/locking/lockdep.c:1163:
+ printk(KERN_CONT ");\n");
-:1314: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1314: FILE: kernel/locking/lockdep.c:1163:
+ printk(KERN_CONT ");\n");
-:1315: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1315: FILE: kernel/locking/lockdep.c:1164:
+ printk(" lock(");
-:1317: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1317: FILE: kernel/locking/lockdep.c:1166:
+ printk(KERN_CONT ");\n");
-:1317: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1317: FILE: kernel/locking/lockdep.c:1166:
+ printk(KERN_CONT ");\n");
-:1318: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1318: FILE: kernel/locking/lockdep.c:1167:
+ printk(" lock(");
-:1320: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1320: FILE: kernel/locking/lockdep.c:1169:
+ printk(KERN_CONT ");\n");
-:1320: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1320: FILE: kernel/locking/lockdep.c:1169:
+ printk(KERN_CONT ");\n");
-:1321: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1321: FILE: kernel/locking/lockdep.c:1170:
+ printk(" unlock(");
-:1323: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1323: FILE: kernel/locking/lockdep.c:1172:
+ printk(KERN_CONT ");\n");
-:1323: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1323: FILE: kernel/locking/lockdep.c:1172:
+ printk(KERN_CONT ");\n");
-:1324: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1324: FILE: kernel/locking/lockdep.c:1173:
+ printk("\n *** DEADLOCK ***\n\n");
-:1326: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1326: FILE: kernel/locking/lockdep.c:1175:
+ printk(" Possible unsafe locking scenario:\n\n");
-:1327: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1327: FILE: kernel/locking/lockdep.c:1176:
+ printk(" CPU0 CPU1\n");
-:1328: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1328: FILE: kernel/locking/lockdep.c:1177:
+ printk(" ---- ----\n");
-:1329: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1329: FILE: kernel/locking/lockdep.c:1178:
+ printk(" lock(");
-:1331: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1331: FILE: kernel/locking/lockdep.c:1180:
+ printk(KERN_CONT ");\n");
-:1331: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1331: FILE: kernel/locking/lockdep.c:1180:
+ printk(KERN_CONT ");\n");
-:1332: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1332: FILE: kernel/locking/lockdep.c:1181:
+ printk(" lock(");
-:1334: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1334: FILE: kernel/locking/lockdep.c:1183:
+ printk(KERN_CONT ");\n");
-:1334: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1334: FILE: kernel/locking/lockdep.c:1183:
+ printk(KERN_CONT ");\n");
-:1335: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1335: FILE: kernel/locking/lockdep.c:1184:
+ printk(" lock(");
-:1337: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1337: FILE: kernel/locking/lockdep.c:1186:
+ printk(KERN_CONT ");\n");
-:1337: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1337: FILE: kernel/locking/lockdep.c:1186:
+ printk(KERN_CONT ");\n");
-:1338: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1338: FILE: kernel/locking/lockdep.c:1187:
+ printk(" lock(");
-:1340: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ... #1340: FILE: kernel/locking/lockdep.c:1189:
+ printk(KERN_CONT ");\n");
-:1340: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible #1340: FILE: kernel/locking/lockdep.c:1189:
+ printk(KERN_CONT ");\n");
-:1341: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level #1341: FILE: kernel/locking/lockdep.c:1190:
+ printk("\n *** DEADLOCK ***\n\n");
-:1477: CHECK:SPACING: spaces preferred around that '-' (ctx:WxV) #1477: FILE: kernel/locking/lockdep.c:2260:
+ chain_hlocks[chain->base + 1] = next -1;
^
-:1483: CHECK:BRACES: Unbalanced braces around else statement #1483: FILE: kernel/locking/lockdep.c:2266:
+ else {
-:1514: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #1514: FILE: kernel/locking/lockdep.c:3289:
+void lockdep_init_map_crosslock(struct lockdep_map *lock, const char *name,
+ struct lock_class_key *key, int subclass)
-:1899: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) #1899: FILE: kernel/locking/lockdep.c:4959:
+ if (nr_stack_trace_entries >= MAX_STACK_TRACE_ENTRIES-1) {
^
-:1926: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #1926: FILE: kernel/locking/lockdep.c:4986:
+ if (!add_chain_cache_classes(xid, pid, xhlock->hlock.irq_context,
+ chain_key))
-:2061: CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*task->xhlocks)...) over kzalloc(sizeof(struct hist_lock)...) #2061: FILE: kernel/locking/lockdep.c:5121:
+ task->xhlocks = kzalloc(sizeof(struct hist_lock) * MAX_XHLOCKS_NR,
-:2069: WARNING:TYPO_SPELLING: 'Diable' may be misspelled - perhaps 'Disable'? #2069: FILE: kernel/locking/lockdep.c:5129:
+ /* Diable crossrelease for current */
-:2141: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 42 warnings, 17 checks, 2023 lines checked afcdf6b27fd4 kthread: finer-grained lockdep/cross-release completion -:49: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #49: FILE: include/linux/kthread.h:11:
+struct task_struct *_kthread_create_on_node(int (*threadfn)(void *data),
void *data,
-:70: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #70: FILE: include/linux/kthread.h:39:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
void *data,
-:108: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #108: FILE: include/linux/kthread.h:206:
+_kthread_create_worker_on_cpu(int cpu, unsigned int flags,
+ struct lock_class_key *exited_key,
-:139: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #139: FILE: kernel/kthread.c:234:
+ lockdep_init_map_crosslock(&self->exited.map.map,
+ "(kthread completion)->exited",
-:139: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string #139: FILE: kernel/kthread.c:234:
+ "(kthread completion)->exited",
-:143: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #143: FILE: kernel/kthread.c:238:
+ lockdep_init_map_crosslock(&self->parked.map.map,
+ "(kthread completion)->parked",
-:143: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string #143: FILE: kernel/kthread.c:238:
+ "(kthread completion)->parked",
-:209: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #209: FILE: kernel/kthread.c:454:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
void *data, unsigned int cpu,
-:297: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 3 warnings, 6 checks, 240 lines checkedf22f9b50acb9 lockdep: Remove GFP_NOLOCKDEP annotation
-:6: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 7e7844226f10 ("lockdep: allow to disable reclaim lockup detection")' #6:
This was originally added in 7e7844226f10 ("lockdep: allow to disable
-:70: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 1 errors, 1 warnings, 0 checks, 32 lines checked1e6a69b82bb7 kernel/lockdep: Make cross-release a config option
-:74: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 42 lines checked f346774550fb mm: Check if mmu notifier callbacks are allowed to fail -:31: ERROR:SPACING: space required after that ',' (ctx:VxV) #31: FILE: mm/mmu_notifier.c:193:
+ WARN(blockable,"%pS callback failure not allowed\n",
^
-:35: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 1 errors, 1 warnings, 0 checks, 8 lines checkeda156b1095372 mm, notifier: Catch sleeping/blocking for !blockable
-:44: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 14 lines checkedc83af5577f98 mm, notifier: Add a lockdep map for invalidate_range_start
-:85: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 34 lines checked 8900507a5a3c dma-fence: cross-release annotations -:40: CHECK:LINE_SPACING: Please don't use multiple blank lines #40: FILE: drivers/dma-buf/dma-fence.c:33:
+
-:100: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #100: FILE: include/linux/dma-fence.h:45:
+}
+static inline void dma_fence_wait_release(void)
-:104: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #104: FILE: include/linux/dma-fence.h:49:
+}
+static inline void dma_fence_wait_release_commit(void)
-:122: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 3 checks, 78 lines checked 0ac294b32321 reservation: Annotate dma_fence waitsf2202d11beed drm/i915: Annotate dma_fence waits
-:14: WARNING:TYPO_SPELLING: 'doesnt' may be misspelled - perhaps 'doesn't'? #14:
creating a dma_fence_signal_opportunistic, which doesnt have the
-:73: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 2 warnings, 0 checks, 39 lines checkede29afdbed41f drm/i915: annotate intel_atomic_commit_fence_wait
-:66: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 14 lines checked0913556fbd7a HAX FOR CI: Enable cross-release
-:22: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <[email protected]>'
total: 0 errors, 1 warnings, 0 checks, 7 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.SPARSE: warning for series starting with locking/lockdep: restore cross-release checks (rev3)
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with locking/lockdep: restore cross-release checks (rev3)
URL : https://patchwork.freedesktop.org/series/51923/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: locking/lockdep: restore cross-release checks + +Error in reading or end of file.
Commit: kthread: finer-grained lockdep/cross-release completion Okay!
Commit: lockdep: Remove GFP_NOLOCKDEP annotation
Okay!
Commit: kernel/lockdep: Make cross-release a config option Okay!
Commit: mm: Check if mmu notifier callbacks are allowed to fail Okay!
Commit: mm, notifier: Catch sleeping/blocking for !blockable Okay!
Commit: mm, notifier: Add a lockdep map for invalidate_range_start Okay!
Commit: dma-fence: cross-release annotations
Okay!
Commit: reservation: Annotate dma_fence waits
Okay!
Commit: drm/i915: Annotate dma_fence waits
Okay!
Commit: drm/i915: annotate intel_atomic_commit_fence_wait Okay!
Commit: HAX FOR CI: Enable cross-release
Okay!
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with locking/lockdep: restore cross-release checks (rev3)
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with locking/lockdep: restore cross-release checks (rev3)
URL : https://patchwork.freedesktop.org/series/51923/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_5095 -> Patchwork_10738 =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_10738 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_10738, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/51923/revisions/3/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10738:
=== IGT changes ===
==== Possible regressions ====
igt@gem_tiled_fence_blits@basic:
fi-skl-gvtdvm: PASS -> DMESG-WARN
fi-bdw-gvtdvm: PASS -> DMESG-WARN== Known issues ==
Here are the changes found in Patchwork_10738 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@amdgpu/amd_basic@cs-compute:
fi-kbl-8809g: NOTRUN -> FAIL (fdo#108094)
igt@amdgpu/amd_prime@amd-to-i915:
fi-kbl-8809g: NOTRUN -> FAIL (fdo#107341)
igt@drv_selftest@live_contexts:
fi-icl-u: NOTRUN -> DMESG-FAIL (fdo#108569)
igt@gem_exec_suspend@basic-s3:
fi-kbl-soraka: NOTRUN -> INCOMPLETE (fdo#107556, fdo#107859, fdo#107774)
fi-blb-e6850: PASS -> INCOMPLETE (fdo#107718)
igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
fi-snb-2520m: PASS -> DMESG-FAIL (fdo#103713)
igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
fi-snb-2520m: PASS -> INCOMPLETE (fdo#103713)
==== Possible fixes ====
igt@drv_selftest@live_contexts:
fi-bsw-kefka: DMESG-FAIL (fdo#108656) -> PASS
igt@gem_ctx_switch@basic-default:
fi-icl-u: INCOMPLETE (fdo#108535, fdo#108315) -> PASS
igt@kms_frontbuffer_tracking@basic:
fi-byt-clapper: FAIL (fdo#103167) -> PASS
igt@kms_pipe_crc_basic@read-crc-pipe-c:
fi-skl-guc: FAIL (fdo#103191, fdo#107362) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
fi-byt-clapper: FAIL (fdo#103191, fdo#107362) -> PASS +1 fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#107341 https://bugs.freedesktop.org/show_bug.cgi?id=107341
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#107774 https://bugs.freedesktop.org/show_bug.cgi?id=107774
fdo#107859 https://bugs.freedesktop.org/show_bug.cgi?id=107859
fdo#108094 https://bugs.freedesktop.org/show_bug.cgi?id=108094
fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315
fdo#108535 https://bugs.freedesktop.org/show_bug.cgi?id=108535
fdo#108569 https://bugs.freedesktop.org/show_bug.cgi?id=108569
fdo#108656 https://bugs.freedesktop.org/show_bug.cgi?id=108656
== Participating hosts (52 -> 48) ==
Additional (1): fi-kbl-soraka
Missing (5): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600
== Build changes ==
* Linux: CI_DRM_5095 -> Patchwork_10738
CI_DRM_5095: 69a3d10e9a8e4733b81ab69cbeac1f0edd3b9e9d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4710: 431f0cfa1475dcaa475d6c30610317b3467bd4e4 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10738: 0913556fbd7aeb8ed24a352e2fb6307192b45773 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
0913556fbd7a HAX FOR CI: Enable cross-releasee29afdbed41f drm/i915: annotate intel_atomic_commit_fence_wait f2202d11beed drm/i915: Annotate dma_fence waits0ac294b32321 reservation: Annotate dma_fence waits 8900507a5a3c dma-fence: cross-release annotations c83af5577f98 mm, notifier: Add a lockdep map for invalidate_range_start a156b1095372 mm, notifier: Catch sleeping/blocking for !blockable f346774550fb mm: Check if mmu notifier callbacks are allowed to fail 1e6a69b82bb7 kernel/lockdep: Make cross-release a config option f22f9b50acb9 lockdep: Remove GFP_NOLOCKDEP annotation afcdf6b27fd4 kthread: finer-grained lockdep/cross-release completion 8236b690a94e locking/lockdep: restore cross-release checks
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10738/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx