From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <468C73B5.1050405@yahoo.com.au> Date: Thu, 05 Jul 2007 14:29:41 +1000 From: Nick Piggin MIME-Version: 1.0 Subject: Re: [BUGFIX][PATCH] DO flush icache before set_pte() on ia64. References: <20070704150504.423f6c54.kamezawa.hiroyu@jp.fujitsu.com> <468B3EAA.9070905@yahoo.com.au> <20070704163826.d0b7465b.kamezawa.hiroyu@jp.fujitsu.com> <468C51A7.3070505@yahoo.com.au> <20070705114726.2449f270.kamezawa.hiroyu@jp.fujitsu.com> <468C634D.9050306@yahoo.com.au> <20070705125427.9a3b8e8b.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20070705125427.9a3b8e8b.kamezawa.hiroyu@jp.fujitsu.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: KAMEZAWA Hiroyuki Cc: "linux-ia64@vger.kernel.org" , LKML , "tony.luck@intel.com" , "linux-mm@kvack.org" , Christoph Lameter , Mike.stroya@hp.com, GOTO , dmosberger@gmail.com, hugh@veritas.com List-ID: KAMEZAWA Hiroyuki wrote: > On Thu, 05 Jul 2007 13:19:41 +1000 > Nick Piggin wrote: > > >>>>>From what I can work out, it is something like "at this point the page >>>>should be uptodate, so at least the icache won't contain *inconsistent* >>>>data, just old data which userspace should take care of flushing if it >>>>modifies". Is that always true? >>> >>> >>>I think it's true. But, in this case, i-cache doesn't contain *incositent* data. >>>There are inconsistency between L2-Dcache and L3-mixed-cache. At L2-icache-miss, >>>a cpu fetches data from L3 cache. >>>This case seems defficult to be generalized... >> >>If there is something in the icache line that isn't the last data to >>be stored at that address, isn't that inconsistent? >> > > Hmm..do we have a chance to add do_flush_cache_if_not_filled_by_dma(page) > before SetPageUptodate(page) ? Well you shouldn't strictly need to, because only uptodate pages should ever be mapped with set_pte, and if you do the flush_icache before the set_pte, then you effectively get the same result. And if that's the result you want, then I don't think the flush_icache before set_pte is a *terrible* way to get it. -- SUSE Labs, Novell Inc. -- 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