OSDN Git Service

powerpc/pseries/cmm: Convert loaned_pages to an atomic_long_t
authorDavid Hildenbrand <david@redhat.com>
Thu, 31 Oct 2019 14:29:28 +0000 (15:29 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 13 Nov 2019 05:58:01 +0000 (16:58 +1100)
commit1ef2f06b71792c2efaa4fb4aef8f1fc2a115ee1f
tree744e2634ca9fa64360525e61e67bb3cd531ebad5
parent7659f5d6448095ef436891c33bdd7c8500620a00
powerpc/pseries/cmm: Convert loaned_pages to an atomic_long_t

When switching to balloon compaction, we want to drop the cmm_lock and
completely rely on the balloon compaction list lock internally.
loaned_pages is currently protected under the cmm_lock.

Note: Right now cmm_alloc_pages() and cmm_free_pages() can be called
at the same time, e.g., via the thread and a concurrent OOM notifier.

Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191031142933.10779-8-david@redhat.com
arch/powerpc/platforms/pseries/cmm.c