From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx193.postini.com [74.125.245.193]) by kanga.kvack.org (Postfix) with SMTP id 043AC6B0068 for ; Wed, 25 Jul 2012 14:51:06 -0400 (EDT) Date: Wed, 25 Jul 2012 13:51:01 -0500 (CDT) From: Christoph Lameter Subject: Re: [PATCH, RFC 0/6] Avoid cache trashing on clearing huge/gigantic page In-Reply-To: <1342788622-10290-1-git-send-email-kirill.shutemov@linux.intel.com> Message-ID: References: <1342788622-10290-1-git-send-email-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: 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 , Andrew Morton , Andrea Arcangeli , Johannes Weiner , Hugh Dickins , KAMEZAWA Hiroyuki , Mel Gorman , linux-kernel@vger.kernel.org On Fri, 20 Jul 2012, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > 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. why exempt the 4K around the fault address? Is there a regression if that is not exempted? I guess for anonymous huge pages one may assume that there will be at least one write to one cache line in the 4k page. Is it useful to get all the cachelines in the page in the cache. Also note that if we get later into hugepage use for the page cache we would want the cache to be cold because the contents have to come in from a storage medium. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org