svn commit: r246208 - head/sys/netinet
Andre Oppermann
andre at FreeBSD.org
Fri Feb 1 14:21:10 UTC 2013
Author: andre
Date: Fri Feb 1 14:21:09 2013
New Revision: 246208
URL: http://svnweb.freebsd.org/changeset/base/246208
Log:
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
Modified:
head/sys/netinet/tcp_reass.c
head/sys/netinet/tcp_syncache.c
Modified: head/sys/netinet/tcp_reass.c
==============================================================================
--- head/sys/netinet/tcp_reass.c Fri Feb 1 14:16:37 2013 (r246207)
+++ head/sys/netinet/tcp_reass.c Fri Feb 1 14:21:09 2013 (r246208)
@@ -106,8 +106,8 @@ tcp_reass_zone_change(void *tag)
/* Set the zone limit and read back the effective value. */
V_tcp_reass_maxseg = nmbclusters / 16;
- uma_zone_set_max(V_tcp_reass_zone, V_tcp_reass_maxseg);
- V_tcp_reass_maxseg = uma_zone_get_max(V_tcp_reass_zone);
+ V_tcp_reass_maxseg = uma_zone_set_max(V_tcp_reass_zone,
+ V_tcp_reass_maxseg);
}
void
@@ -120,8 +120,8 @@ tcp_reass_init(void)
V_tcp_reass_zone = uma_zcreate("tcpreass", sizeof (struct tseg_qent),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
/* 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_get_max(V_tcp_reass_zone);
+ V_tcp_reass_maxseg = uma_zone_set_max(V_tcp_reass_zone,
+ V_tcp_reass_maxseg);
EVENTHANDLER_REGISTER(nmbclusters_change,
tcp_reass_zone_change, NULL, EVENTHANDLER_PRI_ANY);
}
Modified: head/sys/netinet/tcp_syncache.c
==============================================================================
--- head/sys/netinet/tcp_syncache.c Fri Feb 1 14:16:37 2013 (r246207)
+++ head/sys/netinet/tcp_syncache.c Fri Feb 1 14:21:09 2013 (r246208)
@@ -268,8 +268,8 @@ syncache_init(void)
/* Create the syncache entry zone. */
V_tcp_syncache.zone = uma_zcreate("syncache", sizeof(struct syncache),
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_get_max(V_tcp_syncache.zone);
+ V_tcp_syncache.cache_limit = uma_zone_set_max(V_tcp_syncache.zone,
+ V_tcp_syncache.cache_limit);
}
#ifdef VIMAGE
More information about the svn-src-all
mailing list