[Bug 88026] [i855GM, 3.18] X getting stuck in congestion_wait for shrinker

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jan 5 03:05:18 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=88026

--- Comment #2 from Chris Wilson <chris at chris-wilson.co.uk> ---
Fwiw:

shrink_inactive_list():
/*
 * If kswapd scans pages marked marked for immediate
 * reclaim and under writeback (nr_immediate), it implies
 * that pages are cycling through the LRU faster than
 * they are written so also forcibly stall.
 */
 if (nr_immediate && current_may_throttle())
   congestion_wait(BLK_RW_ASYNC, HZ/10);

nr_immediate is set in shrink_page_list():
if (PageWriteback(page)) {
  if (current_is_kswapd() &&
      PageReclaim(page) &&
      test_bit(ZONE_WRITEBACK, &zone->flags)) {
      nr_immediate++;
      goto keep_locked;
   }
}

which is obviously not true for Xorg.


There is one other call to congestion_wait() at the start of
shrink_inactive_list() (might be worth using gdb to confirm which callsite is
the blocker):

while (unlikely(too_many_isolated(zone, file, sc)))
   congestion_wait(BLK_RW_ASYNC, HZ/10);

too_many_isolated() is basically NR_ISOLATED_ANON > NR_INACTIVE_ANON and if
there is actually no backingdev activity then congestion_wait() will not make
any forward progress and it will just loop.

Maybe (though it seems to contradict the intentions of all the comments):

diff --git a/mm/vmscan.c b/mm/vmscan.c
index bd9a72bc4a1b..79a4e9379381 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1488,11 +1488,14 @@ shrink_inactive_list(unsigned long nr_to_scan, struct
lruvec *lruvec,
        struct zone_reclaim_stat *reclaim_stat = &lruvec->reclaim_stat;

        while (unlikely(too_many_isolated(zone, file, sc))) {
-               congestion_wait(BLK_RW_ASYNC, HZ/10);
+               long rem = congestion_wait(BLK_RW_ASYNC, HZ/10);

                /* We are about to die and free our memory. Return now. */
                if (fatal_signal_pending(current))
                        return SWAP_CLUSTER_MAX;
+
+               if (rem == 0)
+                       break;
        }

        lru_add_drain();

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20150105/74af2203/attachment.html>


More information about the intel-gfx-bugs mailing list