lkml.org 
[lkml]   [2022]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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?

\
 
 \ /
  Last update: 2022-06-14 17:29    [W:0.100 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site