From: "H. Peter Anvin" <hpa@zytor.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: "Robert P. J. Day" <rpjday@mindspring.com>,
Satyam Sharma <satyam.sharma@gmail.com>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: why does the macro "ZERO_PAGE" take an argument?
Date: Thu, 07 Jun 2007 11:04:04 -0700 [thread overview]
Message-ID: <46684894.5010506@zytor.com> (raw)
In-Reply-To: <20070607163731.GB30044@linux-mips.org>
Ralf Baechle wrote:
> Cache aliases. When the same page of physical memory is mapped twice to
> user space, let's say at address addr and addr + PAGE_SIZE this is normally
> harmless although wasteful on processors with virtually indexed caches as
> long as the page is mapped read-only such as in case of ZERO_PAGE.
>
> If the same thing happens with a writable page there is the chance of
> severe data corruption. Some members of the R4000 family are now trying
> to be helpful by throwing the kernel a "virtual coherency" exception. The
> bad news about this exception is there might be thousands (the theoretical
> worst case would be millions) of it in a single second, so servicing can be
> very expensive. For the ZERO page this can be avoided by using several
> pages mapped in a way such that their addresses don't conflict.
Note that it can be a *very expensive* waste even on machines that do
this in hardware. Colouring the zeropage can have sizable performance
advantages for virtually no cost.
-hpa
next prev parent reply other threads:[~2007-06-07 18:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 11:17 why does the macro "ZERO_PAGE" take an argument? Robert P. J. Day
2007-06-07 11:29 ` Nick Piggin
2007-06-07 11:34 ` Robert P. J. Day
2007-06-07 11:39 ` Satyam Sharma
2007-06-07 11:53 ` Robert P. J. Day
2007-06-07 16:37 ` Ralf Baechle
2007-06-07 18:04 ` H. Peter Anvin [this message]
2007-06-07 17:32 ` H. Peter Anvin
2007-06-07 19:29 ` William Lee Irwin III
2007-06-07 21:16 ` H. Peter Anvin
2007-06-08 7:25 ` Robert P. J. Day
2007-06-09 0:49 ` H. Peter Anvin
2007-06-12 2:18 ` Nick Piggin
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=46684894.5010506@zytor.com \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=ralf@linux-mips.org \
--cc=rpjday@mindspring.com \
--cc=satyam.sharma@gmail.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