Re: [RFC][PATCH v3 1/6] mm: Don't unmap gup()ed page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> +     if (!migration) {
>> +             /* re-check */
>> +             if (PageSwapCache(page) &&
>> +                 page_count(page) != page_mapcount(page) + 2) {
>> +                     /* We lose race against get_user_pages_fast() */
>> +                     set_pte_at(mm, address, pte, pteval);
>> +                     ret = SWAP_FAIL;
>> +                     goto out_unmap;
>> +             }
>> +     }
>> +     mmu_notifier_invalidate_page(vma->vm_mm, address);
>
> With regard to mmu notifier, this is the opposite of the right
> ordering. One mmu_notifier_invalidate_page must run _before_ the first
> check. The ptep_clear_flush_notify will then stay and there's no need
> of a further mmu_notifier_invalidate_page after the second check.

OK. but I have one question.

Can we assume mmu_notifier is only used by kvm now?
if not, we need to make new notifier.
--
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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux