<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [ILK/HSW]igt/gem_tiled_swapping randomly causes OOM killer"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=72742#c47">Comment # 47</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [ILK/HSW]igt/gem_tiled_swapping randomly causes OOM killer"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=72742">bug 72742</a>
              from <span class="vcard"><a class="email" href="mailto:chris@chris-wilson.co.uk" title="Chris Wilson <chris@chris-wilson.co.uk>"> <span class="fn">Chris Wilson</span></a>
</span></b>
        <pre>Something to try then:

diff --git a/mm/vmscan.c b/mm/vmscan.c
index a9c74b409681..3702d3aa6898 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -900,8 +900,8 @@ static unsigned long shrink_page_list(struct list_head
*page_list,
                                goto keep_locked;

                        /* Case 2 above */
-                       } else if (global_reclaim(sc) ||
-                           !PageReclaim(page) || !(sc->gfp_mask & __GFP_IO)) {
+                       } else if ((global_reclaim(sc) && !PageReclaim(page))
||
+                                  !(sc->gfp_mask & __GFP_IO)) {
                                /*
                                 * This is slightly racy - end_page_writeback()
                                 * might have just cleared PageReclaim, then</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>