Re: [PATCH v2] mm: fix account pmd page to the process

From: Michal Hocko
Date: Fri Jun 17 2016 - 09:20:46 EST


On Fri 17-06-16 21:13:12, zhongjiang wrote:
> From: zhong jiang <zhongjiang@xxxxxxxxxx>
>
> huge_pmd_share accounts the number of pmds incorrectly when it races
> with a parallel pud instantiation. vma_interval_tree_foreach will
> increase the counter but then has to recheck the pud with the pte lock
> held and the back off path should drop the increment. The previous
> code would lead to an elevated pmd count which shouldn't be very
> harmful (check_mm() might complain and oom_badness() might be marginally
> confused) but this is worth fixing.

Kirill has posted a patch which is imho better [1]

[1] http://lkml.kernel.org/r/20160617122506.GC6534@xxxxxxxxxxxxxxxxxx
--
Michal Hocko
SUSE Labs