Hi I don't undestand your patch yet. just dumb question. > Problem this only fixes it for rhel and other kernels that don't have > get_user_pages_fast yet. You really have to think at some way to > serialize get_user_pages_fast for this and ksm. get_user_pages_fast > makes it a unfixable bug to mark any anon pte from readwrite to > readonly when there could be O_DIRECT on it, this has to be solved > sooner or later... I'm confused. I think gup_pte_range() doesn't change pte attribute. Could you explain why get_user_pages_fast() is evil? > So last detail, I take it as safe not to check if the pte is writeable > after handle_mm_fault returns as the new address space is private and > the page fault couldn't possibly race with anything (i.e. pte_same is > guaranteed to succeed). For the mainline version we can remove the > page lock and replace with smb_wmb in add_to_swap_cache and smp_rmb in > the page_count/PG_swapcache read to remove that trylockpage. Given > smp_wmb is barrier() it should worth it. Why rhel can't use memory barrier? -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html