Fix the UMA reclaim worker
ClosedPublic

Authored by markj on Dec 7 2017, 6:53 PM.

Details

Summary

atomic_set_* ORs its arguments together, but the intention here was
obviously to clear the flag.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
markj created this revision.Dec 7 2017, 6:53 PM
markj added reviewers: kib, jeff, alc.Dec 7 2017, 6:53 PM
kib accepted this revision.Dec 7 2017, 7:07 PM

Plain store is enough, _rel does not add any functionality there. Or the load in the while() loop above should become _acq(), but I do not see a need.

This revision is now accepted and ready to land.Dec 7 2017, 7:07 PM
markj added a comment.Dec 7 2017, 7:09 PM
In D13412#280192, @kib wrote:

Plain store is enough, _rel does not add any functionality there. Or the load in the while() loop above should become _acq(), but I do not see a need.

Indeed, but there is no plain atomic_store_int().

kib added a comment.Dec 7 2017, 7:23 PM
In D13412#280192, @kib wrote:

Plain store is enough, _rel does not add any functionality there. Or the load in the while() loop above should become _acq(), but I do not see a need.

Indeed, but there is no plain atomic_store_int().

Plain assignment to volatile does it. Explanation was added to atomic(9) not too long time ago.

markj updated this revision to Diff 36352.Dec 7 2017, 7:27 PM
  • Use a plain store to the volatile uma_reclaim_needed.
This revision now requires review to proceed.Dec 7 2017, 7:27 PM
kib accepted this revision.Dec 7 2017, 7:31 PM
This revision is now accepted and ready to land.Dec 7 2017, 7:31 PM
jeff accepted this revision.Dec 7 2017, 7:32 PM
This revision was automatically updated to reflect the committed changes.