From: Jes Sorensen <jes@sgi.com>
To: keir@xensource.com
Cc: xen-devel@lists.xensource.com, alex.williamson@hp.com
Subject: [patch] ram scrub: only print dot for actual memory
Date: Fri, 15 Dec 2006 13:59:55 +0100 [thread overview]
Message-ID: <45829C4B.9030109@sgi.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 292 bytes --]
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
[-- Attachment #2: xen-ram-scrub.diff --]
[-- Type: text/plain, Size: 1015 bytes --]
# HG changeset patch
# User jes@eye.emea.sgi.com
# Date 1166187377 -3600
# Node ID 38bae9f2448d6d694eaea626db0bb63b75fdd1b2
# Parent fd3e080a4f54d1fbb4a1518a05508262b7ab3fce
free-mem-scrubbing: only print dots for actual memory
Signed-off-by: Jes Sorensen <jes@sgi.com>
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);
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2006-12-15 12:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=45829C4B.9030109@sgi.com \
--to=jes@sgi.com \
--cc=alex.williamson@hp.com \
--cc=keir@xensource.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.