From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755057Ab2GWXaX (ORCPT ); Mon, 23 Jul 2012 19:30:23 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54949 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753898Ab2GWXaW (ORCPT ); Mon, 23 Jul 2012 19:30:22 -0400 Date: Mon, 23 Jul 2012 16:30:20 -0700 From: Andrew Morton To: "Kirill A. Shutemov" Cc: linux-mm@kvack.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Andi Kleen , Tim Chen , Alex Shi , Jan Beulich , Robert Richter , Andy Lutomirski , Andrea Arcangeli , Johannes Weiner , Hugh Dickins , KAMEZAWA Hiroyuki , Mel Gorman , linux-kernel@vger.kernel.org Subject: Re: [PATCH, RFC 0/6] Avoid cache trashing on clearing huge/gigantic page Message-Id: <20120723163020.5250e09e.akpm@linux-foundation.org> In-Reply-To: <1342788622-10290-1-git-send-email-kirill.shutemov@linux.intel.com> References: <1342788622-10290-1-git-send-email-kirill.shutemov@linux.intel.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 On Fri, 20 Jul 2012 15:50:16 +0300 "Kirill A. Shutemov" wrote: > Clearing a 2MB huge page will typically blow away several levels of CPU > caches. To avoid this only cache clear the 4K area around the fault > address and use a cache avoiding clears for the rest of the 2MB area. > > It would be nice to test the patchset with more workloads. Especially if > you see performance regression with THP. > > Any feedback is appreciated. This all looks pretty sane to me. Some detail-poking from the x86 guys would be nice. What do other architectures need to do? Simply implement clear_page_nocache()? I believe that powerpc is one, not sure about others. Please update the changelogs to let arch maintainers know what they should do and cc those people on future versions?