From: Jeremy Jackson <jerj@coplanar.net>
To: Yinlei Yu <yinlei_yu@hotmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Is there anyway to use 4M pages on x86 linux in user level?
Date: Thu, 17 Jan 2002 23:23:06 -0800 [thread overview]
Message-ID: <3C47CD5A.1070101@coplanar.net> (raw)
In-Reply-To: <F198nwpGR881Np7vXee0002516d@hotmail.com>
I brought this to the list once about a half a year ago. One item I got
in feedback was that
it would require a reverse-mapping allocator (for the cases of mappings
to ram) to be able to coalesce/rearrange pages to
make room for contiguous 4M pages. Such an allocator now exists...
search an LKML archive for "rmap".
In the case of non-swappable memory, the allocator is not an issue. In
fact the kernel does use 4M pages to map the kernel itsself
(non-swappable and contiguous) and the 1:1 mapping of physical memory on
non-himem kernels.(not 100% sure about that part) I immagine this could
be easily extended to things like the bt848, the framebuffer on all
video cards (ok not ISA-VGA), and any mmio regions sufficiently large
enough. ( or redo BIOS PCI setup so regions are at least 4M apart...)
As for reduced TLB misses... I just read the specs for decoding the MSRs
on AMD processors to determine cache organization, and it turns out that
they have separate TLBs for 4k vs 4M pages. So you actually get more TLB
entries by using 4M pages...
Now I guess we need to start thinking about extent based filesystems and
how to page in/out 4M pages...mmap files...
Yinlei Yu wrote:
> Hi,
>
> I am working on a project that keep accessing lots of memory
> randomly(say 500MB-1.5GB) and we do have such amount of memory
> installed so there's almost no page faults while running the entire
> program. Since x86 architecutre has a 4M page feature, is it possible
> to make use of these big pages instead of 4K pages in my program (a
> user-level application) so I can expect much fewer TLB misses due to
> the reduced number of TLB entries? Thanks very much!
>
>
>
>
>
>
> _________________________________________________________________
> Join the world's largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2002-01-18 7:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-17 17:18 Is there anyway to use 4M pages on x86 linux in user level? Yinlei Yu
2002-01-17 17:48 ` Rik van Riel
2002-01-18 7:23 ` Jeremy Jackson [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-01-18 12:31 DervishD
2002-01-18 13:46 ` Brian Gerst
2002-01-18 21:10 DervishD
2002-01-18 21:14 ` Brian Gerst
2002-01-18 21:37 ` Richard B. Johnson
2002-01-18 23:18 DervishD
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=3C47CD5A.1070101@coplanar.net \
--to=jerj@coplanar.net \
--cc=linux-kernel@vger.kernel.org \
--cc=yinlei_yu@hotmail.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