From: moreau francis <francis_moreau2000@yahoo.fr>
To: Andy Whitcroft <apw@shadowen.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re : Re : Re : Re : sparsemem usage
Date: Wed, 9 Aug 2006 14:19:01 +0000 (GMT) [thread overview]
Message-ID: <20060809141901.40003.qmail@web25814.mail.ukl.yahoo.com> (raw)
In-Reply-To: <44D1F688.2030806@shadowen.org>
Andy Whitcroft wrote:
>
> I have to re-iterate pfn_valid() does not mean pfn_valid_memory(), it
> means pfn_valid_memmap(). If you want to know if a page is valid and
> memory (at least on x86) you could use:
>
> if (pfn_valid(pfn) && page_is_ram(pfn)) {
> }
>
> It is rare you care how many real page frames there are in the system.
> You are more interested in how many usable frames there are. Such as
> for use in sizing hashes or caches. The reserved pages should be
> excluded in this calculation. ACPI pages, BIOS pages and the like
> simply are no interest.
>
> I don't see anywhere in the kernel using that construct to work out how
> many pages there are in the system. Mostly we have architectual
> information to tell us what real physical pages exist in the system such
> as the srat or e820 etc. If we really care about real page counts at
> that accuracy we have those to refer to.
>
Not all arch have page_is_ram(). OK it should be easy to have but we will
need create new data structures to keep this info. The point is that it's
really easy for memory model such sparsemem to keep this info.
> Do you have a usage model in which we really care about the number of
> pages in the system to that level of accuracy?
>
show_mem(), which is arch specific, needs to report them. And some
implementations use only pfn_valid().
thanks
Francis
next prev parent reply other threads:[~2006-08-09 14:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-03 9:07 moreau francis
2006-08-03 9:19 ` KAMEZAWA Hiroyuki
2006-08-03 9:47 ` Andy Whitcroft
2006-08-03 12:46 ` Re : " moreau francis
2006-08-03 13:13 ` Andy Whitcroft
2006-08-09 14:19 ` moreau francis [this message]
2006-08-10 4:46 ` Re : " KAMEZAWA Hiroyuki
2006-08-10 12:40 ` moreau francis
2006-08-10 12:49 ` KAMEZAWA Hiroyuki
2006-08-11 12:52 Re : Re : " Andy Whitcroft
2006-08-16 12:56 ` Re : " moreau francis
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=20060809141901.40003.qmail@web25814.mail.ukl.yahoo.com \
--to=francis_moreau2000@yahoo.fr \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=apw@shadowen.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®