linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Michal Simek <monstr@monstr.eu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Yinghai Lu <yinghai@kernel.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: memblock and bootmem problems if start + size = 4GB
Date: Mon, 19 Dec 2011 08:28:35 -0800	[thread overview]
Message-ID: <20111219162835.GA24519@google.com> (raw)
In-Reply-To: <4EEF42F5.7040002@monstr.eu>

Hello, Michal.

On Mon, Dec 19, 2011 at 02:58:13PM +0100, Michal Simek wrote:
> I have reached some problems with memblock and bootmem code for some configurations.
> We can completely setup the whole system and all addresses in it.
> The problem happens if we place main memory to the end of address space when
> mem_start + size reach 4GB limit.
> 
> For example:
> mem_start      0xF000 0000
> mem_size       0x1000 0000 (or better lowmem size)
> mem_end        0xFFFF FFFF
> start + size 0x1 0000 0000 (u32 limit reached).
> 
> I have done some patches which completely remove start + size values from architecture specific
> code but I have found some problem in generic code too.
> 
> For example in bootmem code where are three places where physaddr + size is used.
> I would prefer to retype it to u64 because baseaddr and size don't need to be 2^n.
> 
> Is it correct solution? If yes, I will create proper patch.

Yeah, that's an inherent problem in using [) ranges but I think
chopping off the last page probably is simpler and more robust
solution.  Currently, memblock_add_region() would simply ignore if
address range overflows but making it just ignore the last page is
several lines of addition.  Wouldn't that be effective enough while
staying very simple?

Thanks.

-- 
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-12-19 16:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19 13:58 memblock and bootmem problems if start + size = 4GB Michal Simek
2011-12-19 16:28 ` Tejun Heo [this message]
2011-12-20  9:19   ` Michal Simek
2011-12-29 13:44     ` Michal Simek
2011-12-29 15:58     ` Tejun Heo
2011-12-29 16:46       ` Michal Simek
2011-12-29 17:07         ` Tejun Heo
2011-12-30  7:58           ` Michal Simek
2011-12-30 17:45             ` Tejun Heo

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=20111219162835.GA24519@google.com \
    --to=tj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=monstr@monstr.eu \
    --cc=sam@ravnborg.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).