From patchwork Mon Aug 28 20:40:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Ostrovsky X-Patchwork-Id: 9926107 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 CDE02603B4 for ; Mon, 28 Aug 2017 20:39:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C005028798 for ; Mon, 28 Aug 2017 20:39:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4AAF287A5; Mon, 28 Aug 2017 20:39:56 +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 66FE2287AC for ; Mon, 28 Aug 2017 20:39:56 +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-0003On-6v; 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 1dmQmz-0003O9-Nf for xen-devel@lists.xen.org; Mon, 28 Aug 2017 20:37:41 +0000 Received: from [193.109.254.147] by server-5.bemta-6.messagelabs.com id A8/48-03368-41F74A95; Mon, 28 Aug 2017 20:37:40 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkkeJIrShJLcpLzFFi42LpnVTnqitSvyT S4M9nDoslHxezODB6HN39mymAMYo1My8pvyKBNWPHzddsBXc5Kj50z2RrYPzO1sXIxSEkMJlJ oqtjFTuE85tR4vacZqYuRk4gZyOjxMyXFRCJHkaJ5rPv2UESbAJGEmePTmcEsUUEpCWufb7MC FLELNDAJPH83EGwhLBAiMTS11fBGlgEVCUOvpwCFucV8JK4vfkTC4gtIaAgMeXhe2YQm1PAW+ LH078sEJu9JJ5OPcMEUWMs0Terj2UCI98CRoZVjBrFqUVlqUW6RhZ6SUWZ6RkluYmZObqGBmZ 6uanFxYnpqTmJScV6yfm5mxiBwcIABDsYz68NPMQoycGkJMq7s2JxpBBfUn5KZUZicUZ8UWlO avEhRhkODiUJ3r+1SyKFBItS01Mr0jJzgGELk5bg4FES4V0JkuYtLkjMLc5Mh0idYtTluNO34 QuTEEtefl6qlDjvQZAiAZCijNI8uBGwGLrEKCslzMsIdJQQT0FqUW5mCar8K0ZxDkYlYd5nIF N4MvNK4Da9AjqCCegIRcGFIEeUJCKkpBoYFwlM1SzY6Xn066TIVYzubMsOrI28pfzR0cDP5XP qkvcf5sg4PF3SwFLmt+qv9sWrBfFZhkoF2SVpPxOPzZtwJFoq/5227SylXxpp/etu1M+1fuGm P0Nzww2B9b4rIlZELXbYbO3w9UaqZmAggyfnnqk3Gp9wewh0KL412pS3dtFnkZ2mlq7xSizFG YmGWsxFxYkAGZ5SupwCAAA= X-Env-Sender: boris.ostrovsky@oracle.com X-Msg-Ref: server-5.tower-27.messagelabs.com!1503952658!108360173!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 38990 invoked from network); 28 Aug 2017 20:37:39 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-5.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 28 Aug 2017 20:37:39 -0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v7SKbXq1021986 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Aug 2017 20:37:33 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v7SKbXpA024883 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Aug 2017 20:37:33 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v7SKbWfL031632; Mon, 28 Aug 2017 20:37:32 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:32 -0700 From: Boris Ostrovsky To: xen-devel@lists.xen.org Date: Mon, 28 Aug 2017 16:40:26 -0400 Message-Id: <1503952829-11065-2-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: 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 1/4] mm: Initialize lowmem virq when boot-time scrubbing is disabled 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 scrub_heap_pages() does early return if boot-time scrubbing is disabled, neglecting to initialize lowmem VIRQ. Signed-off-by: Boris Ostrovsky --- xen/common/page_alloc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 9fa62d2..7d56e92 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -1849,6 +1849,14 @@ void __init scrub_heap_pages(void) int last_distance, best_node; int cpus; + /* + * Set bounds for the low mem virq algorithm. + * Not the most logical place for this but it needs to be done + * after dom0 has been constructed and this seems to be a + * convenient location. + */ + setup_low_mem_virq(); + if ( !opt_bootscrub ) return; @@ -1970,10 +1978,6 @@ void __init scrub_heap_pages(void) #ifdef CONFIG_SCRUB_DEBUG boot_scrub_done = true; #endif - - /* Now that the heap is initialized, run checks and set bounds - * for the low mem virq algorithm. */ - setup_low_mem_virq(); }