lkml.org 
[lkml]   [2009]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC][PATCH v3 1/6] mm: Don't unmap gup()ed page
    On Tue, Apr 14, 2009 at 03:16:52PM +0900, KOSAKI Motohiro wrote:
    > + if (PageSwapCache(page) &&
    > + page_count(page) != page_mapcount(page) + 2) {
    > + ret = SWAP_FAIL;
    > + goto out_unmap;
    > + }
    > +

    Besides the race pointed out by Nick, this also would break KVM
    swapping with mmu notifier. mmu_notifier_invalidate_page must be
    invoked before reading page_count for this to work. However the
    invalidate has to be moved below the
    mlock/ptep_clear_flush_young_notify, no point to get rid of sptes if
    any of the spte or the pte is still young.


    \
     
     \ /
      Last update: 2009-04-14 16:43    [W:0.022 / U:0.480 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site