mm/compaction: introduce a helper compact_zone_counters_init()

This is the follow-up of the
commit "mm/compaction.c: clear total_{migrate,free}_scanned before scanning a new zone".

These counters are used to track activities during compacting a zone, and
they will be set to zero before compacting a new zone in all compact
paths.  Move all these common settings to a single site.

Link: http://lkml.kernel.org/r/1563869295-25748-1-git-send-email-laoar.shao@gmail.com
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Yafang Shao <shaoyafang@didiglobal.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 file changed