svn commit: r368398 - head/sys/vm
Mark Johnston
markj at FreeBSD.org
Sun Dec 6 22:45:22 UTC 2020
Author: markj
Date: Sun Dec 6 22:45:22 2020
New Revision: 368398
URL: https://svnweb.freebsd.org/changeset/base/368398
Log:
uma: Use atomic load for uz_sleepers
This field is updated locklessly.
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/vm/uma_core.c
Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c Sun Dec 6 21:34:04 2020 (r368397)
+++ head/sys/vm/uma_core.c Sun Dec 6 22:45:22 2020 (r368398)
@@ -4186,7 +4186,7 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata
* a little longer for the limits to be reset.
*/
if (__predict_false(uz_flags & UMA_ZFLAG_LIMIT)) {
- if (zone->uz_sleepers > 0)
+ if (atomic_load_32(&zone->uz_sleepers) > 0)
goto zfree_item;
}
More information about the svn-src-all
mailing list