[PATCH]mm:Correctly update number of rotated pages on active list.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch corrects the number of pages which are rotated on active list.
The counter for rotated pages effects the number of pages
to be scanned on active pages list in  low memory situations.

Signed-off-by: Pradeep Goswami <pradeep.goswami@xxxxxxxxxxxxx>
Cc: Rebecca Schultz Zavin <rebecca@xxxxxxxxxxx>
Cc: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---
--- a/mm/vmscan.c       2015-11-18 20:55:38.208838142 +0800
+++ b/mm/vmscan.c       2015-11-19 14:37:31.189838998 +0800
@@ -1806,7 +1806,6 @@ static void shrink_active_list(unsigned
 
                if (page_referenced(page, 0, sc->target_mem_cgroup,
                                    &vm_flags)) {
-                       nr_rotated += hpage_nr_pages(page);
                        /*  
                         * Identify referenced, file-backed active pages and 
                         * give them one more trip around the active list. So
@@ -1818,6 +1817,7 @@ static void shrink_active_list(unsigned
                         */  
                        if ((vm_flags & VM_EXEC) && page_is_file_cache(page)) {
                                list_add(&page->lru, &l_active);
+                               nr_rotated += hpage_nr_pages(page);
                                continue;
                        }   
                }   

Thanks,
Pradeep.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]