From: Jesper Juhl <jesper.juhl@gmail.com>
To: gbakos@cfa.harvard.edu
Cc: linux-kernel@vger.kernel.org
Subject: Re: kernel page size explanation
Date: Fri, 22 Jul 2005 03:20:16 +0200 [thread overview]
Message-ID: <9a87484905072118207a85970e@mail.gmail.com> (raw)
In-Reply-To: <Pine.SOL.4.58.0507211925170.28852@titan.cfa.harvard.edu>
On 7/22/05, Gaspar Bakos <gbakos@cfa.harvard.edu> wrote:
> Hi,
>
> Sorry for this nursery-school question.
>
> Could someone briefly explain me :
> 1. what is the kernel page size (any _useful_ pointer on the web is fine),
Depends on arch. Take a look at PAGE_SIZE and PAGE_SHIFT - look in
include/asm-*/page.h
Here's a nice web interface for browsing the source and quickly
finding the info you need :) : http://lxr.linux.no/ident?i=PAGE_SIZE
> 2. how can one tune it (for 2.6.*)?
For some archs the page size can be set at compile-time with
CONFIG_PAGE_SIZE_4KB, CONFIG_PAGE_SIZE_8KB etc - mips is an example of
such an arch (also take a look at CONFIG_HUGETLB_PAGE and friends).
> 3. what kind of effect does it have on system performance, if it is
> tuneable, and if it worth changing this at all?
>
Depends on your workload.
> I am a bit confused; at one place i see someone saying that the kernel
> page size is 4kb for i386.
> At another place I see a statement:
> "I tried all four possible page sizes on Itanium (4k, 8k, 16k and 64k)"
>
That makes perfect sense - i386 uses a 4K page size, ia64 is one of
the archs that support different page sizes (via
CONFIG_IA64_PAGE_SIZE_* ).
some i386 machines can also use 4MB pages IIRC, but I don't think
Linux lets you configure that for i386, but I'm not entirely sure.
> How can i figure out the page size of the kernel i am currently using?
>
You can
A) look in the .config file for your current kernel (if your arch
supports different page sizes at all).
B) You can use the getpagesize(2) syscall at runtime. getpagesize()
returns the nr of bytes in a page - man getpagesize - I'm not sure
that's universally supported though.
C) You can look at /proc/cpuinfo or /proc/meminfo , IIRC some archs
report page size there - not quite sure, can't remember...
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
next prev parent reply other threads:[~2005-07-22 1:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-21 23:31 kernel page size explanation Gaspar Bakos
2005-07-22 1:20 ` Jesper Juhl [this message]
2005-07-23 22:09 ` Gaspar Bakos
2005-07-24 18:37 ` Nix
2005-07-24 19:01 ` VASM
2005-07-24 19:24 ` Fawad Lateef
2005-07-24 21:28 ` Nix
2005-07-25 13:42 ` VASM
2005-07-25 15:03 ` Valdis.Kletnieks
[not found] <4sSO3-58H-13@gated-at.bofh.it>
2005-07-22 0:15 ` Robert Hancock
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=9a87484905072118207a85970e@mail.gmail.com \
--to=jesper.juhl@gmail.com \
--cc=gbakos@cfa.harvard.edu \
--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