mm/migrate_pages: batch flushing TLB
The TLB flushing will cost quite some CPU cycles during the page
migration in some situations. For example, when migrate a page of a
process with multiple active threads that run on multiple CPUs. After
batching the _unmap and _move in migrate_pages(), the TLB flushing can
be batched easily with the existing TLB flush batching mechanism.
This patch implements that.
We use the following test case to test the patch.
On a 2-socket Intel server,
- Run pmbench memory accessing benchmark
- Run `migratepages` to migrate pages of pmbench between node 0 and
node 1 back and forth.
With the patch, the TLB flushing IPI reduces xx% during the test and
the number of pages migrated successfully increases xx%.
Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
2 files changed