From owner-freebsd-arch@FreeBSD.ORG Mon Sep 1 12:30:52 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E027CD49; Mon, 1 Sep 2014 12:30:52 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99E6714B1; Mon, 1 Sep 2014 12:30:52 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XOQkt-000I4Y-HB; Mon, 01 Sep 2014 16:30:43 +0400 Date: Mon, 1 Sep 2014 16:30:43 +0400 From: Slawa Olhovchenkov To: Poul-Henning Kamp Subject: Re: script(2) [was: [CFT/review] new sendfile(2)] Message-ID: <20140901123043.GA15867@zxy.spb.ru> References: <20140529102054.GX50679@FreeBSD.org> <20140729232404.GF43962@funkthat.com> <20140831165022.GE7693@FreeBSD.org> <540382E2.3040004@freebsd.org> <2770.1409522711@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2770.1409522711@critter.freebsd.dk> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: Alfred Perlstein , Gleb Smirnoff , freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 12:30:53 -0000 On Sun, Aug 31, 2014 at 10:05:11PM +0000, Poul-Henning Kamp wrote: > -------- > In message <540382E2.3040004@freebsd.org>, Alfred Perlstein writes: > > Can I inject an old idea whose time may finally have arrived ? > > The basic thing we are trying to do here is to avoid userland/kernel > context-switches, because they are so expensive. > > This is a very old problem, the TTY line-disciplines, PCAP, accept > filters and sendfile are all hacks that try to "optimize" specific > use-cases. And aven for firewalling, yes? Firewall rules (up to Level 7) may be related to some trie (similar regex tree, radix trie) with advanced match and extract rules in nodes and leafs.