On Tue, Jan 07, 2014 at 09:37:01AM +0800, yvxiang wrote: > Hi, Johannes > > I'm a new comer to vm. And I read your commit 81c0a2bb about fair zone > allocator policy, but I don't quite understand your opinion, especially > the words that > > "the allocator may keep kswapd running while kswapd reclaim > ensures that the page allocator can keep allocating from the first zone > in > the zonelist for extended periods of time. " > > Could you or someone else explain me what does this mean in more > details? Or could you give me a example? The page allocator tries to allocate from all zones in order of preference: Normal, DMA32, DMA. If they are all at their low watermark, kswapd is woken up and it will reclaim each zone until it's back to the high watermark. But as kswapd reclaims the Normal zone, the page allocator can continue allocating from it. If that happens at roughly the same pace, the Normal zone's watermark will hover somewhere between the low and high watermark. Kswapd will not go to sleep and the page allocator will not use the other zones. The whole workload's memory will be allocated and reclaimed using only the Normal zone, which might be only a few (hundred) megabytes, while the 4G DMA32 zone is unused. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>