Repository navigation
Commit c15bef3
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>1 parent c9d8c3d commit c15bef3
2 files changed
Lines changed: 26 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
126 | 135 | | |
127 | | - | |
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
| |||
135 | 143 | | |
136 | 144 | | |
137 | 145 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | 146 | | |
154 | 147 | | |
155 | 148 | | |
156 | | - | |
| 149 | + | |
157 | 150 | | |
158 | 151 | | |
159 | | - | |
| 152 | + | |
160 | 153 | | |
161 | 154 | | |
162 | 155 | | |
163 | 156 | | |
164 | 157 | | |
165 | | - | |
166 | | - | |
| 158 | + | |
167 | 159 | | |
168 | 160 | | |
169 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1884 | 1884 | | |
1885 | 1885 | | |
1886 | 1886 | | |
1887 | | - | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
1888 | 1897 | | |
1889 | | - | |
1890 | 1898 | | |
1891 | 1899 | | |
1892 | 1900 | | |
| |||
1897 | 1905 | | |
1898 | 1906 | | |
1899 | 1907 | | |
1900 | | - | |
1901 | | - | |
1902 | | - | |
1903 | | - | |
1904 | | - | |
1905 | | - | |
1906 | | - | |
1907 | | - | |
1908 | | - | |
1909 | | - | |
1910 | | - | |
1911 | | - | |
1912 | | - | |
1913 | | - | |
1914 | | - | |
1915 | 1908 | | |
1916 | 1909 | | |
1917 | 1910 | | |
1918 | | - | |
| 1911 | + | |
1919 | 1912 | | |
1920 | 1913 | | |
1921 | | - | |
| 1914 | + | |
1922 | 1915 | | |
1923 | 1916 | | |
1924 | 1917 | | |
1925 | 1918 | | |
1926 | 1919 | | |
1927 | | - | |
1928 | | - | |
| 1920 | + | |
1929 | 1921 | | |
1930 | 1922 | | |
1931 | 1923 | | |
| |||
0 commit comments