Re: [BUGFIX][PATCH] DO flush icache before set_pte() on ia64.

From: Nick Piggin
Date: Thu Jul 05 2007 - 00:30:20 EST


KAMEZAWA Hiroyuki wrote:
On Thu, 05 Jul 2007 13:19:41 +1000
Nick Piggin <nickpiggin@xxxxxxxxxxxx> 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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/