[lkml]   [2007]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: why does the macro "ZERO_PAGE" take an argument?
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.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-06-07 20:13    [W:0.120 / U:1.916 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site