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

From: Peter Zijlstra
Date: Tue Apr 06 2021 - 05:21:03 EST


On Mon, Apr 05, 2021 at 04:00:36PM -0700, Mike Kravetz wrote:
> The lock doesn't protect any sleepable operation so it can be changed to
> a (irq aware) spin lock. The bitmap processing should be quite fast in
> typical case but if cma sizes grow to TB then we will likely need to
> replace the lock by a more optimized bitmap implementation.

Or an rb-tree that stores ranges, which should also be much cheaper
storage wise, for those sizes.