diff options
author | Dmitry Fink <dmitry.fink@palm.com> | 2011-07-26 00:12:19 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-26 03:57:09 (GMT) |
commit | c15bef3099c346f2124367bff46954b59e13c3ee (patch) | |
tree | ec09c0b25eae42d6693a08decde7aee02f296978 /arch/sparc/mm | |
parent | c9d8c3d0896bfa5b57531ecc41a85ffbc6d87dbe (diff) | |
download | linux-c15bef3099c346f2124367bff46954b59e13c3ee.tar.xz |
mmap: fix and tidy up overcommit page arithmetic
- shmem pages are not immediately available, but they are not
potentially available either, even if we swap them out, they will just
relocate from memory into swap, total amount of immediate and
potentially available memory is not going to be affected, so we
shouldn't count them as potentially free in the first place.
- nr_free_pages() is not an expensive operation anymore, there is no
need to split the decision making in two halves and repeat code.
Signed-off-by: Dmitry Fink <dmitry.fink@palm.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc/mm')
0 files changed, 0 insertions, 0 deletions