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;
        }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to