Re: compaction: trying to understand the code

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

 



On Tue, Aug 17, 2010 at 08:08:54PM +0900, Iram Shahzad wrote:
> Hi
>
> I am trying to understand the following code in isolate_migratepages
> function. I have a question regarding this.
>
> ---
> while (unlikely(too_many_isolated(zone))) {
>  congestion_wait(BLK_RW_ASYNC, HZ/10);
>
>  if (fatal_signal_pending(current))
>   return 0;
> }
>
> ---
>
> I have seen that in some cases this while loop never exits
> because too_many_isolated keeps returning true for ever.
> And hence the process hangs. Is this intended behaviour?

No. Under what circumstances does it get stuck forever. It's similar
logic to what's in page reclaim except there parallel processes such as
kswapd or direct reclaimers would eventually release isolated pages.

> What is it that is supposed to change the "too_many_isolated" situation?

Parallel reclaimers or compaction processes releasing the pages they
have isolated from the LRU.

> In other words, what is it that is supposed to increase the "inactive"
> or decrease the "isolated" so that isolated > inactive becomes false?
>

See places that update the NR_ISOLATED_ANON and NR_ISOLATED_FILE
counters.

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

--
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]