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.