[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8af9088a-8baf-9ea9-8e01-a163652aa53a@oracle.com>
Date: Mon, 29 Mar 2021 19:18:25 -0700
From: Mike Kravetz <mike.kravetz@...cle.com>
To: "Song Bao Hua (Barry Song)" <song.bao.hua@...ilicon.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc: Roman Gushchin <guro@...com>, Michal Hocko <mhocko@...e.com>,
Shakeel Butt <shakeelb@...gle.com>,
Oscar Salvador <osalvador@...e.de>,
David Hildenbrand <david@...hat.com>,
Muchun Song <songmuchun@...edance.com>,
David Rientjes <rientjes@...gle.com>,
linmiaohe <linmiaohe@...wei.com>,
Peter Zijlstra <peterz@...radead.org>,
Matthew Wilcox <willy@...radead.org>,
HORIGUCHI NAOYA <naoya.horiguchi@....com>,
"Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
Waiman Long <longman@...hat.com>, Peter Xu <peterx@...hat.com>,
Mina Almasry <almasrymina@...gle.com>,
Hillf Danton <hdanton@...a.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Will Deacon <will@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2 1/8] mm/cma: change cma mutex to irq safe spinlock
On 3/29/21 6:20 PM, Song Bao Hua (Barry Song) wrote:
>
>
>> -----Original Message-----
>> From: Mike Kravetz [mailto:mike.kravetz@...cle.com]
>> Sent: Tuesday, March 30, 2021 12:24 PM
>> To: linux-mm@...ck.org; linux-kernel@...r.kernel.org
>> Cc: Roman Gushchin <guro@...com>; Michal Hocko <mhocko@...e.com>; Shakeel Butt
>> <shakeelb@...gle.com>; Oscar Salvador <osalvador@...e.de>; David Hildenbrand
>> <david@...hat.com>; Muchun Song <songmuchun@...edance.com>; David Rientjes
>> <rientjes@...gle.com>; linmiaohe <linmiaohe@...wei.com>; Peter Zijlstra
>> <peterz@...radead.org>; Matthew Wilcox <willy@...radead.org>; HORIGUCHI NAOYA
>> <naoya.horiguchi@....com>; Aneesh Kumar K . V <aneesh.kumar@...ux.ibm.com>;
>> Waiman Long <longman@...hat.com>; Peter Xu <peterx@...hat.com>; Mina Almasry
>> <almasrymina@...gle.com>; Hillf Danton <hdanton@...a.com>; Joonsoo Kim
>> <iamjoonsoo.kim@....com>; Song Bao Hua (Barry Song)
>> <song.bao.hua@...ilicon.com>; Will Deacon <will@...nel.org>; Andrew Morton
>> <akpm@...ux-foundation.org>; Mike Kravetz <mike.kravetz@...cle.com>
>> Subject: [PATCH v2 1/8] mm/cma: change cma mutex to irq safe spinlock
>>
>> Ideally, cma_release could be called from any context. However, that is
>> not possible because a mutex is used to protect the per-area bitmap.
>> Change the bitmap to an irq safe spinlock.
>>
>> Signed-off-by: Mike Kravetz <mike.kravetz@...cle.com>
>
> It seems mutex_lock is locking some areas with bitmap operations which
> should be safe to atomic context.
>
> Reviewed-by: Barry Song <song.bao.hua@...ilicon.com>
Thanks Barry,
Not sure if you saw questions from Michal in previous series?
There was some concern from Joonsoo in the past about lock hold time due
to bitmap scans. You may have some insight into the typical size of CMA
areas on arm64. I believe the calls to set up the areas specify one bit
per page.
--
Mike Kravetz
Powered by blists - more mailing lists