From owner-freebsd-net@FreeBSD.ORG Sun Jan 11 13:56:46 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4838F16A4CE for ; Sun, 11 Jan 2004 13:56:46 -0800 (PST) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id C881B43D3F for ; Sun, 11 Jan 2004 13:56:41 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.9p2/8.12.9) with ESMTP id i0BLuV7E031435; Sun, 11 Jan 2004 13:56:35 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <200401112156.i0BLuV7E031435@gw.catspoiler.org> Date: Sun, 11 Jan 2004 13:56:31 -0800 (PST) From: Don Lewis To: bms@spc.org In-Reply-To: <20040111195740.GK17555@saboteur.dek.spc.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: freebsd-net@FreeBSD.org cc: richard_bejtlich@yahoo.com Subject: Re: Paper on device polling and packet capture performance X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2004 21:56:46 -0000 On 11 Jan, Bruce M Simpson wrote: > On Fri, Jan 09, 2004 at 03:51:43PM -0600, Guy Helmer wrote: >> I want to look at memory-mapped access to the BPF device. >> This would preserve the existing network device drivers >> while reducing mbuf copies, context switches/user-kernel >> transitions, and latency. Performance ought to be >> comparable to Luca's approach, and this would also >> preserve bpf filtering capability. >> >> (If someone else has already done this, I'd love to >> know where to find the code!) > > I did review some patches related to this last month but they weren't > for FreeBSD. One big problem with the approach involved which leapt out > at me was that the space was allocated within user address space, which > introduces the risk of page faults (as you may know we can't ever fault > with a mutex held -- or it's game over). You'd have to wire the buffer. Beyond a certain buffer size, you'd probably want to maintain a sliding window of of wired memory to avoid wiring an excessive amount of memory.