Commit 49963ed
mm, thp: clear PG_mlocked when last mapping gone
I missed clear_page_mlock() in page_remove_anon_compound_rmap().
It usually shouldn't cause any problems since we munlock pages
explicitly, but in conjunction with missed munlock in __oom_reap_vmas()
it causes problems:
http://lkml.kernel.org/r/[email protected]
Let's put it in place an mirror behaviour for small pages.
NOTE: I'm not entirely sure why we ever need clear_page_mlock() in
page_remove_rmap() codepath. It looks redundant to me as we munlock
pages anyway. But this is out of scope of the patch.
The patch can be folded into
"thp: allow mlocked THP again"
Signed-off-by: Kirill A. Shutemov <[email protected]>
Reported-by: Sasha Levin <[email protected]>
Tested-by: Sasha Levin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent 0c2e8be commit 49963ed
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1282 | 1282 | | |
1283 | 1283 | | |
1284 | 1284 | | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
1285 | 1288 | | |
1286 | 1289 | | |
1287 | 1290 | | |
| |||
0 commit comments