mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Fix a performance bug in all of the various implementations of
uma_small_alloc(): They always zeroed the page regardless of what the caller requested.
This commit is contained in:
parent
95343ec2e8
commit
40ebf3e43a
4 changed files with 4 additions and 4 deletions
|
|
@ -594,7 +594,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
|
|||
}
|
||||
|
||||
va = (void *)ALPHA_PHYS_TO_K0SEG(m->phys_addr);
|
||||
if ((m->flags & PG_ZERO) == 0)
|
||||
if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0)
|
||||
bzero(va, PAGE_SIZE);
|
||||
return (va);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
|
|||
}
|
||||
|
||||
va = (void *)PHYS_TO_DMAP(m->phys_addr);
|
||||
if ((m->flags & PG_ZERO) == 0)
|
||||
if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0)
|
||||
pagezero(va);
|
||||
return (va);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
|
|||
}
|
||||
|
||||
va = (void *)IA64_PHYS_TO_RR7(VM_PAGE_TO_PHYS(m));
|
||||
if ((m->flags & PG_ZERO) == 0)
|
||||
if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0)
|
||||
bzero(va, PAGE_SIZE);
|
||||
return (va);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
|
|||
dcache_page_inval(pa);
|
||||
}
|
||||
va = (void *)TLB_PHYS_TO_DIRECT(pa);
|
||||
if ((m->flags & PG_ZERO) == 0)
|
||||
if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0)
|
||||
bzero(va, PAGE_SIZE);
|
||||
return (va);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue