Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Aug 2009 09:24:21 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 167395 for review
Message-ID:  <200908160924.n7G9OLHA032153@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=167395

Change 167395 by zec@zec_tpx32 on 2009/08/16 09:24:12

	Further simplify the ipdivert V_ patch - there's no real
	need to iterate over all vnets in div_zone_change() when
	maxsockets get increased.  Given that maxsockets is a
	global variable, it cannot be changed by any of the non-default
	vnets anyhow, so div_zone_change() will be always called
	from the context of vnet0.  Given that maxsockets cannot
	shrink but only grow, and that ipdivert will have only a
	single or exceptionally a few socket consumers anyhow, there's
	no need to increase UMA zone limits in non-default vnets.

Affected files ...

.. //depot/projects/vimage-commit2/src/sys/netinet/ip_divert.c#41 edit

Differences ...

==== //depot/projects/vimage-commit2/src/sys/netinet/ip_divert.c#41 (text+ko) ====

@@ -133,15 +133,8 @@
 static void
 div_zone_change(void *tag)
 {
-	VNET_ITERATOR_DECL(vnet_iter);
 
-	VNET_LIST_RLOCK_NOSLEEP();
-	VNET_FOREACH(vnet_iter) {
-		CURVNET_SET(vnet_iter);
-		uma_zone_set_max(V_divcbinfo.ipi_zone, maxsockets);
-		CURVNET_RESTORE();
-	}
-	VNET_LIST_RUNLOCK_NOSLEEP();
+	uma_zone_set_max(V_divcbinfo.ipi_zone, maxsockets);
 }
 
 static int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908160924.n7G9OLHA032153>