mm: Don't scrub pages while holding heap lock in alloc_heap_pages()
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Wed, 6 Sep 2017 15:33:52 +0000 (11:33 -0400)
committerWei Liu <wei.liu2@citrix.com>
Thu, 7 Sep 2017 15:16:49 +0000 (16:16 +0100)
commit307c3be3ccb2853e061112d28f00cf57a8f7ca05
treeaa82e6fa6e47fb16971e0245ac33617f6c548b63
parent65c256266477e72f455a45a54597d5816646c74f
mm: Don't scrub pages while holding heap lock in alloc_heap_pages()

Instead, preserve PGC_need_scrub bit when setting PGC_state_inuse
state while still under the lock and clear those pages later.

Note that we still need to grub the lock when clearing PGC_need_scrub
bit since count_info might be updated during MCE handling in
mark_page_offline().

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/page_alloc.c