Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103221469
D16190.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D16190.diff
View Options
Index: head/sys/kern/subr_counter.c
===================================================================
--- head/sys/kern/subr_counter.c
+++ head/sys/kern/subr_counter.c
@@ -43,15 +43,6 @@
#define IN_SUBR_COUNTER_C
#include <sys/counter.h>
-static void
-counter_u64_zero_sync(counter_u64_t c)
-{
- int cpu;
-
- CPU_FOREACH(cpu)
- *(uint64_t*)zpcpu_get_cpu(c, cpu) = 0;
-}
-
void
counter_u64_zero(counter_u64_t c)
{
@@ -69,13 +60,8 @@
counter_u64_t
counter_u64_alloc(int flags)
{
- counter_u64_t r;
- r = uma_zalloc_pcpu(pcpu_zone_64, flags);
- if (r != NULL)
- counter_u64_zero_sync(r);
-
- return (r);
+ return (uma_zalloc_pcpu(pcpu_zone_64, flags | M_ZERO));
}
void
Index: head/sys/vm/uma_core.c
===================================================================
--- head/sys/vm/uma_core.c
+++ head/sys/vm/uma_core.c
@@ -1186,13 +1186,12 @@
struct pcpu *pc;
#endif
- TAILQ_INIT(&alloctail);
- MPASS(bytes == (mp_maxid+1)*PAGE_SIZE);
- *pflag = UMA_SLAB_KERNEL;
+ MPASS(bytes == (mp_maxid + 1) * PAGE_SIZE);
+ TAILQ_INIT(&alloctail);
flags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED | VM_ALLOC_NOOBJ |
- ((wait & M_WAITOK) != 0 ? VM_ALLOC_WAITOK :
- VM_ALLOC_NOWAIT);
+ malloc2vm_flags(wait);
+ *pflag = UMA_SLAB_KERNEL;
for (cpu = 0; cpu <= mp_maxid; cpu++) {
if (CPU_ABSENT(cpu)) {
p = vm_page_alloc(NULL, 0, flags);
@@ -2328,10 +2327,10 @@
MPASS(zone->uz_flags & UMA_ZONE_PCPU);
#endif
- item = uma_zalloc_arg(zone, udata, flags &~ M_ZERO);
+ item = uma_zalloc_arg(zone, udata, flags & ~M_ZERO);
if (item != NULL && (flags & M_ZERO)) {
#ifdef SMP
- CPU_FOREACH(i)
+ for (i = 0; i <= mp_maxid; i++)
bzero(zpcpu_get_cpu(item, i), zone->uz_size);
#else
bzero(item, zone->uz_size);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 9:11 AM (10 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14794331
Default Alt Text
D16190.diff (1 KB)
Attached To
Mode
D16190: Fix early counter initialization.
Attached
Detach File
Event Timeline
Log In to Comment