uma_zone_set_max() directly returns the rounded effective zone

limit.  Use the return value directly instead of doing a second
uma_zone_set_max() step.

MFC after:	1 week
This commit is contained in:
andre 2013-02-01 14:21:09 +00:00
parent 6af4b61a84
commit 922fff4953
2 changed files with 6 additions and 6 deletions

View File

@ -106,8 +106,8 @@ tcp_reass_zone_change(void *tag)
/* Set the zone limit and read back the effective value. */ /* Set the zone limit and read back the effective value. */
V_tcp_reass_maxseg = nmbclusters / 16; V_tcp_reass_maxseg = nmbclusters / 16;
uma_zone_set_max(V_tcp_reass_zone, V_tcp_reass_maxseg); V_tcp_reass_maxseg = uma_zone_set_max(V_tcp_reass_zone,
V_tcp_reass_maxseg = uma_zone_get_max(V_tcp_reass_zone); V_tcp_reass_maxseg);
} }
void void
@ -120,8 +120,8 @@ tcp_reass_init(void)
V_tcp_reass_zone = uma_zcreate("tcpreass", sizeof (struct tseg_qent), V_tcp_reass_zone = uma_zcreate("tcpreass", sizeof (struct tseg_qent),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
/* Set the zone limit and read back the effective value. */ /* Set the zone limit and read back the effective value. */
uma_zone_set_max(V_tcp_reass_zone, V_tcp_reass_maxseg); V_tcp_reass_maxseg = uma_zone_set_max(V_tcp_reass_zone,
V_tcp_reass_maxseg = uma_zone_get_max(V_tcp_reass_zone); V_tcp_reass_maxseg);
EVENTHANDLER_REGISTER(nmbclusters_change, EVENTHANDLER_REGISTER(nmbclusters_change,
tcp_reass_zone_change, NULL, EVENTHANDLER_PRI_ANY); tcp_reass_zone_change, NULL, EVENTHANDLER_PRI_ANY);
} }

View File

@ -268,8 +268,8 @@ syncache_init(void)
/* Create the syncache entry zone. */ /* Create the syncache entry zone. */
V_tcp_syncache.zone = uma_zcreate("syncache", sizeof(struct syncache), V_tcp_syncache.zone = uma_zcreate("syncache", sizeof(struct syncache),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
uma_zone_set_max(V_tcp_syncache.zone, V_tcp_syncache.cache_limit); V_tcp_syncache.cache_limit = uma_zone_set_max(V_tcp_syncache.zone,
V_tcp_syncache.cache_limit = uma_zone_get_max(V_tcp_syncache.zone); V_tcp_syncache.cache_limit);
} }
#ifdef VIMAGE #ifdef VIMAGE