From: Daniel J Blueman <daniel@numascale.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Yinghai Lu <yinghai@kernel.org>
Cc: Daniel J Blueman <daniel@numascale.com>,
x86@kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, Steffen Persvold <sp@numascale.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Bjorn Helgaas <bhelgaas@google.com>
Subject: [PATCH] x86: Drop redundant memory-block sizing code
Date: Thu, 6 Nov 2014 12:50:14 +0800 [thread overview]
Message-ID: <1415249414-20888-1-git-send-email-daniel@numascale.com> (raw)
In-Reply-To: <ojh5M-xh-17@gated-at.bofh.it>
Drop the unused code from selecting a fixed memory block size of 2GB
on large-memory x86-64 systems.
Signed-off-by: Daniel J Blueman <daniel@numascale.com>
---
arch/x86/mm/init_64.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index ebca30f..09c0567 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -1243,28 +1243,12 @@ int in_gate_area_no_mm(unsigned long addr)
static unsigned long probe_memory_block_size(void)
{
- /* start from 2g */
- unsigned long bz = 1UL<<31;
-
if (totalram_pages >= (64ULL << (30 - PAGE_SHIFT))) {
pr_info("Using 2GB memory block size for large-memory system\n");
return 2UL * 1024 * 1024 * 1024;
}
- /* less than 64g installed */
- if ((max_pfn << PAGE_SHIFT) < (16UL << 32))
- return MIN_MEMORY_BLOCK_SIZE;
-
- /* get the tail size */
- while (bz > MIN_MEMORY_BLOCK_SIZE) {
- if (!((max_pfn << PAGE_SHIFT) & (bz - 1)))
- break;
- bz >>= 1;
- }
-
- printk(KERN_DEBUG "memory block size : %ldMB\n", bz >> 20);
-
- return bz;
+ return MIN_MEMORY_BLOCK_SIZE;
}
static unsigned long memory_block_size_probed;
--
1.9.1
next parent reply other threads:[~2014-11-06 4:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ojh5M-xh-17@gated-at.bofh.it>
2014-11-06 4:50 ` Daniel J Blueman [this message]
2014-11-06 9:40 ` [PATCH] x86: Drop redundant memory-block sizing code Borislav Petkov
2014-11-06 10:33 ` Daniel J Blueman
2014-11-06 10:40 ` Borislav Petkov
2014-11-06 11:10 ` Daniel J Blueman
2014-11-06 11:56 ` Borislav Petkov
2014-11-10 9:03 ` Daniel J Blueman
2014-11-10 16:11 ` Borislav Petkov
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=1415249414-20888-1-git-send-email-daniel@numascale.com \
--to=daniel@numascale.com \
--cc=bhelgaas@google.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sp@numascale.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yinghai@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;
as well as URLs for NNTP newsgroup(s).