From owner-cvs-all@FreeBSD.ORG Mon Nov 17 10:22:25 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06DE316A4CE; Mon, 17 Nov 2003 10:22:25 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B2EC43FB1; Mon, 17 Nov 2003 10:22:24 -0800 (PST) (envelope-from alc@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hAHIMOXJ038960; Mon, 17 Nov 2003 10:22:24 -0800 (PST) (envelope-from alc@repoman.freebsd.org) Received: (from alc@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hAHIMOr1038959; Mon, 17 Nov 2003 10:22:24 -0800 (PST) (envelope-from alc) Message-Id: <200311171822.hAHIMOr1038959@repoman.freebsd.org> From: Alan Cox Date: Mon, 17 Nov 2003 10:22:24 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/i386/include sf_buf.h src/sys/i386/i386 vm_machdep.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2003 18:22:25 -0000 alc 2003/11/17 10:22:24 PST FreeBSD src repository Modified files: sys/i386/include sf_buf.h sys/i386/i386 vm_machdep.c Log: - Change the i386's sf_buf implementation so that it never allocates more than one sf_buf for one vm_page. To accomplish this, we add a global hash table mapping vm_pages to sf_bufs and a reference count to each sf_buf. (This is similar to the patches for RELENG_4 at http://www.cs.princeton.edu/~yruan/debox/.) For the uninitiated, an sf_buf is nothing more than a kernel virtual address that is used for temporary virtual-to-physical mappings by sendfile(2) and zero-copy sockets. As such, there is no reason for one vm_page to have several sf_bufs mapping it. In fact, using more than one sf_buf for a single vm_page increases the likelihood that sendfile(2) blocks, hurting throughput. (See http://www.cs.princeton.edu/~yruan/debox/.) Revision Changes Path 1.219 +48 -26 src/sys/i386/i386/vm_machdep.c 1.2 +2 -1 src/sys/i386/include/sf_buf.h