[Top] [All Lists]

Re: Linux Shared Memory Issue

To: Atsushi Nemoto <>
Subject: Re: Linux Shared Memory Issue
From: Jun Sun <>
Date: Thu, 25 Apr 2002 11:46:04 -0700
References: <> <> <>
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20010901
Atsushi Nemoto wrote:

On Wed, 24 Apr 2002 15:03:15 -0700, Jun Sun <> said:

jsun> Looks like the infamous cache aliasing problem.  Steve
jsun> Longerbeam had a patch which may help.  Please try it and let me
jsun> know the results.

jsun> +#define COLOUR_ALIGN(addr)    (((addr)+SHMLBA-1)&~(SHMLBA-1))

Recent sparc64's COLOUR_ALIGN macro have pgoff argument like this.
We should do it same way for MIPS?

#define COLOUR_ALIGN(addr,pgoff)                \
        ((((addr)+SHMLBA-1)&~(SHMLBA-1)) +  \
         (((pgoff)<<PAGE_SHIFT) & (SHMLBA-1)))

What is the purpose of adding the pgoff part? To avoid mapping all shared regions into the beginning of cache?


<Prev in Thread] Current Thread [Next in Thread>