Revert "mm: don't try to NUMA-migrate COW pages that have other uses"

This reverts commit 80d47f5de5e311cbc0d01ebb6ee684e8f4c196c6.

- if the other mappings are paged out and they're not in use, they're
  not interfering with NUMA balancing convergence. The only problem is
  when there's more than one mapping in use, in such case it may be
  impossible to converge into local memory, because local memory of
  one task would still be remote memory for another task.

- if the page has additional pins that cannot be migrated, page
  migration will sort it out later. All short term pins will hopefully
  be gone by then. If this is meant to check for long term pins only,
  then it should have checked the pincount, not the page count.

- if the page is in swapcache possibly with mapcount == 1 and
  swapcount = 0 (PageAnonExclusive == true in upstream terms), there's
  no reason to break NUMA balancing.

  - On a side note the upstream PageAnonExclusive is also implementing
    the equation "page_mapcount+page_swapcount == 1".  The only
    difference is in implementation terms because it provides the
    result lockless atomically.

  - PageAnonExclusive (if set) works safe precisely because it ignores
    the page_count (see the exact math it implements in the previous
    paragraph). Problem is PageAnonExclusive disappears and delivers
    false negatives after fork() runs and then it's back to square one
    hitting on the page_count and doing pin-breaking and unnecessary
    extra cows.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
1 file changed