From patchwork Tue Aug 29 17:09:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Ostrovsky X-Patchwork-Id: 9927773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C287F60383 for ; Tue, 29 Aug 2017 17:10:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E541289D0 for ; Tue, 29 Aug 2017 17:10:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FC59289ED; Tue, 29 Aug 2017 17:10:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D6822289D0 for ; Tue, 29 Aug 2017 17:10:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmjyD-00054e-TP; Tue, 29 Aug 2017 17:06:33 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmjyC-000549-9h for xen-devel@lists.xen.org; Tue, 29 Aug 2017 17:06:32 +0000 Received: from [193.109.254.147] by server-4.bemta-6.messagelabs.com id 78/D8-03283-71F95A95; Tue, 29 Aug 2017 17:06:31 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprMIsWRWlGSWpSXmKPExsUyZ7p8oK74/KW RBhO62CyWfFzM4sDocXT3b6YAxijWzLyk/IoE1owfPY2sBTc5KvbtncTewHiQrYuRi0NIYDKT xObDnYxdjJxAzl9GiTf36yESGxklfq6cxQKR6GGUONkWDmKzCRhJnD06HaxBREBa4trny4wgD cwCDUwSz88dBHI4OIQF3CROPYkDqWERUJVYN/McO4jNK+Alce/KEjBbQkBBYsrD98wgNqeAt8 TdWfehjvCSmLO8mQ2ixliib1YfywRGvgWMDKsYNYpTi8pSi3SNLPWSijLTM0pyEzNzdA0NzPR yU4uLE9NTcxKTivWS83M3MQIDhQEIdjAeWBR4iFGSg0lJlLdq6tJIIb6k/JTKjMTijPii0pzU 4kOMGhwcApvXrr7AKMWSl5+XqiTB+3cuUJ1gUWp6akVaZg4wlGFKJTh4lER4pecBpXmLCxJzi zPTIVKnGHU57vRt+MIkBDZDSpxXE6RIAKQoozQPbgQsri4xykoJ8zICHSjEU5BalJtZgir/il Gcg1FJmPcKyCU8mXklcJteAR3BBHRErBfYESWJCCmpBkZXDhXhL49rnFy4+yMaukT5TlkkFvt 97v0Rs0Hg2Fm5bZnZmU8bpE+3rTr+3sD+1q+6/4tmSe9ROslz6txpw3tNfNfauyv0QneJczME XFZkjC9qy3X8fsRLikU4VyJ5f/zaV/9uNpXNdf9rkDDjg41zycr2J9rHp5i+OHaqUOfqk68Hq 2OVS5RYijMSDbWYi4oTAQca8tymAgAA X-Env-Sender: boris.ostrovsky@oracle.com X-Msg-Ref: server-14.tower-27.messagelabs.com!1504026389!101589676!1 X-Originating-IP: [156.151.31.81] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTU2LjE1MS4zMS44MSA9PiAyODgzMzk=\n X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13642 invoked from network); 29 Aug 2017 17:06:30 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-14.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 29 Aug 2017 17:06:30 -0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v7TH6MWg011969 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Aug 2017 17:06:23 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v7TH6MpR028742 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Aug 2017 17:06:22 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v7TH6MLJ026777; Tue, 29 Aug 2017 17:06:22 GMT Received: from ovs104.us.oracle.com (/10.149.76.204) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 29 Aug 2017 10:06:21 -0700 From: Boris Ostrovsky To: xen-devel@lists.xen.org Date: Tue, 29 Aug 2017 13:09:16 -0400 Message-Id: <1504026557-11365-5-git-send-email-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1504026557-11365-1-git-send-email-boris.ostrovsky@oracle.com> References: <1504026557-11365-1-git-send-email-boris.ostrovsky@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] 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 Subject: [Xen-devel] [PATCH 4/5] mm: Don't request scrubbing until dom0 is running X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP There is no need to scrub pages freed during dom0 construction since heap will be scrubbed once dom0 is ready (by scrub_heap_pages()). Signed-off-by: Boris Ostrovsky --- Changes in v2: * Removed '#ifdef CONFIG_SCRUB_DEBUG' 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 3db77c5..6c08983 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -2247,16 +2247,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 {