]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
mm: don't request scrubbing until dom0 is running
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Fri, 1 Sep 2017 09:06:21 +0000 (11:06 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 1 Sep 2017 09:06:21 +0000 (11:06 +0200)
There is no need to scrub pages freed during dom0 construction since
once dom0 is ready the heap will be scrubbed by scrub_heap_pages() anyway,
setting scrub_debug at the end.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
xen/common/page_alloc.c

index 2b8bb953695c514b772fa308a33c29adbecd5962..dbad1e1ca0fa4b0f4d3c11a1a9e5281cbfc997e3 100644 (file)
@@ -2248,16 +2248,12 @@ void free_domheap_pages(struct page_info *pg, unsigned int order)
 
             spin_unlock_recursive(&d->page_alloc_lock);
 
-#ifndef CONFIG_SCRUB_DEBUG
             /*
              * Normally we expect a domain to clear pages before freeing them,
              * if it cares about the secrecy of their contents. However, after
              * a domain has died we assume responsibility for erasure.
              */
-            scrub = !!d->is_dying;
-#else
-            scrub = true;
-#endif
+            scrub = d->is_dying || scrub_debug;
         }
         else
         {