linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, "Rafael J. Wysocki" <rjw@sisk.pl>,
	Pavel Machek <pavel@ucw.cz>
Subject: Re: [PATCH] MIPS: fix pfn_valid() for FLAGMEM
Date: Thu, 08 Oct 2009 23:46:00 +0800	[thread overview]
Message-ID: <1255016760.14496.57.camel@falcon> (raw)
In-Reply-To: <20091008144230.GA682@linux-mips.org>

On Thu, 2009-10-08 at 16:42 +0200, Ralf Baechle wrote:
> On Thu, Oct 08, 2009 at 04:57:32PM +0800, Wu Zhangjin wrote:
> 
> > When CONFIG_FLAGMEM enabled, STD/Hiberation will fail on YeeLoong
> > laptop, This patch fix it:
> > 
> > if pfn is between min_low_pfn and max_mapnr, the old pfn_valid() will
> > return TRUE, but in reality, if the memory is not continuous, it should
> > be false. for example:
> 
> Hm...  All that pfn_valid() indicates is that a page frame number is valid
> to index a pfn.  That is that a pfn is valid to index the mem_map array.
> 
> > $ cat /proc/iomem | grep "System RAM"
> > 00000000-0fffffff : System RAM
> > 90000000-bfffffff : System RAM
> > 
> > as we can see, it is not continuous, so, some of the memory is not valid
> > but regarded as valid by pfn_valid(), and at last make STD/Hibernate
> > fail when shrinking a too large number of invalid memory.
> > 
> > Here, we fix it via checking pfn is in the "System RAM" or not, if yes,
> > return TRUE.
> 
> Are the non-memory parts marked as reserved?
> 
No, so, is that a need to mark them?

Regrads,
	Wu Zhangjin

  reply	other threads:[~2009-10-08 15:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-08  8:57 [PATCH] MIPS: fix pfn_valid() for FLAGMEM Wu Zhangjin
2009-10-08  9:29 ` Pavel Machek
2009-10-08 10:33   ` Wu Zhangjin
2009-10-08 10:36     ` Pavel Machek
2009-10-08 10:57       ` Wu Zhangjin
2009-10-08  9:58 ` Sergei Shtylyov
2009-10-08 10:36   ` Wu Zhangjin
2009-10-08 14:42 ` Ralf Baechle
2009-10-08 15:46   ` Wu Zhangjin [this message]
2009-10-08 18:50     ` Ralf Baechle
2009-10-09 15:43       ` Sergei Shtylyov
2009-10-09 15:48         ` Sergei Shtylyov

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=1255016760.14496.57.camel@falcon \
    --to=wuzhangjin@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=pavel@ucw.cz \
    --cc=ralf@linux-mips.org \
    --cc=rjw@sisk.pl \
    /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).