Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround a malfunction of soft-dirty bits clearing on Power9
(fix of commit c1bf1b9) Issue #479 (bdwgc). Make a page dirty twice in detect_soft_dirty_supported() clearing all the soft-dirty bits in the middle. If the 2nd write to a page is not noticeable, then fallback to mprotect-based VDB. This a workaround for a bug observed, at least, in Fedora 36 kernel on Power9 CPU. * os_dep.c [SOFT_VDB] (clear_soft_dirty_bits): New static function (move part of code from GC_soft_read_dirty). * os_dep.c [SOFT_VDB] (detect_soft_dirty_supported): Call clear_soft_dirty_bits() and retry changing *vaddr to check whether the latter is reflected in pagemap file; add comment. * os_dep.c [SOFT_VDB] (GC_soft_read_dirty): Call clear_soft_dirty_bits.
- Loading branch information