Hello all,
I think i clear up the confusion myself, and would like to share to you.On Mon, Nov 4, 2013 at 4:45 PM, frank kang <frank.kanchy@xxxxxxxxx> wrote:
I feel confused about the above atomic operation. That is, If the pte is zeroed and new swap entry is not set yet. Some process accesses to the address and page fault is raised. In the above routine from page fault, pte_none() will return TRUE and it will go to do_anonymous_page(...), instead of do_swap_page(...).But, in try_to_unmap_one_anon(...), the pte entry is cleared before it has new swap entry.return do_swap_page(...);As we know, if process access the virtual addresss with null PTE entry, it will result in page fault. In page fault routine, it will check PTE entry to determine whether it is swap case, (handle_pte_fault)Hello all,I have one confusion about PTE modification on page migration. Can anyone help me clarify it?
if (pte_none(entry)) {
....
return do_anonymous_page(...);
}
pteval = ptep_clear_flush_notify(vma, address, pte);
...
set_pte_at(mm, address, pte, swp_entry_to_pte(entry));
Am i right? I don't know if it is my fault or not.Can someone help me?Thanks!Frank
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies