public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Snook <csnook@redhat.com>
To: Yoav Artzi <yoavar@checkpoint.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PAGE_SIZE on 64bit and 32bit machines
Date: Mon, 12 Nov 2007 12:13:43 -0500	[thread overview]
Message-ID: <473889C7.7000909@redhat.com> (raw)
In-Reply-To: <473865BE.2070806@checkpoint.com>

Yoav Artzi wrote:
> According to my knowledge the PAGE_SIZE on 32bit architectures in 4KB. 
> Logically, the PAGE_SIZE on 64bit architectures should be 8KB. That's at 
> least the way I understand it. However, looking at the kernel code of 
> x86_64, I see the PAGE_SIZE is 4KB.
> 
> 
> Can anyone explain to me what am I missing here?

PAGE_SIZE is highly architecture-dependent.  While it is true that 4K pages are 
typical on 32-bit architectures, and 64-bit architectures have historically 
introduced 8K pages, this is by no means a requirement.  x86_64 uses the same 
page sizes that are available on i686+PAE, so you get 4K base pages.  alpha and 
sparc64 typically use 8K base pages, though they have other options as well. 
ia64 defaults to 16K, though it can do 4K, 8K, and a bunch of larger base sizes. 
  ppc64 does 4K and 64K.  s390 uses 4K base pages in both 31-bit and 64-bit 
kernels.  If x86_64 processors are released with TLBs that can handle 8K pages, 
it'll be straightforward to add that feature, but otherwise it would require 
faking it in software, which has lots of pitfalls and does nothing to improve 
TLB efficiency.

	-- Chris

  parent reply	other threads:[~2007-11-12 17:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-12 14:39 PAGE_SIZE on 64bit and 32bit machines Yoav Artzi
2007-11-12 15:14 ` Jiri Slaby
2007-11-12 15:32   ` Yoav Artzi
2007-11-12 15:39     ` Adrian Bunk
2007-11-12 15:58       ` Yoav Artzi
2007-11-12 16:02         ` Jiri Slaby
2007-11-12 16:11         ` Kyle McMartin
2007-11-12 16:22           ` Yoav Artzi
2007-11-12 17:13 ` Chris Snook [this message]
2007-11-13 12:10 ` Helge Hafting

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=473889C7.7000909@redhat.com \
    --to=csnook@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yoavar@checkpoint.com \
    /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