Re: compaction: trying to understand the code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 19, 2010 at 04:09:38PM +0900, Iram Shahzad wrote:
> >The loop should be waiting for the _other_ processes (doing direct
> >reclaims) to proceed.  When there are _lots of_ ongoing page
> >allocations/reclaims, it makes sense to wait for them to calm down a bit?
> 
> I have noticed that if I run other process, it helps the loop to exit.
> So is this (ie hanging until other process helps) intended behaviour?
> 
> Also, the other process does help the loop to exit, but again it enters
> the loop and the compaction is never finished. That is, the process
> looks like hanging. Is this intended behaviour?
> What will improve this situation?
> 
I don't know why too many pages are isolated.
Could you apply below patch for debugging and report it?

diff --git a/mm/compaction.c b/mm/compaction.c
index 94cce51..17f339f 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -215,6 +215,7 @@ static void acct_isolated(struct zone *zone, struct compact_control *cc)
 static bool too_many_isolated(struct zone *zone)
 {
 
+       int overflow = 0;
        unsigned long inactive, isolated;
 
        inactive = zone_page_state(zone, NR_INACTIVE_FILE) +
@@ -222,7 +223,13 @@ static bool too_many_isolated(struct zone *zone)
        isolated = zone_page_state(zone, NR_ISOLATED_FILE) +
                                        zone_page_state(zone, NR_ISOLATED_ANON);
 
-       return isolated > inactive;
+       if (isolated > inactive)
+               overflow = 1;
+
+       if (overflow)
+               show_mem();     
+
+       return overflow;
 }


> Thanks
> Iram
> 
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]