Re: [PATCH v2 1/8] mm/cma: change cma mutex to irq safe spinlock

2021-03-30 Thread Mike Kravetz
On 3/30/21 1:01 AM, Michal Hocko wrote: > On Mon 29-03-21 16:23:55, Mike Kravetz wrote: >> 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. > > I would phra

Re: [External] Re: [PATCH v2 1/8] mm/cma: change cma mutex to irq safe spinlock

2021-03-30 Thread Muchun Song
On Tue, Mar 30, 2021 at 4:18 PM Michal Hocko wrote: > > On Tue 30-03-21 16:08:36, Muchun Song wrote: > > On Tue, Mar 30, 2021 at 4:01 PM Michal Hocko wrote: > > > > > > On Mon 29-03-21 16:23:55, Mike Kravetz wrote: > > > > Ideally, cma_release could be called from any context. However, that is >

Re: [External] Re: [PATCH v2 1/8] mm/cma: change cma mutex to irq safe spinlock

2021-03-30 Thread Michal Hocko
On Tue 30-03-21 16:08:36, Muchun Song wrote: > On Tue, Mar 30, 2021 at 4:01 PM Michal Hocko wrote: > > > > On Mon 29-03-21 16:23:55, Mike Kravetz wrote: > > > Ideally, cma_release could be called from any context. However, that is > > > not possible because a mutex is used to protect the per-area

RE: [External] Re: [PATCH v2 1/8] mm/cma: change cma mutex to irq safe spinlock

2021-03-30 Thread Song Bao Hua (Barry Song)
enbrand ; David Rientjes > ; linmiaohe ; Peter Zijlstra > ; Matthew Wilcox ; HORIGUCHI NAOYA > ; Aneesh Kumar K . V ; > Waiman Long ; Peter Xu ; Mina Almasry > ; Hillf Danton ; Joonsoo Kim > ; Song Bao Hua (Barry Song) > ; Will Deacon ; Andrew Morton > > Subject: Re: [Exter

Re: [External] Re: [PATCH v2 1/8] mm/cma: change cma mutex to irq safe spinlock

2021-03-30 Thread Muchun Song
On Tue, Mar 30, 2021 at 4:01 PM Michal Hocko wrote: > > On Mon 29-03-21 16:23:55, Mike Kravetz wrote: > > 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.

Re: [PATCH v2 1/8] mm/cma: change cma mutex to irq safe spinlock

2021-03-30 Thread Michal Hocko
On Mon 29-03-21 16:23:55, Mike Kravetz wrote: > 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. I would phrase the changelog slightly differerent " cma_relea

Re: [PATCH v2 1/8] mm/cma: change cma mutex to irq safe spinlock

2021-03-29 Thread Mike Kravetz
On 3/29/21 6:20 PM, Song Bao Hua (Barry Song) wrote: > > >> -Original Message- >> From: Mike Kravetz [mailto:mike.krav...@oracle.com] >> Sent: Tuesday, March 30, 2021 12:24 PM >> To: linux...@kvack.org; linux-kernel@vger.kernel.org >> Cc: Roman Gushchin ; Michal Hocko ; Shakeel >> Butt >

RE: [PATCH v2 1/8] mm/cma: change cma mutex to irq safe spinlock

2021-03-29 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Mike Kravetz [mailto:mike.krav...@oracle.com] > Sent: Tuesday, March 30, 2021 12:24 PM > To: linux...@kvack.org; linux-kernel@vger.kernel.org > Cc: Roman Gushchin ; Michal Hocko ; Shakeel Butt > ; Oscar Salvador ; David Hildenbrand > ; Muchun Song ; David Rie

Re: [PATCH v2 1/8] mm/cma: change cma mutex to irq safe spinlock

2021-03-29 Thread Roman Gushchin
On Mon, Mar 29, 2021 at 04:23:55PM -0700, Mike Kravetz wrote: > 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 Acked-by: R