vm_page_sunbusy() and vm_page_busy_release() drop a shared busy that
other threads still hold with a relaxed atomic_fcmpset_int(). Only the
last sharer's update is a release. But a sharer can modify the page:
swp_pager_async_iodone() clears its dirty bits after a pageout, and
ZFS's update_pages() copies newly written data into it, each under a
shared busy. The next thread to busy the page exclusively synchronizes
with the last sharer's release, so on weakly ordered CPUs it need not
see the changes of a sharer that was not the last, and those changes
can even take effect after its own. For example, if a reader still
shares the busy when iodone drops it, a thread that then busies the
page exclusively and dirties it, without the object lock, can have its
dirty bits overwritten by iodone's earlier store. The page daemon can
then free the page as clean, losing the new data.
Found by: Claude Code (Opus 5.5)