All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Jacob Shin <jacob.shin@amd.com>
Cc: X86-ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Yinghai Lu <yinghai@kernel.org>, Tejun Heo <tj@kernel.org>,
	Dave Young <dyoung@redhat.com>, Chao Wang <chaowang@redhat.com>,
	Vivek Goyal <vgoyal@redhat.com>,
	Andreas Herrmann <andreas.herrmann3@amd.com>,
	Borislav Petkov <borislav.petkov@amd.com>
Subject: Re: [PATCH 3/5] x86: Only direct map addresses that are marked as E820_RAM
Date: Mon, 27 Aug 2012 13:15:18 -0700	[thread overview]
Message-ID: <503BD556.8080406@zytor.com> (raw)
In-Reply-To: <20120827191729.GB23135@jshin-Toonie>

On 08/27/2012 12:17 PM, Jacob Shin wrote:
> 
> if there is E820_RAM right above ISA region, then you get to initialize
> 0 ~ max_low_pfn in one big chunk, which results in some memory configurations
> for more 2M or 1G page tables which means less space used for page tables.
> 

We need to be able to coalesce small page tables to large, anyway; there
are plenty of machines in the field who do small chunks.  I'm not too
worried about the legacy region being in 4K pages; it will be broken
into 4K pages anyway by the TLB.

Another thing is that we may want to map from the top down (on i386 at
least top of lowmem down); we don't want to fill low memory with page
tables because of devices with restricted DMA masks.

> im also worried about the case where that first call to init_memory_mapping
> for 0 ~ 1MB, results in max_pfn_mapped = 1MB, and the next call to
> init_memory_mapping is some large enough area, where we don't have enough
> space under 1MB for all the page tables needed (maybe only 4K page tables
> are supported or something).

This is serious... I'm worrying that this might be a more general
problem.  In that case we probably need to handle the case where we have
filled up all the "free" memory with page tables for the next chunk;
however, in that case the answer is pretty simple: we can then allow the
memory already mapped to become page tables for the new chunk.

	-hpa

  reply	other threads:[~2012-08-27 20:15 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-24 23:55 [PATCH V4 0/5] x86: Create direct mappings for E820_RAM only Jacob Shin
2012-08-24 23:55 ` [PATCH 1/5] x86: Move enabling of PSE and PGE out of init_memory_mapping Jacob Shin
2012-08-25  1:25   ` Yinghai Lu
2012-08-25  1:49     ` Yinghai Lu
2012-08-25  2:06       ` Yinghai Lu
2012-08-25  4:15         ` Jacob Shin
2012-08-25  4:13     ` Jacob Shin
2012-08-24 23:55 ` [PATCH 2/5] x86: find_early_table_space based on memory ranges that are being mapped Jacob Shin
2012-10-21 21:22   ` Tom Rini
2012-08-24 23:55 ` [PATCH 3/5] x86: Only direct map addresses that are marked as E820_RAM Jacob Shin
2012-08-25  0:17   ` Jacob Shin
2012-08-25  0:30   ` H. Peter Anvin
2012-08-25  0:49     ` Jacob Shin
2012-08-25  1:13       ` H. Peter Anvin
2012-08-25  4:20         ` Jacob Shin
2012-08-25  4:21           ` H. Peter Anvin
2012-08-27 19:17             ` Jacob Shin
2012-08-27 20:15               ` H. Peter Anvin [this message]
2012-08-25  1:07   ` Yinghai Lu
2012-08-25  4:24     ` Jacob Shin
2012-08-25  4:54       ` Yinghai Lu
2012-08-27 18:49         ` Jacob Shin
2012-08-27 20:16           ` H. Peter Anvin
2012-08-28 16:06         ` Jacob Shin
2012-08-28 16:11           ` H. Peter Anvin
2012-08-24 23:55 ` [PATCH 4/5] x86: Fixup code testing if a pfn is direct mapped Jacob Shin
2012-08-24 23:55 ` [PATCH 5/5] x86: if kernel .text .data .bss are not marked as E820_RAM, complain and fix Jacob Shin
2012-08-25  1:23   ` Yinghai Lu
2012-08-25  4:25     ` Jacob Shin

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=503BD556.8080406@zytor.com \
    --to=hpa@zytor.com \
    --cc=andreas.herrmann3@amd.com \
    --cc=borislav.petkov@amd.com \
    --cc=chaowang@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=jacob.shin@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=vgoyal@redhat.com \
    --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 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.