From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: xen-devel@lists.xen.org
Cc: sstabellini@kernel.org, wei.liu2@citrix.com,
George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
ian.jackson@eu.citrix.com, tim@xen.org, jbeulich@suse.com,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: [PATCH v2 4/4] mm: Don't request scrubbing until dom0 is running
Date: Thu, 31 Aug 2017 09:16:14 -0400 [thread overview]
Message-ID: <1504185374-7581-5-git-send-email-boris.ostrovsky@oracle.com> (raw)
In-Reply-To: <1504185374-7581-1-git-send-email-boris.ostrovsky@oracle.com>
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>
---
Changes in v2:
* Use '||' instead of '|'. Drop '!!'
* Clarified commit message.
xen/common/page_alloc.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 2b8bb95..dbad1e1 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -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
{
--
1.8.3.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-08-31 13:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 13:16 [PATCH v2 0/4] Scrubbing updates Boris Ostrovsky
2017-08-31 13:16 ` [PATCH v2 1/4] mm: Initialize lowmem virq when boot-time scrubbing is disabled Boris Ostrovsky
2017-08-31 13:16 ` [PATCH v2 2/4] mm: Change boot_scrub_done definition Boris Ostrovsky
2017-08-31 13:16 ` [PATCH v2 3/4] mm: Don't poison a page if scrub_debug is off Boris Ostrovsky
2017-08-31 13:16 ` Boris Ostrovsky [this message]
2017-08-31 15:00 ` [PATCH v2 4/4] mm: Don't request scrubbing until dom0 is running Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1504185374-7581-5-git-send-email-boris.ostrovsky@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).