Re: [PATCH v2] mm,hwpoison: return -EBUSY when page already poisoned

From: Jue Wang
Date: Fri Mar 12 2021 - 20:56:54 EST


I believe the mutex type patch has its own value in protecting
memory_failure from other inherent races, e.g., races around
split_huge_page where concurrent MCE happens to different 4k pages
under the same THP.[1] This realistically can happen given the physical
locality clustering effect of memory errors.

Thanks,
-Jue

[1] The split fails due to a page reference taken by other concurrent
calling into memory_failure on the same THP.