Wrap the declaration and assignment of "stripe" with #ifdef NUMA declarations
as not all targets are NUMA aware. Found with gcc. Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D16113
This commit is contained in:
parent
2da1967762
commit
a03af34228
@ -2860,7 +2860,9 @@ zone_import(uma_zone_t zone, void **bucket, int max, int domain, int flags)
|
|||||||
{
|
{
|
||||||
uma_slab_t slab;
|
uma_slab_t slab;
|
||||||
uma_keg_t keg;
|
uma_keg_t keg;
|
||||||
|
#ifdef NUMA
|
||||||
int stripe;
|
int stripe;
|
||||||
|
#endif
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
slab = NULL;
|
slab = NULL;
|
||||||
@ -2870,7 +2872,9 @@ zone_import(uma_zone_t zone, void **bucket, int max, int domain, int flags)
|
|||||||
if ((slab = zone->uz_slab(zone, keg, domain, flags)) == NULL)
|
if ((slab = zone->uz_slab(zone, keg, domain, flags)) == NULL)
|
||||||
break;
|
break;
|
||||||
keg = slab->us_keg;
|
keg = slab->us_keg;
|
||||||
|
#ifdef NUMA
|
||||||
stripe = howmany(max, vm_ndomains);
|
stripe = howmany(max, vm_ndomains);
|
||||||
|
#endif
|
||||||
while (slab->us_freecount && i < max) {
|
while (slab->us_freecount && i < max) {
|
||||||
bucket[i++] = slab_alloc_item(keg, slab);
|
bucket[i++] = slab_alloc_item(keg, slab);
|
||||||
if (keg->uk_free <= keg->uk_reserve)
|
if (keg->uk_free <= keg->uk_reserve)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user