lkml.org 
[lkml]   [1999]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.2.8pre6, can't run ZMAGIC binaries

Linus Torvalds writes:

[discussing unaligned mmap]

> The only way to guarantee coherency is to guarantee that everybody
> has the same physical page - which in turn means that everybody
> has to agree on alignment. Thus the page-alignment requirement.

You can guarantee coherency without the page-alignment requirement.

Let's say you have a machine with 4 kB pages. Process X maps a 4 kB
area with normal alignment, and Process Y maps an overlapping area
with 2 kB alignment. (the areas overlap by 2 kB)

Process X runs first. After an initial page fault, it writes to the
overlapping area. Process Y runs second. It takes a page fault that
marks the shared region as not present in process X, then gets an
updated copy of the shared area. (the kernel copies 2 kB)

The copy only happens often if multiple processes are writing to
overlapping unaligned regions. This can't even be done right now,
so I don't think the cost is a serious problem.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.020 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site