linux-mips
[Top] [All Lists]

Re: [PATCH 07/16] mm: fix cache coloring on x86_64 architecture

To: Michel Lespinasse <walken@google.com>
Subject: Re: [PATCH 07/16] mm: fix cache coloring on x86_64 architecture
From: Andrew Morton <akpm@linux-foundation.org>
Date: Tue, 6 Nov 2012 14:38:19 -0800
Cc: Rik van Riel <riel@redhat.com>, Hugh Dickins <hughd@google.com>, linux-kernel@vger.kernel.org, Russell King <linux@arm.linux.org.uk>, Ralf Baechle <ralf@linux-mips.org>, Paul Mundt <lethal@linux-sh.org>, "David S. Miller" <davem@davemloft.net>, Chris Metcalf <cmetcalf@tilera.com>, x86@kernel.org, William Irwin <wli@holomorphy.com>, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org
In-reply-to: <1352155633-8648-8-git-send-email-walken@google.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1352155633-8648-1-git-send-email-walken@google.com> <1352155633-8648-8-git-send-email-walken@google.com>
Sender: linux-mips-bounce@linux-mips.org
On Mon,  5 Nov 2012 14:47:04 -0800
Michel Lespinasse <walken@google.com> wrote:

> Fix the x86-64 cache alignment code to take pgoff into account.
> Use the x86 and MIPS cache alignment code as the basis for a generic
> cache alignment function.
> 
> The old x86 code will always align the mmap to aliasing boundaries,
> even if the program mmaps the file with a non-zero pgoff.
> 
> If program A mmaps the file with pgoff 0, and program B mmaps the
> file with pgoff 1. The old code would align the mmaps, resulting in
> misaligned pages:
> 
> A:  0123
> B:  123
> 
> After this patch, they are aligned so the pages line up:
> 
> A: 0123
> B:  123

We have a bit of a history of fiddling with coloring and finding that
the changes made at best no improvement.  Or at least, that's my
perhaps faulty memory of it.

This one needs pretty careful testing, please.

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