From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 19:28:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C8ECC04; Thu, 8 Jan 2015 19:28:44 +0000 (UTC) Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com [IPv6:2a00:1450:400c:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D309CEE; Thu, 8 Jan 2015 19:28:44 +0000 (UTC) Received: by mail-we0-f175.google.com with SMTP id k11so4270746wes.6; Thu, 08 Jan 2015 11:28:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=PeUJsXbosvzxU3eiCoUl9iB2ONVayvcGiY/zypeq77M=; b=n7rIlHq+EREvrY3li6PkuPM1aREbkv85K755bCtP259CXL0UhWG0mfvjHaxsOeBd6N VSa/n9bLQOHOPEtKt+lzJnUl53vTeh0v2XTDD95/3WulY2IOqh/v1Oqrh7lyqx2iNLBd pjZsaKGhIcFfIIQaWK6HHtE5W6z0QDD9LkkTwg33fR8d5Ccs+dhKmUqBm0zmd8dqcoqS +z9qrPAQopxaOfWPzj4jAYugHa9aNriibhjwE07alCxCKZlnikwidgVpHeRTg5Eko6Re HKqbuJZ83IIomZXcXT77PF3wMln7Sp/XxM5W4NdOE9v1I9nR9a94Knvh5PS5G9gCc2NI VGWg== MIME-Version: 1.0 X-Received: by 10.180.14.136 with SMTP id p8mr22854955wic.20.1420745322499; Thu, 08 Jan 2015 11:28:42 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Thu, 8 Jan 2015 11:28:42 -0800 (PST) In-Reply-To: References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> Date: Thu, 8 Jan 2015 11:28:42 -0800 X-Google-Sender-Auth: JjFerit7XvYIkqNjjvInmk4CUAw Message-ID: Subject: Re: svn commit: r276747 - head/sys/netpfil/pf From: Adrian Chadd To: =?UTF-8?Q?Ermal_Lu=C3=A7i?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Craig Rodrigues , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Nikos Vassiliadis , Gleb Smirnoff , "svn-src-head@freebsd.org" , "Bjoern A. Zeeb" 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: Thu, 08 Jan 2015 19:28:44 -0000 On 8 January 2015 at 00:13, Ermal Lu=C3=A7i wrote: > > > On Thu, Jan 8, 2015 at 1:21 AM, Bjoern A. Zeeb > wrote: >> >> >> > On 07 Jan 2015, at 20: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. >> > >> > 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? >> >> You don=E2=80=99t 30000 whatever pf purging threads on a system all runn= ing, >> possibly competing for some resources, e.g., locks? > > > You can tune your system to your load! > > I do not agree with this change as well but just saw it! > > I would have agreed with this if a thread per CPU is created and some > improvements in the locking strategy is performed! > This is a potential issue since on busy system this thread gets very > resource consuming! So the tricksy bit here is once you have things being called via a taskqueue, they're effectively cooperative multitasking bits. A lot of things I've found aren't .. really designed for this. So I'm all for it, and I think it's a good idea in general, but then the pieces need to be reviewed for their suitability for this and may need some reworking so they don't hog CPU. (Yes, it's like writing WIN16 or MACOS code, or maybe network drivers in FreeBSD, but you get the idea.) -adrian