From owner-freebsd-virtualization@FreeBSD.ORG Thu Jun 6 12:24:17 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 14C80278; Thu, 6 Jun 2013 12:24:17 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bk0-x22c.google.com (mail-bk0-x22c.google.com [IPv6:2a00:1450:4008:c01::22c]) by mx1.freebsd.org (Postfix) with ESMTP id E611F1DE6; Thu, 6 Jun 2013 12:24:15 +0000 (UTC) Received: by mail-bk0-f44.google.com with SMTP id r7so1570276bkg.31 for ; Thu, 06 Jun 2013 05:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=eIZGnFUwokq+esK0tN2UdK4DZfTSBmtRPjlpxKUkiq0=; b=tiXxjS0oPRWCZjUWM041S7SLylnm9facT8wCnDGt5gNO54dPQWTrqTh2DDDBAxmfIV lnIU+Fu3R2b9PcADqugtJxT4U2GZfmDV0F0X0FOxPtKbkeinb4LzHteEtxf2gaEn8c04 MXNl2K29EcP6b9jr6ZpS9alpaoEvh8usMLP+f2ozljqhsYjV2J4XF5x2NTVdsIGC+YZD uN5yRngJQPgXiNcCZBsrhUX8jkZRJXpPvThK0u6yB3g72u9vRpjHnEnr8sOpOrBB4QpW NVWjc2teC25pPMeFeuCFHDsFHEJTfqOQDo8Nl53E/Mrw6UJxyrEkWkb1ewFD6qr0SkcA LpbA== X-Received: by 10.204.72.137 with SMTP id m9mr634498bkj.122.1370521454805; Thu, 06 Jun 2013 05:24:14 -0700 (PDT) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPSA id fz10sm27756318bkc.9.2013.06.06.05.24.12 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 06 Jun 2013 05:24:13 -0700 (PDT) Sender: Mikolaj Golub Date: Thu, 6 Jun 2013 15:24:10 +0300 From: Mikolaj Golub To: Nikos Vassiliadis Subject: Re: pf + vimage patch Message-ID: <20130606122409.GA10459@gmail.com> References: <51AC84EE.6020009@gmx.com> <20130605085219.GA53217@gmail.com> <51B065F5.4080209@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51B065F5.4080209@gmx.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "Bjoern A. Zeeb" , freebsd-jail@freebsd.org, Gleb Smirnoff , freebsd-virtualization@freebsd.org, freebsd-pf@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jun 2013 12:24:17 -0000 On Thu, Jun 06, 2013 at 12:35:33PM +0200, Nikos Vassiliadis wrote: > >> -VNET_DEFINE(u_long, pf_srchashsize); > >> -#define V_pf_srchashsize VNET(pf_srchashsize) > >> -SYSCTL_VNET_UINT(_net_pf, OID_AUTO, source_nodes_hashsize, CTLFLAG_RDTUN, > >> - &VNET_NAME(pf_srchashsize), 0, "Size of pf(4) source nodes hashtable"); > >> +u_long pf_srchashsize; > >> +SYSCTL_UINT(_net_pf, OID_AUTO, source_nodes_hashsize, CTLFLAG_RDTUN, > >> + &pf_srchashsize, 0, "Size of pf(4) source nodes hashtable"); > >> > > > > Why do you have to devirtualize these variables? Are per vnet > > hashtables sizes not useful or do they cause issues? > > Per VNET variables are not useful for pf_hashsize and pf_srchashsize > since these values are RO and cannot be modified at runtime. Indeed. I missed RDTUN flag. > module unload is broken:( Maybe it can be fixed at a (bit) later date? I don't think Gleb will be happy with this. Some time ago he removed some vimage related stuff to prevent crashing on module unload (see r229849). Actually your patch looks like a partial revert of that commit. So I think you need to think about this issue from start. At least it should not crash non-vimage kernel and there should be understanding how to fix it for vimage kernel. Your approach with keeping only one purge thread might make it simpler. -- Mikolaj Golub