Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753676Ab2KFWiY (ORCPT ); Tue, 6 Nov 2012 17:38:24 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39767 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753340Ab2KFWiV (ORCPT ); Tue, 6 Nov 2012 17:38:21 -0500 Date: Tue, 6 Nov 2012 14:38:19 -0800 From: Andrew Morton To: Michel Lespinasse Cc: Rik van Riel , Hugh Dickins , linux-kernel@vger.kernel.org, Russell King , Ralf Baechle , Paul Mundt , "David S. Miller" , Chris Metcalf , x86@kernel.org, William Irwin , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org Subject: Re: [PATCH 07/16] mm: fix cache coloring on x86_64 architecture Message-Id: <20121106143819.4309031c.akpm@linux-foundation.org> In-Reply-To: <1352155633-8648-8-git-send-email-walken@google.com> References: <1352155633-8648-1-git-send-email-walken@google.com> <1352155633-8648-8-git-send-email-walken@google.com> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1107 Lines: 32 On Mon, 5 Nov 2012 14:47:04 -0800 Michel Lespinasse 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/