diff options
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c index 5aee9ec8b8c6..fb55c14556e6 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2665,7 +2665,8 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, } swap_free(entry); - if (vm_swap_full() || (vma->vm_flags & VM_LOCKED) || PageMlocked(page)) + if ((PageSwapCache(page) && vm_swap_full(page_swap_info(page))) || + (vma->vm_flags & VM_LOCKED) || PageMlocked(page)) try_to_free_swap(page); unlock_page(page); if (page != swapcache) { @@ -2880,7 +2881,7 @@ void do_set_pte(struct vm_area_struct *vma, unsigned long address, } static unsigned long fault_around_bytes __read_mostly = - rounddown_pow_of_two(65536); + rounddown_pow_of_two(4096); #ifdef CONFIG_DEBUG_FS static int fault_around_bytes_get(void *data, u64 *val) |