Messages in this thread Patch in this message | | | From | "Matthew Wilcox (Oracle)" <> | Subject | [PATCH 14/17] slub: Add slab_page_lock | Date | Fri, 9 Apr 2021 03:51:28 +0100 |
| |
Allow lockdep to track slub's page bit spin lock.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- mm/slub.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c index 9c0e26ddf300..2ed2abe080ac 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -346,19 +346,21 @@ static inline unsigned int oo_objects(struct kmem_cache_order_objects x) return x.x & OO_MASK; } +static DEFINE_SPLIT_LOCK(slab_page_lock); + /* * Per slab locking using the pagelock */ static __always_inline void slab_lock(struct page *page) { VM_BUG_ON_PAGE(PageTail(page), page); - bit_spin_lock(PG_locked, &page->flags); + bit_spin_lock(PG_locked, &page->flags, &slab_page_lock); } static __always_inline void slab_unlock(struct page *page) { VM_BUG_ON_PAGE(PageTail(page), page); - __bit_spin_unlock(PG_locked, &page->flags); + __bit_spin_unlock(PG_locked, &page->flags, &slab_page_lock); } /* Interrupts must be disabled (for the fallback code to work right) */ -- 2.30.2
| |