[PATCH] flush_icache_user_range (v2.5.4)
The patch below changes access_process_vm to use a new architecture hook, flush_icache_user_range, instead of flush_icache_page, and adds a definition of flush_icache_user_range which does the same thing as flush_icache_page for all architectures except PPC. (The PPC update that is in Linus' BK tree already includes a suitable definition of flush_icache_user_range.) The reason for doing this is that when flush_icache_page is called from do_no_page or do_swap_page, I want to be able to do the flush conditionally, based on the state of the page. In contrast, access_process_vm needs to do the flush unconditionally since it has just modified the page. In the access_process_vm case it is useful to have the information about the user address and length that have been modified since then we can just flush the affected cache lines rather than the whole page. This patch should make it easy to improve performance on alpha, since there (as I understand it) the icache flush is not needed at all in do_no_page or do_swap_page, but is needed in access_process_vm. All that is needed is to make flush_icache_page a noop on alpha. The patch below doesn't do this, I'll let the alpha maintainers push that change if they want.
Showing
Please register or sign in to comment