[parisc-linux] Re: RFC: mmap patch

Matthew Wilcox willy@debian.org
Mon, 10 Mar 2003 01:50:05 +0000

On Sun, Mar 09, 2003 at 01:38:30PM -0800, David S. Miller wrote:
> I think the real issue is SHMLBA isn't being honored, right?

I don't think so.. according to cachetlb.txt:

If your D-cache has this problem, first define asm/shmparam.h SHMLBA
properly, it should essentially be the size of your virtually
addressed D-cache (or if the size is variable, the largest possible
size).  This setting will force the SYSv IPC layer to only allow user
processes to mmap shared memory at address which are a multiple of
this value.

That isn't where the problem lies.  This missing flush is in
shmem_getpage(), round about line 906 in 2.5.64.  Really, this should
be doing a clear_user_page() -- but not all callers of this routine have
a user address to pass on.

> The whole purpose of SHMLBA is to ensure a particular alignment
> for shared memory anonymous regions, if that isn't happening anymore
> that is a bug.

I thought this was to deal with user-user coherency problems, not

"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk