Re: [PATCH] mm: compaction: Abort compaction if too many pages areisolated and caller is asynchronous
From: Andrea Arcangeli
Date: Thu Jun 02 2011 - 18:04:33 EST
On Fri, Jun 03, 2011 at 05:59:13AM +0900, Minchan Kim wrote:
> Now that I look code more, it would meet VM_BUG_ON of get_page if the page is really
> freed. I think if we hold zone->lock to prevent prep_new_page racing, it would be okay.
There would be problems with split_huge_page too, we can't even use
get_page_unless_zero unless it's a lru page and we hold the lru_lock
and that's an hot lock too.
> But it's rather overkill so I will add my sign to your patch if we don't have better idea
> until tomorrow. :)
Things like compound_trans_head are made to protect against
split_huge_page like in ksm, not exactly to get to the head page when
the page is being freed, so it's a little tricky. If we could get to
the head page safe starting from a tail page it'd solve some issues
for memory-failure too, which is currently using compound_head unsafe
too, but at least that's running after a catastrophic hardware failure
so the safer the better but the little race is unlikely to ever be an
issue for memory-failure (and it's same issue for hugetlbfs and slub
order 3).
--
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/