Rohit Seth wrote:
On Fri, 2007-04-27 at 21:55 +1000, Nick Piggin wrote:That's the theory. However, I'd still like to know how the arch code can make the assertion that icache is known to be at all times other than at the time of a fault?Kernel needs to only worry about the updates that it does. So, if kernel is writing into a page that is getting marked with execute permission then it will need to make sure that caches are coherent. ia64 Kernel keeps track of whether it has done any write operation on a page or not using PG_arch_1. And accordingly flushes icaches.
It flushes icache at fault time, I know. What I don't know is why we leave them to drift out of sync afterwards.
Ie. what if an operation which causes incoherency is carried out _after_ an executable mapping is installed for that page.You mean by user space? If so, then it is user space responsibility to do the appropriate operations (like flush icache in this case).
No, I mean places that set PG_arch_1. flush_dcache_page. This can happen for mapped pages in write, splice, install_arg_page looks questionable, direct IO... Actually there are various windows where mapped pages can be !uptodate, so there is technically most of the filesystem code as well, but I'm trying to stamp those out, so let's ignore that for now. What if you were to say remove all the PG_arch_1 code, and do something really simple like flush icache in flush_dcache_page? Would performance suffer horribly? -- SUSE Labs, Novell Inc. - To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |