From owner-p4-projects@FreeBSD.ORG Sun Aug 16 09:24:23 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0E79C106568D; Sun, 16 Aug 2009 09:24:22 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EDAC106568B for ; Sun, 16 Aug 2009 09:24:22 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6E6698FC3D for ; Sun, 16 Aug 2009 09:24:22 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n7G9OMBc032155 for ; Sun, 16 Aug 2009 09:24:22 GMT (envelope-from zec@fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n7G9OLHA032153 for perforce@freebsd.org; Sun, 16 Aug 2009 09:24:21 GMT (envelope-from zec@fer.hr) Date: Sun, 16 Aug 2009 09:24:21 GMT Message-Id: <200908160924.n7G9OLHA032153@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@fer.hr using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 167395 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Aug 2009 09:24:23 -0000 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