On 10/22/19 9:41 AM, Stefan Priebe - Profihost AG wrote: >> Hi, could you try the patch below? I suspect you're hitting a corner >> case where compaction_suitable() returns COMPACT_SKIPPED for the >> ZONE_DMA, triggering reclaim even if other zones have plenty of free >> memory. And should_continue_reclaim() then returns true until twice the >> requested page size is reclaimed (compact_gap()). That means 4MB >> reclaimed for each THP allocation attempt, which roughly matches the >> trace data you preovided previously. >> >> The amplification to 4MB should be removed in patches merged for 5.4, so >> it would be only 32 pages reclaimed per THP allocation. The patch below >> tries to remove this corner case completely, and it should be more >> visible on your 5.2.x, so please apply it there. >> > is there any reason to not apply that one on top of 4.19? > > Greets, > Stefan > It should work, cherrypicks fine without conflict here.