WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [patch] ram scrub: only print dot for actual memory

To: keir@xxxxxxxxxxxxx
Subject: [Xen-devel] [patch] ram scrub: only print dot for actual memory
From: Jes Sorensen <jes@xxxxxxx>
Date: Fri, 15 Dec 2006 13:59:55 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, alex.williamson@xxxxxx
Delivery-date: Sat, 16 Dec 2006 14:38:18 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.4 (X11/20060527)
Hi Keir,

I would like to propose we reorganize the code in scrub_heap_pages()
slightly so it only prints a dot for pages that are actually present.

For those of us who have hugely sparse physical memory maps, this saves
printing a couple of hundred lines of dots at boot time.

Cheers,
Jes
# HG changeset patch
# User jes@xxxxxxxxxxxxxxxx
# Date 1166187377 -3600
# Node ID 38bae9f2448d6d694eaea626db0bb63b75fdd1b2
# Parent  fd3e080a4f54d1fbb4a1518a05508262b7ab3fce
free-mem-scrubbing: only print dots for actual memory

Signed-off-by: Jes Sorensen <jes@xxxxxxx>

diff -r fd3e080a4f54 -r 38bae9f2448d xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Fri Dec 15 13:50:24 2006 +0100
+++ b/xen/common/page_alloc.c   Fri Dec 15 13:56:17 2006 +0100
@@ -493,15 +493,15 @@ void scrub_heap_pages(void)
 
     for ( pfn = first_pg; pfn < max_page; pfn++ )
     {
+        process_pending_timers();
+
+        /* Quick lock-free check. */
+        if ( allocated_in_map(pfn) )
+            continue;
+
         /* Every 100MB, print a progress dot. */
         if ( (pfn % ((100*1024*1024)/PAGE_SIZE)) == 0 )
             printk(".");
-
-        process_pending_timers();
-
-        /* Quick lock-free check. */
-        if ( allocated_in_map(pfn) )
-            continue;
 
         spin_lock_irq(&heap_lock);
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [patch] ram scrub: only print dot for actual memory, Jes Sorensen <=