Greetings, I got the below dmesg and the first bad commit is commit 7a8010cd36273ff5f6fea5201ef9232f30cebbd9 Author: Vlastimil Babka Date: Wed Sep 11 14:22:35 2013 -0700 mm: munlock: manual pte walk in fast path instead of follow_page_mask() Currently munlock_vma_pages_range() calls follow_page_mask() to obtain each individual struct page. This entails repeated full page table translations and page table lock taken for each page separately. This patch avoids the costly follow_page_mask() where possible, by iterating over ptes within single pmd under single page table lock. The first pte is obtained by get_locked_pte() for non-THP page acquired by the initial follow_page_mask(). The rest of the on-stack pagevec for munlock is filled up using pte_walk as long as pte_present() and vm_normal_page() are sufficient to obtain the struct page. After this patch, a 14% speedup was measured for munlocking a 56GB large memory area with THP disabled. Signed-off-by: Vlastimil Babka Cc: JA?rn Engel Cc: Mel Gorman Cc: Michel Lespinasse Cc: Hugh Dickins Cc: Rik van Riel Cc: Johannes Weiner Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [ 56.020577] BUG: Bad page map in process killall5 pte:53425553 pmd:075f4067 [ 56.022578] addr:08800000 vm_flags:00100073 anon_vma:7f5f6f00 mapping: (null) index:8800 [ 56.025276] CPU: 0 PID: 101 Comm: killall5 Not tainted 3.11.0-09272-g666a584 #52 git bisect start 666a584d3a765a914642f80deef7a33fb309df5d v3.11 -- git bisect good a09e9a7a4b907f2dfa9bdb2b98a1828ab4b340b2 # 22:15 1080+ Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux git bisect good 8e73e367f7dc50f1d1bc22a63e5764bb4eea9b48 # 22:43 1080+ Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc git bisect good 64c353864e3f7ccba0ade1bd6f562f9a3bc7e68d # 00:14 1080+ Merge branch 'for-v3.12' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping git bisect good 640414171818c6293c23e74a28d1c69b2a1a7fe5 # 00:23 1080+ Merge tag 'late-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc git bisect good fa1586a7e43760f0e25e72b2e3f97ee18b2be967 # 01:08 1080+ Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux git bisect good bc4b4448dba660afc8df3790564320302d9709a1 # 01:43 1080+ mm: move pgtable related functions to right place git bisect bad 325c4ef5c4b17372c3222d896040d7848e67fbdb # 02:08 133- mm/madvise.c:madvise_hwpoison(): remove local `ret' git bisect good e76b63f80d938a1319eb5fb0ae7ea69bddfbae38 # 02:27 1340+ memblock, numa: binary search node id git bisect bad 762216ab4e175f49d17bc7ad778c57b9028184e6 # 02:51 708- mm/vmalloc: use wrapper function get_vm_area_size to caculate size of vm area git bisect good 586a32ac1d33ce7a7548a27e4087e98842c3a06f # 03:40 3517+ mm: munlock: remove unnecessary call to lru_add_drain() git bisect good 5b40998ae35cf64561868370e6c9f3d3e94b6bf7 # 04:23 3517+ mm: munlock: remove redundant get_page/put_page pair on the fast path git bisect bad 6e543d5780e36ff5ee56c44d7e2e30db3457a7ed # 04:53 148- mm: vmscan: fix do_try_to_free_pages() livelock git bisect bad 7a8010cd36273ff5f6fea5201ef9232f30cebbd9 # 05:03 69- mm: munlock: manual pte walk in fast path instead of follow_page_mask() git bisect good 5b40998ae35cf64561868370e6c9f3d3e94b6bf7 # 09:42 10000+ mm: munlock: remove redundant get_page/put_page pair on the fast path git bisect bad d5d04bb48f0eb89c14e76779bb46212494de0bec # 10:08 128- Bye, bye, WfW flag git bisect good 14f83d4c02fa126fd699570429a0bb888e12ddf7 # 16:20 10000+ Revert "mm: munlock: manual pte walk in fast path instead of follow_page_mask()" git bisect bad d8efd82eece89f8a5790b0febf17522affe9e1f1 # 16:34 45- Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Thanks, Fengguang