public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Dean Roe <roe@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] - Make pfn_valid more precise for SGI Altix systems
Date: Wed, 09 Nov 2005 20:25:06 +0000	[thread overview]
Message-ID: <20051109202506.GA4152@sgi.com> (raw)

A single SGI Altix system can be divided into multiple partitions,
each running their own instance of the Linux kernel.  pfn_valid()
is currently not optimal for any but the first partition, since it
does not compare the pfn with min_low_pfn before calling the more
costly ia64_pfn_valid().

	Signed-off-by: Dean Roe <roe@sgi.com>



Index: linux-ia64-test/arch/ia64/kernel/ia64_ksyms.c
=================================--- linux-ia64-test.orig/arch/ia64/kernel/ia64_ksyms.c	2005-11-09 14:10:17.473464250 -0600
+++ linux-ia64-test/arch/ia64/kernel/ia64_ksyms.c	2005-11-09 14:10:50.800226042 -0600
@@ -42,6 +42,7 @@
 
 #ifdef CONFIG_VIRTUAL_MEM_MAP
 #include <linux/bootmem.h>
+EXPORT_SYMBOL(min_low_pfn);	/* defined by bootmem.c, but not exported by generic code */
 EXPORT_SYMBOL(max_low_pfn);	/* defined by bootmem.c, but not exported by generic code */
 #endif
 
Index: linux-ia64-test/include/asm-ia64/page.h
=================================--- linux-ia64-test.orig/include/asm-ia64/page.h	2005-11-09 14:10:17.484205369 -0600
+++ linux-ia64-test/include/asm-ia64/page.h	2005-11-09 14:10:50.803155438 -0600
@@ -112,8 +112,9 @@
 # define pfn_to_page(pfn)	(mem_map + (pfn))
 #elif defined(CONFIG_DISCONTIGMEM)
 extern struct page *vmem_map;
+extern unsigned long min_low_pfn;
 extern unsigned long max_low_pfn;
-# define pfn_valid(pfn)		(((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
+# define pfn_valid(pfn)		(((pfn) >= min_low_pfn) && ((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
 # define page_to_pfn(page)	((unsigned long) (page - vmem_map))
 # define pfn_to_page(pfn)	(vmem_map + (pfn))
 #endif


             reply	other threads:[~2005-11-09 20:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-09 20:25 Dean Roe [this message]
2005-11-09 23:24 ` [PATCH] - Make pfn_valid more precise for SGI Altix systems Luck, Tony
2005-11-09 23:34 ` Luck, Tony
2005-11-10 16:19 ` Dean Roe

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=20051109202506.GA4152@sgi.com \
    --to=roe@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox