Re: [PATCH v2] mm: incorporate read-only pages into transparent huge pages

From: Andrea Arcangeli
Date: Mon Jan 26 2015 - 10:25:34 EST


On Mon, Jan 26, 2015 at 04:19:06PM +0100, Andrea Arcangeli wrote:
> Overall I don't see how we could collapse in readonly vma and where
> the bug is for this case, but I may be overlooking something obvious.

I just realized what the problem was... that the "ro" is not the total
number of readonly ptes mapped by the pmd,.. because we don't count
the none ones as readonly too.

It misses a ro increase or equivalent adjustment:

if (pte_none(pteval)) {
+ ro++;
if (++none <= khugepaged_max_ptes_none)
[..]

Andrea
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/