From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx166.postini.com [74.125.245.166]) by kanga.kvack.org (Postfix) with SMTP id E1F826B006E for ; Fri, 8 Jun 2012 04:40:37 -0400 (EDT) Received: by eaan1 with SMTP id n1so1210682eaa.14 for ; Fri, 08 Jun 2012 01:40:36 -0700 (PDT) Date: Fri, 8 Jun 2012 10:40:33 +0200 From: Simon Baatz Subject: Re: [PATCH] shmem: replace_page must flush_dcache and others Message-ID: <20120608084033.GA21818@schnuecks.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Hugh Dickins Cc: Andrew Morton , Christoph Hellwig , KAMEZAWA Hiroyuki , Alan Cox , Stephane Marchesin , Andi Kleen , Dave Airlie , Daniel Vetter , Rob Clark , Cong Wang , linux-mm@kvack.org, linux-fsdevel@kernel.org, linux-kernel@vger.kernel.org Hi Hugh, On Thu, May 31, 2012 at 03:31:27PM -0700, Hugh Dickins wrote: > * shmem_replace_page must flush_dcache_page after copy_highpage [akpm] > > - *pagep = newpage; > page_cache_get(newpage); > copy_highpage(newpage, oldpage); > + flush_dcache_page(newpage); > Couldn't we use the lighter flush_kernel_dcache_page() here (like in fs/exec.c copy_strings())? If I got this correctly, the page is copied via the kernel mapping and thus, only the kernel mapping needs to be flushed. - Simon -- 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