From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 21:32:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23D36EE7; Wed, 7 Jan 2015 21:32:24 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB38E2FE; Wed, 7 Jan 2015 21:32:23 +0000 (UTC) Received: from moby.local ([91.89.177.101]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MDQUP-1Y0yva1pEL-00GqJh; Wed, 07 Jan 2015 22:32:15 +0100 Message-ID: <54ADA5D8.8050504@gmx.com> Date: Wed, 07 Jan 2015 22:32:08 +0100 From: Nikos Vassiliadis User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Gleb Smirnoff , Craig Rodrigues Subject: Re: svn commit: r276747 - head/sys/netpfil/pf References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> In-Reply-To: <20150107204631.GG15484@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:V01vNAw4x6/48xtgagK5vgtDFZfP8867vLFVp+y1oLoKcgdqZKd lqXbuQ03IjWF4GJ8x6zKaxQSULWhYggTxWTj0whdJuljwPlqVQfP8lZPxZHI3xF2CRS2EVE GLaUbof7b0TngHl+kOwCcpM7HLAiUjCt/AvhgCfqkeiPh1ynjeMzIDn/u6jwBDHEC4QsTam IMHC5HHruQlRqA+SgrMTw== X-UI-Out-Filterresults: notjunk:1; Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2015 21:32:24 -0000 Hi, On 01/07/15 21:46, Gleb Smirnoff wrote: > On Tue, Jan 06, 2015 at 09:03:04AM +0000, Craig Rodrigues wrote: > C> Author: rodrigc > C> Date: Tue Jan 6 09:03:03 2015 > C> New Revision: 276747 > C> URL: https://svnweb.freebsd.org/changeset/base/276747 > C> > C> Log: > C> Instead of creating a purge thread for every vnet, create > C> a single purge thread and clean up all vnets from this thread. > C> > C> PR: 194515 > C> Differential Revision: D1315 > C> Submitted by: Nikos Vassiliadis > > I am not sure that this is a good idea. The core idea of VNETs > is that they are isolated from each other. If we serialize purging, > then vnets are strongly affecting each other. That is true. > AFAIU, from the PR there is some panic fixed. What is the actual bug > and why couldn't it be fixed with having per-vnet thread? I don't remember the exact bug, this was written in summer of 2013, but the code that creates the threads seemed complex. The decision to use one thread was based on the fact that a lot of resources are used when a big number (100 let's say) of vnets is active. Purging already runs 10 times a second. Something between those two is better. Maybe, creating threads up to a certain number and above that map new vnets to existing threads? Nikos