Re: [RFC][PATCH] vm_operation to avoid pagefault/inval race

Andrew Morton
2003-05-20T08:11:57Z

"Paul E. McKenney" <paulmck@us.ibm.com> wrote:
>
> So the general idea is to do something as follows, right?

It sounds reasonable. A matter of putting together the appropriate
library functions and refactoring a few things.

>
> o Make a function, perhaps named something like
> install_new_page(), that does the PTE-installation
> and RSS-adjustment tasks currently performed by
> both do_no_page() and by do_anonymous_page().

That's similar to mm/fremap.c:install_page(). (Which forgets to call
update_mmu_cache(). Debatably a buglet.)

However there is not a lot of commonality between the various nopage()s and
there may not be a lot to be gained from all this. There is subtle code in
there and it is performance-critical. I'd be inclined to try to minimise
overall code churn in this work.