aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_subr.c
diff options
context:
space:
mode:
authorMinChan Kim <[email protected]>2009-02-11 13:04:27 -0800
committerLinus Torvalds <[email protected]>2009-02-11 14:25:35 -0800
commit508b9f8efdad123b202b228f71f59feba51e4fb5 (patch)
tree0da0d842edb168cfb7b883a3148b147dc631c2b9 /net/lapb/lapb_subr.c
parent02ac597c9b86af49b2016aa98aee20ab59dbf0d2 (diff)
mm: fix mlocked page counter mismatch
When I tested following program, I found that the mlocked counter is strange. It cannot free some mlocked pages. It is because try_to_unmap_file() doesn't check real page mappings in vmas. That is because the goal of an address_space for a file is to find all processes into which the file's specific interval is mapped. It is related to the file's interval, not to pages. Even if the page isn't really mapped by the vma, it returns SWAP_MLOCK since the vma has VM_LOCKED, then calls try_to_mlock_page. After this the mlocked counter is increased again. COWed anon page in a file-backed vma could be a such case. This patch resolves it. -- my test program -- int main() { mlockall(MCL_CURRENT); return 0; } -- before -- root@barrios-target-linux:~# cat /proc/meminfo | egrep 'Mlo|Unev' Unevictable: 0 kB Mlocked: 0 kB -- after -- root@barrios-target-linux:~# cat /proc/meminfo | egrep 'Mlo|Unev' Unevictable: 8 kB Mlocked: 8 kB Signed-off-by: MinChan Kim <[email protected]> Acked-by: Lee Schermerhorn <[email protected]> Acked-by: KOSAKI Motohiro <[email protected]> Tested-by: Lee Schermerhorn <[email protected]> Cc: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions