diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-06 02:10:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-06 02:10:54 -0500 |
commit | 2e3078af2c67730c479f1d183af5b367f5d95337 (patch) | |
tree | b7881c6c9c479aadac345df7e18e3c0e10f0811e /mm/vmscan.c | |
parent | ea5c58e70c3a148ada0d3061a8f529589bb766ba (diff) | |
parent | b3b0d09c7a2330759ac293f5269bd932439ea0ff (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge patch-bomb from Andrew Morton:
- inotify tweaks
- some ocfs2 updates (many more are awaiting review)
- various misc bits
- kernel/watchdog.c updates
- Some of mm. I have a huge number of MM patches this time and quite a
lot of it is quite difficult and much will be held over to next time.
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (162 commits)
selftests: vm: add tests for lock on fault
mm: mlock: add mlock flags to enable VM_LOCKONFAULT usage
mm: introduce VM_LOCKONFAULT
mm: mlock: add new mlock system call
mm: mlock: refactor mlock, munlock, and munlockall code
kasan: always taint kernel on report
mm, slub, kasan: enable user tracking by default with KASAN=y
kasan: use IS_ALIGNED in memory_is_poisoned_8()
kasan: Fix a type conversion error
lib: test_kasan: add some testcases
kasan: update reference to kasan prototype repo
kasan: move KASAN_SANITIZE in arch/x86/boot/Makefile
kasan: various fixes in documentation
kasan: update log messages
kasan: accurately determine the type of the bad access
kasan: update reported bug types for kernel memory accesses
kasan: update reported bug types for not user nor kernel memory accesses
mm/kasan: prevent deadlock in kasan reporting
mm/kasan: don't use kasan shadow pointer in generic functions
mm/kasan: MODULE_VADDR is not available on all archs
...
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index e7057af54b6e..55721b619aee 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -194,7 +194,7 @@ static bool sane_reclaim(struct scan_control *sc) | |||
194 | 194 | ||
195 | static unsigned long zone_reclaimable_pages(struct zone *zone) | 195 | static unsigned long zone_reclaimable_pages(struct zone *zone) |
196 | { | 196 | { |
197 | int nr; | 197 | unsigned long nr; |
198 | 198 | ||
199 | nr = zone_page_state(zone, NR_ACTIVE_FILE) + | 199 | nr = zone_page_state(zone, NR_ACTIVE_FILE) + |
200 | zone_page_state(zone, NR_INACTIVE_FILE); | 200 | zone_page_state(zone, NR_INACTIVE_FILE); |
@@ -1859,17 +1859,14 @@ static void shrink_active_list(unsigned long nr_to_scan, | |||
1859 | } | 1859 | } |
1860 | 1860 | ||
1861 | #ifdef CONFIG_SWAP | 1861 | #ifdef CONFIG_SWAP |
1862 | static int inactive_anon_is_low_global(struct zone *zone) | 1862 | static bool inactive_anon_is_low_global(struct zone *zone) |
1863 | { | 1863 | { |
1864 | unsigned long active, inactive; | 1864 | unsigned long active, inactive; |
1865 | 1865 | ||
1866 | active = zone_page_state(zone, NR_ACTIVE_ANON); | 1866 | active = zone_page_state(zone, NR_ACTIVE_ANON); |
1867 | inactive = zone_page_state(zone, NR_INACTIVE_ANON); | 1867 | inactive = zone_page_state(zone, NR_INACTIVE_ANON); |
1868 | 1868 | ||
1869 | if (inactive * zone->inactive_ratio < active) | 1869 | return inactive * zone->inactive_ratio < active; |
1870 | return 1; | ||
1871 | |||
1872 | return 0; | ||
1873 | } | 1870 | } |
1874 | 1871 | ||
1875 | /** | 1872 | /** |
@@ -1879,14 +1876,14 @@ static int inactive_anon_is_low_global(struct zone *zone) | |||
1879 | * Returns true if the zone does not have enough inactive anon pages, | 1876 | * Returns true if the zone does not have enough inactive anon pages, |
1880 | * meaning some active anon pages need to be deactivated. | 1877 | * meaning some active anon pages need to be deactivated. |
1881 | */ | 1878 | */ |
1882 | static int inactive_anon_is_low(struct lruvec *lruvec) | 1879 | static bool inactive_anon_is_low(struct lruvec *lruvec) |
1883 | { | 1880 | { |
1884 | /* | 1881 | /* |
1885 | * If we don't have swap space, anonymous page deactivation | 1882 | * If we don't have swap space, anonymous page deactivation |
1886 | * is pointless. | 1883 | * is pointless. |
1887 | */ | 1884 | */ |
1888 | if (!total_swap_pages) | 1885 | if (!total_swap_pages) |
1889 | return 0; | 1886 | return false; |
1890 | 1887 | ||
1891 | if (!mem_cgroup_disabled()) | 1888 | if (!mem_cgroup_disabled()) |
1892 | return mem_cgroup_inactive_anon_is_low(lruvec); | 1889 | return mem_cgroup_inactive_anon_is_low(lruvec); |
@@ -1894,9 +1891,9 @@ static int inactive_anon_is_low(struct lruvec *lruvec) | |||
1894 | return inactive_anon_is_low_global(lruvec_zone(lruvec)); | 1891 | return inactive_anon_is_low_global(lruvec_zone(lruvec)); |
1895 | } | 1892 | } |
1896 | #else | 1893 | #else |
1897 | static inline int inactive_anon_is_low(struct lruvec *lruvec) | 1894 | static inline bool inactive_anon_is_low(struct lruvec *lruvec) |
1898 | { | 1895 | { |
1899 | return 0; | 1896 | return false; |
1900 | } | 1897 | } |
1901 | #endif | 1898 | #endif |
1902 | 1899 | ||
@@ -1914,7 +1911,7 @@ static inline int inactive_anon_is_low(struct lruvec *lruvec) | |||
1914 | * This uses a different ratio than the anonymous pages, because | 1911 | * This uses a different ratio than the anonymous pages, because |
1915 | * the page cache uses a use-once replacement algorithm. | 1912 | * the page cache uses a use-once replacement algorithm. |
1916 | */ | 1913 | */ |
1917 | static int inactive_file_is_low(struct lruvec *lruvec) | 1914 | static bool inactive_file_is_low(struct lruvec *lruvec) |
1918 | { | 1915 | { |
1919 | unsigned long inactive; | 1916 | unsigned long inactive; |
1920 | unsigned long active; | 1917 | unsigned long active; |
@@ -1925,7 +1922,7 @@ static int inactive_file_is_low(struct lruvec *lruvec) | |||
1925 | return active > inactive; | 1922 | return active > inactive; |
1926 | } | 1923 | } |
1927 | 1924 | ||
1928 | static int inactive_list_is_low(struct lruvec *lruvec, enum lru_list lru) | 1925 | static bool inactive_list_is_low(struct lruvec *lruvec, enum lru_list lru) |
1929 | { | 1926 | { |
1930 | if (is_file_lru(lru)) | 1927 | if (is_file_lru(lru)) |
1931 | return inactive_file_is_low(lruvec); | 1928 | return inactive_file_is_low(lruvec); |
@@ -3696,10 +3693,10 @@ static inline unsigned long zone_unmapped_file_pages(struct zone *zone) | |||
3696 | } | 3693 | } |
3697 | 3694 | ||
3698 | /* Work out how many page cache pages we can reclaim in this reclaim_mode */ | 3695 | /* Work out how many page cache pages we can reclaim in this reclaim_mode */ |
3699 | static long zone_pagecache_reclaimable(struct zone *zone) | 3696 | static unsigned long zone_pagecache_reclaimable(struct zone *zone) |
3700 | { | 3697 | { |
3701 | long nr_pagecache_reclaimable; | 3698 | unsigned long nr_pagecache_reclaimable; |
3702 | long delta = 0; | 3699 | unsigned long delta = 0; |
3703 | 3700 | ||
3704 | /* | 3701 | /* |
3705 | * If RECLAIM_UNMAP is set, then all file pages are considered | 3702 | * If RECLAIM_UNMAP is set, then all file pages are considered |