From owner-p4-projects@FreeBSD.ORG Tue Nov 6 16:42:36 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C374116A469; Tue, 6 Nov 2007 16:42:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B4CC16A421 for ; Tue, 6 Nov 2007 16:42:36 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5656213C4BC for ; Tue, 6 Nov 2007 16:42:36 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lA6Gganw092159 for ; Tue, 6 Nov 2007 16:42:36 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lA6GgaHf092156 for perforce@freebsd.org; Tue, 6 Nov 2007 16:42:36 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 6 Nov 2007 16:42:36 GMT Message-Id: <200711061642.lA6GgaHf092156@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 128745 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2007 16:42:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=128745 Change 128745 by rwatson@rwatson_fledge on 2007/11/06 16:42:16 Update two comments. Affected files ... .. //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#21 edit Differences ... ==== //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#21 (text+ko) ==== @@ -74,7 +74,8 @@ * sf_bufs. Even though the memory is contiguous in user space, it may not * be mapped contiguously in the kernel (i.e., a set of physically * non-contiguous pages in the direct map region) so we must implement - * scatter-gather copying. + * scatter-gather copying. One significant mitigating factor is that on + * systems with a direct memory map, we can avoid TLB misses. * * At the front of the shared memor region is a bpf_zbuf_header, which * contains shared control data to allow user space and the kernel to @@ -402,9 +403,8 @@ } /* - * For now, allow bpfread() to rotate the buffers, but don't perform a copy - * operation or return a value. If we want to copy, we'll need to implement - * scatter-gather copying with a series of uiomove calls here. + * read() is unimplemented for zero-copy BPF buffers, even though in + * principle you could combine the two semantics. */ int bpf_zerocopy_uiomove(struct bpf_d *d, caddr_t buf, u_int len,