mm/compaction: change the timing to check to drop the spinlock