Skip to contentSkip to conversation

mm-madvise-add-madv_willneed-to-process_madvise.patch removed from -mm tree

merged [email protected] 1 participant 1 message Sep 3, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/madvise: add MADV_WILLNEED to process_madvise()
has been removed from the -mm tree. Its filename was
mm-madvise-add-madv_willneed-to-process_madvise.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: zhangkui <[email protected]>
Subject: mm/madvise: add MADV_WILLNEED to process_madvise()

There is a usecase in Android that an app process's memory is swapped out by process_madvise() with MADV_PAGEOUT, such as the memory is swapped to zram or a backing device. When the process is scheduled to running, like switch to foreground, multiple page faults may cause the app dropped frames.

To reduce the problem, System Management Software can read-ahead memory of the process immediately when the app switches to forground. Calling process_madvise() with MADV_WILLNEED can meet this need.

---

 mm/madvise.c |    1 +
 1 file changed, 1 insertion(+)
mm/madvise.c renamed from mm/madvise.c~mm-madvise-add-madv_willneed-to-process_madvise +1 -0
@@ -1048,6 +1048,7 @@ process_madvise_behavior_valid(int behav
 	switch (behavior) {
 	case MADV_COLD:
 	case MADV_PAGEOUT:
+	case MADV_WILLNEED:
 		return true;
 	default:
 		return false;

_

Patches currently in -mm which might be from [email protected] are