Thread (54 messages) 54 messages, 11 authors, 2011-05-20

Re: [PATCH 4/4] mm: vmscan: If kswapd has been running too long, allow it to sleep

From: KOSAKI Motohiro <hidden>
Date: 2011-05-18 01:05:50
Also in: linux-fsdevel, linux-mm, lkml

quoted hunk ↗ jump to hunk
It would be better to put cond_resched after balance_pgdat?
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 292582c..61c45d0 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2753,6 +2753,7 @@ static int kswapd(void *p)
                 if (!ret) {
                         trace_mm_vmscan_kswapd_wake(pgdat->node_id, order);
                         order = balance_pgdat(pgdat, order,&classzone_idx);
+                       cond_resched();
                 }
         }
         return 0;
quoted
quoted
quoted
While it appears unlikely, there are bad conditions which can result
in cond_resched() being avoided.
Every reclaim priority decreasing or every shrink_zone() calling makes more
fine grained preemption. I think.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help