From patchwork Mon Aug 28 20:40:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Ostrovsky X-Patchwork-Id: 9926109 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 9FEF160380 for ; Mon, 28 Aug 2017 20:39:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9317828798 for ; Mon, 28 Aug 2017 20:39:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87CE2287A5; Mon, 28 Aug 2017 20:39:58 +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 2870E28798 for ; Mon, 28 Aug 2017 20:39:58 +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 1dmQn1-0003Pa-VY; Mon, 28 Aug 2017 20:37:43 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmQn0-0003OR-NW for xen-devel@lists.xen.org; Mon, 28 Aug 2017 20:37:42 +0000 Received: from [85.158.143.35] by server-11.bemta-6.messagelabs.com id 1D/0A-03612-61F74A95; Mon, 28 Aug 2017 20:37:42 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRWlGSWpSXmKPExsXSO6nOVVe0fkm kwY/jShZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa0Zbq07BKraKr13HmRoY/7J0MXJxCAlMZJJ4 fvQKM4Tzm1Fi7sET7BDORkaJx796GSGcHkaJb6/7gTKcHGwCRhJnj05nBLFFBKQlrn2+DFbEL NAANOvcQbCEsICbxPxnX8BsFgFViSfPZjGD2LwCXhKzG36DxSUEFCSmPHwPFucU8Jb48RTkKE 6gbV4ST6eeYYKoMZQ4/XAb4wRGvgWMDKsYNYpTi8pSi3QNDfSSijLTM0pyEzNzgDwzvdzU4uL E9NScxKRiveT83E2MwGBhAIIdjMffxx1ilORgUhLl3VmxOFKILyk/pTIjsTgjvqg0J7X4EKMG B4fA5rWrLzBKseTl56UqSfA21i6JFBIsSk1PrUjLzAGGM0ypBAePkgivQw1Qmre4IDG3ODMdI nWK0ZjjTt+GL0wcTR+2fGESApskJc7rAzJJAKQ0ozQPbhAszi4xykoJ8zICnSnEU5BalJtZgi r/ilGcg1FJmLcQZApPZl4J3L5XQKcwAZ2iKLgQ5JSSRISUVANj9P+JTfu2b+R8y/j5RF+p2mb HzfbbJ264GGndu+RLTeY2H7tI/2D+n+qn+G9ZOBkuea58ZoXC4a6dJay/Y2tDeo9nTw0VOMB/ Sb+/f+GKo3YbubcdNlzweZKjdHKBU2zitUVH/3mvZO+7/MGnONnwXkpmou7nD2wRbyq3vvx73 Gzj1TbWFQmpSizFGYmGWsxFxYkAX99fQ64CAAA= X-Env-Sender: boris.ostrovsky@oracle.com X-Msg-Ref: server-11.tower-21.messagelabs.com!1503952659!76837863!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 36289 invoked from network); 28 Aug 2017 20:37:41 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-11.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 28 Aug 2017 20:37:41 -0000 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v7SKbY6e022010 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Aug 2017 20:37:35 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v7SKbYFX022563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Aug 2017 20:37:34 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v7SKbX2V031920; Mon, 28 Aug 2017 20:37:34 GMT Received: from ovs104.us.oracle.com (/10.149.76.204) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 28 Aug 2017 13:37:33 -0700 From: Boris Ostrovsky To: xen-devel@lists.xen.org Date: Mon, 28 Aug 2017 16:40:28 -0400 Message-Id: <1503952829-11065-4-git-send-email-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1503952829-11065-1-git-send-email-boris.ostrovsky@oracle.com> References: <1503952829-11065-1-git-send-email-boris.ostrovsky@oracle.com> X-Source-IP: userv0021.oracle.com [156.151.31.71] 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 3/4] 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()). Since boot_scrub_done will not be set if boot-time scrubbing is off we also check for domain state. Signed-off-by: Boris Ostrovsky --- xen/common/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 34a7992..b93dae9 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -2259,7 +2259,7 @@ void free_domheap_pages(struct page_info *pg, unsigned int order) */ scrub = !!d->is_dying; #else - scrub = true; + scrub = boot_scrub_done || !!d->is_dying; #endif } else