On Tue, Nov 24, 2015 at 03:27:43PM +0800, Aaron Lu wrote:
On 11/24/2015 12:55 PM, Joonsoo Kim wrote:
> On Tue, Nov 24, 2015 at 11:40:28AM +0800, Aaron Lu wrote:
>> BTW, I'm still learning how to do proper ftrace for this case and it may
>> take a while.
> You can do it simply with trace-cmd.
> sudo trace-cmd record -e compaction &
> run test program
> Ctrl + c
> sudo trace-cmd report
Thanks for the tip, I just recorded it like this:
trace-cmd record -e compaction ./usemem xxx
Due to the big size of trace.out(6MB after compress), I've uploaed it:
The pagetypeinfo, perf and proc-vmstat is also there.
Okay. Output proves the theory. pagetypeinfo shows that there are
too many unmovable pageblocks. isolate_freepages() should skip these
so it's not easy to meet proper pageblock until need_resched(). Hence,
updating cached pfn doesn't happen. (You can see unchanged free_pfn
with 'grep compaction_begin tracepoint-output')
But, I don't think that updating cached pfn is enough to solve your problem.
More complex change would be needed, I guess.