[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220614151352.6ykunpu3q2e7twmv@offworld>
Date: Tue, 14 Jun 2022 08:13:52 -0700
From: Davidlohr Bueso <dave@...olabs.net>
To: "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
Cc: Ying Huang <ying.huang@...el.com>, linux-mm@...ck.org,
akpm@...ux-foundation.org, Wei Xu <weixugc@...gle.com>,
Greg Thelen <gthelen@...gle.com>,
Yang Shi <shy828301@...il.com>,
Tim C Chen <tim.c.chen@...el.com>,
Brice Goglin <brice.goglin@...il.com>,
Michal Hocko <mhocko@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Hesham Almatary <hesham.almatary@...wei.com>,
Dave Hansen <dave.hansen@...el.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Alistair Popple <apopple@...dia.com>,
Dan Williams <dan.j.williams@...el.com>,
Feng Tang <feng.tang@...el.com>,
Jagdish Gediya <jvgediya@...ux.ibm.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
David Rientjes <rientjes@...gle.com>,
Johannes Weiner <hannes@...xchg.org>
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?
Powered by blists - more mailing lists