aboutsummaryrefslogtreecommitdiffstats
path: root/mm/prio_tree.c
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2009-02-24 15:51:52 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-25 15:21:42 -0500
commit0b0a0806b0d8635e046bf533225a25903b1cddce (patch)
tree245ac39eb1b7c6008a669ab2d68ed174d66bd7bc /mm/prio_tree.c
parentc15d8a6499d04e5d2cac07f8120f207bb275f60f (diff)
shmem: fix shared anonymous accounting
Each time I exit Firefox, /proc/meminfo's Committed_AS goes down almost 400 kB: OVERCOMMIT_NEVER would be allowing overcommits it should prohibit. Commit fc8744adc870a8d4366908221508bb113d8b72ee "Stop playing silly games with the VM_ACCOUNT flag" changed shmem_file_setup() to set the shmem file's VM_ACCOUNT flag according to VM_NORESERVE not being set in the vma flags; but did so only _after_ the shmem_acct_size(flags, size) call which is expected to pre-account a shared anonymous object. It's all clearer if we switch shmem.c over to use VM_NORESERVE throughout in place of !VM_ACCOUNT. But I very nearly sent in a patch which mistakenly removed the accounting from tmpfs files: shmem_get_inode()'s memset was good for not setting VM_ACCOUNT, but now it needs to set VM_NORESERVE. Rather than setting that by default, then perhaps clearing it again in shmem_file_setup(), let's pass it as a flag to shmem_get_inode(): that allows us to remove the #ifdef CONFIG_SHMEM from shmem_file_setup(). Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/prio_tree.c')
0 files changed, 0 insertions, 0 deletions