Re: [PATCH v4 04/10] mm/vma: add+use vma lockdep acquire/release defines
From: Sebastian Andrzej Siewior
Date: Wed Jan 28 2026 - 06:38:51 EST
On 2026-01-23 20:12:14 [+0000], Lorenzo Stoakes wrote:
> --- a/include/linux/mmap_lock.h
> +++ b/include/linux/mmap_lock.h
> @@ -78,6 +78,37 @@ static inline void mmap_assert_write_locked(const struct mm_struct *mm)
…
> +/* Only meaningful if CONFIG_LOCK_STAT is defined. */
> +#define __vma_lockdep_stat_mark_acquired(vma) \
> + lock_acquired(&vma->vmlock_dep_map, _RET_IP_)
> +
After going through the remaining series, I don't think I found a
matching lock_contended(). So perf/ tracing just give you a few
lock-acquired events. Wouldn't it make sense to also some
lock_contended() events where the caller had to wait before it could
acquire the lock?
Sebastian