From patchwork Thu Sep 29 17:41:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 116984 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 5BF1EB6F81 for ; Fri, 30 Sep 2011 03:42:19 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1R9KcY-0003lv-9k; Thu, 29 Sep 2011 17:42:06 +0000 Received: from mail.tpi.com ([70.99.223.143]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1R9KcU-0003lq-IN for kernel-team@lists.ubuntu.com; Thu, 29 Sep 2011 17:42:03 +0000 Received: from [10.0.2.5] (host-174-44-187-184.hln-mt.client.bresnan.net [174.44.187.184]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.tpi.com (Postfix) with ESMTP id 8237A2EED1B for ; Thu, 29 Sep 2011 10:41:52 -0700 (PDT) Message-ID: <4E84ADE5.3090507@canonical.com> Date: Thu, 29 Sep 2011 11:41:57 -0600 From: Tim Gardner User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110921 Thunderbird/3.1.15 MIME-Version: 1.0 To: Ubuntu Kernel Team Subject: Oneiric SRU: x86, amd: Avoid cache aliasing penalties on AMD family 15h X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com I've tested this patch series on the targeted CPU as well as regression testing on non-AMD CPUs. Without intricate and in-depth instrumentation I cannot tell if the patch has a positive impact, but I can at least be reasonably sure its not deleterious. The AMD guys are pretty hot for this patch set. Its been well discussed and merged into tip awaiting the 3.2 merge window. The following changes since commit c7d90650a63f4cca4af4df1bd1f97d642453f55f: Leann Ogasawara (1): UBUNTU: Start new release are available in the git repository at: git://kernel.ubuntu.com/rtg/ubuntu-oneiric bdozer Borislav Petkov (4): x86, amd: Avoid cache aliasing penalties on AMD family 15h x86: Add a BSP cpu_dev helper x86, amd: Move BSP code to cpu_dev helper x86-32, amd: Move va_align definition to unbreak 32-bit build Documentation/kernel-parameters.txt | 13 ++++++ arch/x86/include/asm/elf.h | 31 ++++++++++++++ arch/x86/kernel/cpu/amd.c | 46 +++++++++++++-------- arch/x86/kernel/cpu/common.c | 3 + arch/x86/kernel/cpu/cpu.h | 1 + arch/x86/kernel/sys_x86_64.c | 77 +++++++++++++++++++++++++++++++++- arch/x86/mm/mmap.c | 20 ++------- arch/x86/vdso/vma.c | 9 ++++ 8 files changed, 164 insertions(+), 36 deletions(-) Acked-by: Leann Ogasawara Acked-by: John Johansen Acked-by: Stefan Bader From ced0a60251915b657103239c88fee60117988ddf Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Sat, 6 Aug 2011 14:31:38 +0200 Subject: [PATCH 4/4] x86-32, amd: Move va_align definition to unbreak 32-bit build BugLink: http://bugs.launchpad.net/bugs/862583 hpa reported that dfb09f9b7ab03fd367740e541a5caf830ed56726 breaks 32-bit builds with the following error message: /home/hpa/kernel/linux-tip.cpu/arch/x86/kernel/cpu/amd.c:437: undefined reference to `va_align' /home/hpa/kernel/linux-tip.cpu/arch/x86/kernel/cpu/amd.c:436: undefined reference to `va_align' This is due to the fact that va_align is a global in a 64-bit only compilation unit. Move it to mmap.c where it is visible to both subarches. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1312633899-1131-1-git-send-email-bp@amd64.org Signed-off-by: H. Peter Anvin (cherry picked from git://tesla.tglx.de/git/linux-2.6-tip x86/cpu commit 9387f774d61b01ab71bade85e6d0bfab0b3419bd) Signed-off-by: Tim Gardner --- arch/x86/kernel/sys_x86_64.c | 4 ---- arch/x86/mm/mmap.c | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c index aaa8d09..fe7d2da 100644 --- a/arch/x86/kernel/sys_x86_64.c +++ b/arch/x86/kernel/sys_x86_64.c @@ -18,10 +18,6 @@ #include #include -struct __read_mostly va_alignment va_align = { - .flags = -1, -}; - /* * Align a virtual address to avoid aliasing in the I$ on AMD F15h. * diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c index 019ae78..ea640c0 100644 --- a/arch/x86/mm/mmap.c +++ b/arch/x86/mm/mmap.c @@ -31,6 +31,10 @@ #include #include +struct __read_mostly va_alignment va_align = { + .flags = -1, +}; + static unsigned int stack_maxrandom_size(void) { unsigned int max = 0; @@ -42,7 +46,6 @@ static unsigned int stack_maxrandom_size(void) return max; } - /* * Top of mmap area (just below the process stack). * -- 1.7.0.4