mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00: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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=116510
@ -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 New Issue
Block a user