compaction.c (ef4984384172e93cc95e0e8cd102536d67e8a787) compaction.c (06dac2f467fe9269a433aa5056dd2ee1d20475e9)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/mm/compaction.c
4 *
5 * Memory compaction for the reduction of external fragmentation. Note that
6 * this heavily depends upon page migration to do all the real heavy
7 * lifting
8 *

--- 2515 unchanged lines hidden (view full) ---

2524
2525 /*
2526 * Make sure we hide capture control first before we read the captured
2527 * page pointer, otherwise an interrupt could free and capture a page
2528 * and we would leak it.
2529 */
2530 WRITE_ONCE(current->capture_control, NULL);
2531 *capture = READ_ONCE(capc.page);
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/mm/compaction.c
4 *
5 * Memory compaction for the reduction of external fragmentation. Note that
6 * this heavily depends upon page migration to do all the real heavy
7 * lifting
8 *

--- 2515 unchanged lines hidden (view full) ---

2524
2525 /*
2526 * Make sure we hide capture control first before we read the captured
2527 * page pointer, otherwise an interrupt could free and capture a page
2528 * and we would leak it.
2529 */
2530 WRITE_ONCE(current->capture_control, NULL);
2531 *capture = READ_ONCE(capc.page);
2532 /*
2533 * Technically, it is also possible that compaction is skipped but
2534 * the page is still captured out of luck(IRQ came and freed the page).
2535 * Returning COMPACT_SUCCESS in such cases helps in properly accounting
2536 * the COMPACT[STALL|FAIL] when compaction is skipped.
2537 */
2538 if (*capture)
2539 ret = COMPACT_SUCCESS;
2532
2533 return ret;
2534}
2535
2536int sysctl_extfrag_threshold = 500;
2537
2538/**
2539 * try_to_compact_pages - Direct compact to satisfy a high-order allocation

--- 468 unchanged lines hidden ---
2540
2541 return ret;
2542}
2543
2544int sysctl_extfrag_threshold = 500;
2545
2546/**
2547 * try_to_compact_pages - Direct compact to satisfy a high-order allocation

--- 468 unchanged lines hidden ---