Re: svn commit: r334824 - head/sys/vm

2018-06-08 Thread Gleb Smirnoff
On Fri, Jun 08, 2018 at 03:16:17AM +, Mateusz Guzik wrote:
M> Author: mjg
M> Date: Fri Jun  8 03:16:16 2018
M> New Revision: 334824
M> URL: https://svnweb.freebsd.org/changeset/base/334824
M> 
M> Log:
M>   uma: remove M_ZERO support for pcpu zones
M>   
M>   Nothing in the tree uses it and pcpu zones have a fundamentally different 
use
M>   case than the regular zones - they are not supposed to be allocated and 
freed
M>   all the time.
M>   
M>   This reduces pollution in the allocation fast path.

Now counter(9) is broken and r334830 doesn't yet fix the problem. This won't
happen if commit was reviewed.

-- 
Gleb Smirnoff
___
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"


svn commit: r334824 - head/sys/vm

2018-06-07 Thread Mateusz Guzik
Author: mjg
Date: Fri Jun  8 03:16:16 2018
New Revision: 334824
URL: https://svnweb.freebsd.org/changeset/base/334824

Log:
  uma: remove M_ZERO support for pcpu zones
  
  Nothing in the tree uses it and pcpu zones have a fundamentally different use
  case than the regular zones - they are not supposed to be allocated and freed
  all the time.
  
  This reduces pollution in the allocation fast path.

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==
--- head/sys/vm/uma_core.c  Fri Jun  8 02:03:51 2018(r334823)
+++ head/sys/vm/uma_core.c  Fri Jun  8 03:16:16 2018(r334824)
@@ -2256,6 +2256,8 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags
}
KASSERT(curthread->td_critnest == 0 || SCHEDULER_STOPPED(),
("uma_zalloc_arg: called with spinlock or critical section held"));
+   if (zone->uz_flags & UMA_ZONE_PCPU)
+   MPASS((flags & M_ZERO) == 0);
 
 #ifdef DEBUG_MEMGUARD
if (memguard_cmp_zone(zone)) {
@@ -3604,13 +3606,8 @@ uma_large_free(uma_slab_t slab)
 static void
 uma_zero_item(void *item, uma_zone_t zone)
 {
-   int i;
 
-   if (zone->uz_flags & UMA_ZONE_PCPU) {
-   CPU_FOREACH(i)
-   bzero(zpcpu_get_cpu(item, i), zone->uz_size);
-   } else
-   bzero(item, zone->uz_size);
+   bzero(item, zone->uz_size);
 }
 
 unsigned long
___
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"