linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Possible deadloop in direct reclaim?
@ 2013-07-23  4:58 Lisa Du
  2013-07-23 20:28 ` Christoph Lameter
                   ` (2 more replies)
  0 siblings, 3 replies; 36+ messages in thread
From: Lisa Du @ 2013-07-23  4:58 UTC (permalink / raw)
  To: linux-mm@kvack.org

[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]

Dear Sir:
Currently I met a possible deadloop in direct reclaim. After run plenty of the application, system run into a status that system memory is very fragmentized. Like only order-0 and order-1 memory left.
Then one process required a order-2 buffer but it enter an endless direct reclaim. From my trace log, I can see this loop already over 200,000 times. Kswapd was first wake up and then go back to sleep as it cannot rebalance this order's memory. But zone->all_unreclaimable remains 1.
Though direct_reclaim every time returns no pages, but as zone->all_unreclaimable = 1, so it loop again and again. Even when zone->pages_scanned also becomes very large. It will block the process for long time, until some watchdog thread detect this and kill this process. Though it's in __alloc_pages_slowpath, but it's too slow right? Maybe cost over 50 seconds or even more.
I think it's not as expected right?  Can we also add below check in the function all_unreclaimable() to terminate this loop?

@@ -2355,6 +2355,8 @@ static bool all_unreclaimable(struct zonelist *zonelist,
                        continue;
                if (!zone->all_unreclaimable)
                        return false;
+               if (sc->nr_reclaimed == 0 && !zone_reclaimable(zone))
+                       return true;
        }
         BTW: I'm using kernel3.4, I also try to search in the kernel3.9, didn't see a possible fix for such issue. Or is anyone also met such issue before? Any comment will be welcomed, looking forward to your reply!

Thanks!

Best Regards
Lisa Du


[-- Attachment #2: Type: text/html, Size: 8244 bytes --]

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2013-08-04 23:49 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-23  4:58 Possible deadloop in direct reclaim? Lisa Du
2013-07-23 20:28 ` Christoph Lameter
2013-07-24  1:21   ` Lisa Du
2013-07-25 18:19     ` KOSAKI Motohiro
2013-07-26  1:11       ` Lisa Du
2013-07-29 16:44         ` KOSAKI Motohiro
2013-07-30  1:27           ` Lisa Du
2013-08-01  2:24           ` Lisa Du
2013-08-01  2:45             ` KOSAKI Motohiro
2013-08-01  4:21               ` Bob Liu
2013-08-03 21:22                 ` KOSAKI Motohiro
2013-08-04 23:50                   ` Minchan Kim
2013-08-01  5:19               ` Lisa Du
2013-08-01  8:56                 ` Russell King - ARM Linux
2013-08-02  1:18                   ` Lisa Du
2013-07-29  1:32       ` Lisa Du
2013-07-24  1:18 ` Bob Liu
2013-07-24  1:31   ` Lisa Du
2013-07-24  2:23   ` Lisa Du
2013-07-24  3:38     ` Bob Liu
2013-07-24  5:58       ` Lisa Du
2013-07-25 18:14   ` KOSAKI Motohiro
2013-07-26  1:22     ` Bob Liu
2013-07-29 16:46       ` KOSAKI Motohiro
2013-08-01  5:43 ` Minchan Kim
2013-08-01  6:13   ` Lisa Du
2013-08-01  7:33     ` Minchan Kim
2013-08-01  8:20       ` Lisa Du
2013-08-01  8:42         ` Minchan Kim
2013-08-02  1:03           ` Lisa Du
2013-08-02  2:26           ` Minchan Kim
2013-08-02  2:33             ` Minchan Kim
2013-08-02  3:17             ` Lisa Du
2013-08-02  3:53               ` Minchan Kim
2013-08-02  8:08                 ` Lisa Du
2013-08-04 23:47                   ` Minchan Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).