[PATCH OLK-6-6 v2 06/16] mm/compaction: factor out code to test if we should run compaction for target order