Thread (51 messages) 51 messages, 9 authors, 2011-05-25

Re: Kernel falls apart under light memory pressure (i.e. linking vmlinux)

From: Andrew Lutomirski <hidden>
Date: 2011-05-20 16:01:33
Also in: lkml

Possibly related (same subject, not in this thread)

On Fri, May 20, 2011 at 11:33 AM, Minchan Kim [off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 8bfd450..a5c01e9 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1430,7 +1430,10 @@ shrink_inactive_list(unsigned long nr_to_scan, struct zone *zone,
       /* Check if we should syncronously wait for writeback */
       if (should_reclaim_stall(nr_taken, nr_reclaimed, priority, sc)) {
+               unsigned long nr_active;
               set_reclaim_mode(priority, sc, true);
+               nr_active = clear_active_flags(&page_list, NULL);
+               count_vm_events(PGDEACTIVATE, nr_active);
               nr_reclaimed += shrink_page_list(&page_list, zone, sc);
       }

--
I'm now running that patch *without* the pgdat_balanced fix or the
need_resched check.  The VM_BUG_ON doesn't happen but I still get
incorrect OOM kills.

However, if I replace the check with:

	if (false &&should_reclaim_stall(nr_taken, nr_reclaimed, priority, sc)) {

then my system lags under bad memory pressure but recovers without
OOMs or oopses.

Is that expected?

--Andy
1.7.1

--
Kind regards,
Minchan Kim
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help