The patch titled Subject: mm: do not inc NR_PAGETABLE if ptlock_init failed has been added to the -mm tree. Its filename is mm-do-not-inc-nr_pagetable-if-ptlock_init-failed.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-do-not-inc-nr_pagetable-if-ptlock_init-failed.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-do-not-inc-nr_pagetable-if-ptlock_init-failed.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx> Subject: mm: do not inc NR_PAGETABLE if ptlock_init failed If ALLOC_SPLIT_PTLOCKS is defined, ptlock_init may fail, in which case we shouldn't increment NR_PAGETABLE. Since small allocations, such as ptlock, normally do not fail (currently they can fail if kmemcg is used though), this patch does not really fix anything and should be considered as a code cleanup. Signed-off-by: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx> Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Acked-by: Michal Hocko <mhocko@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/mm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN include/linux/mm.h~mm-do-not-inc-nr_pagetable-if-ptlock_init-failed include/linux/mm.h --- a/include/linux/mm.h~mm-do-not-inc-nr_pagetable-if-ptlock_init-failed +++ a/include/linux/mm.h @@ -1606,8 +1606,10 @@ static inline void pgtable_init(void) static inline bool pgtable_page_ctor(struct page *page) { + if (!ptlock_init(page)) + return false; inc_zone_page_state(page, NR_PAGETABLE); - return ptlock_init(page); + return true; } static inline void pgtable_page_dtor(struct page *page) _ Patches currently in -mm which might be from vdavydov@xxxxxxxxxxxxx are slab_common-rename-cache-create-destroy-helpers.patch slab_common-clear-pointers-to-per-memcg-caches-on-destroy.patch slab_common-do-not-warn-that-cache-is-busy-on-destroy-more-than-once.patch memcg-simplify-charging-kmem-pages.patch memcg-unify-slab-and-other-kmem-pages-charging.patch memcg-simplify-and-inline-__mem_cgroup_from_kmem.patch mm-do-not-inc-nr_pagetable-if-ptlock_init-failed.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html