Messages in this thread | | | Date | Tue, 14 Jun 2022 08:13:52 -0700 | From | Davidlohr Bueso <> | Subject | Re: [PATCH v6 01/13] mm/demotion: Add support for explicit memory tiers |
| |
>> memory_tier_lock isn't held to call register_memory_tier() in this >> patch. That will cause confusion. > >will this help to explain this better >modified mm/memory-tiers.c >@@ -151,6 +151,11 @@ static void insert_memory_tier(struct memory_tier *memtier) > struct list_head *ent; > struct memory_tier *tmp_memtier; > >+ if (IS_ENABLED(CONFIG_DEBUG_VM) && !mutex_is_locked(&memory_tier_lock)) { >+ WARN_ON_ONCE(1); >+ return; >+ }
Why not just use lockdep here instead?
| |