Linux: Memory Compaction | Linux Today

Linux: Memory Compaction

Written By
Web Webster
Web Webster
Apr 5, 2010

“Mel Gorman posted the seventh version of his Memory Compaction
patches asking, “are there any further obstacles to merging?” The
patches, first posted in May of 2007, provide a mechanism for
moving GFP_MOVABLE pages into a smaller number of pageblocks,
reducing externally fragmented memory. Mel explains that
‘compaction’ is another method of defragmenting memory, “for
example, lumpy reclaim is a form of defragmentation as was slub
‘defragmentation’ (really a form of targeted reclaim). Hence, this
is called ‘compaction’ to distinguish it from other forms of
defragmentation.”

“The core compaction patch explains that memory is compacted in
a zone by relocating movable pages towards the end of the zone:

“”A single compaction run involves a migration scanner and a
free scanner. Both scanners operate on pageblock-sized areas in the
zone. The migration scanner starts at the bottom of the zone and
searches for all movable pages within each area, isolating them
onto a private list called migratelist. The free scanner starts at
the top of the zone and searches for suitable areas and consumes
the free pages within making them available for the migration
scanner. The pages isolated for migration are then migrated to the
newly isolated free pages.”

Complete
Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.