Author: jeff
Date: Sat Feb  1 23:46:30 2020
New Revision: 357392
URL: https://svnweb.freebsd.org/changeset/base/357392

Log:
  Fix a bug in r356776 where the page allocator was not properly restored to
  the percpu page allocator after it had been temporarily overridden by
  startup_alloc.
  
  Reported by:  pho, bdragon

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c      Sat Feb  1 23:16:30 2020        (r357391)
+++ head/sys/vm/uma_core.c      Sat Feb  1 23:46:30 2020        (r357392)
@@ -2101,7 +2101,9 @@ zone_kva_available(uma_zone_t zone, void *unused)
        if ((zone->uz_flags & UMA_ZFLAG_CACHE) != 0)
                return;
        KEG_GET(zone, keg);
-       if (keg->uk_allocf == startup_alloc)
+       if (keg->uk_flags & UMA_ZONE_PCPU)
+               keg->uk_allocf = pcpu_page_alloc;
+       else if (keg->uk_allocf == startup_alloc)
                keg->uk_allocf = page_alloc;
 }
 
_______________________________________________
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