|
@@ -35,6 +35,7 @@
|
|
|
#include <linux/mm.h>
|
|
|
#include <linux/oom.h>
|
|
|
#include <linux/sched.h>
|
|
|
+#include <linux/swap.h>
|
|
|
#include <linux/rcupdate.h>
|
|
|
#include <linux/profile.h>
|
|
|
#include <linux/notifier.h>
|
|
@@ -74,7 +75,7 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
|
|
|
int selected_tasksize = 0;
|
|
|
short selected_oom_score_adj;
|
|
|
int array_size = ARRAY_SIZE(lowmem_adj);
|
|
|
- int other_free = global_page_state(NR_FREE_PAGES);
|
|
|
+ int other_free = global_page_state(NR_FREE_PAGES) - totalreserve_pages;
|
|
|
int other_file = global_page_state(NR_FILE_PAGES) -
|
|
|
global_page_state(NR_SHMEM);
|
|
|
|