From owner-cvs-src@FreeBSD.ORG Sun Dec 7 14:49:26 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBC3E16A4DD; Sun, 7 Dec 2003 14:49:26 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0798043F93; Sun, 7 Dec 2003 14:49:26 -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 hB7MnPXJ007409; Sun, 7 Dec 2003 14:49:25 -0800 (PST) (envelope-from alc@repoman.freebsd.org) Received: (from alc@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hB7MnPKe007408; Sun, 7 Dec 2003 14:49:25 -0800 (PST) (envelope-from alc) Message-Id: <200312072249.hB7MnPKe007408@repoman.freebsd.org> From: Alan Cox Date: Sun, 7 Dec 2003 14:49:25 -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/i386 vm_machdep.c src/sys/i386/include sf_buf.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2003 22:49:26 -0000 alc 2003/12/07 14:49:25 PST FreeBSD src repository Modified files: sys/i386/i386 vm_machdep.c sys/i386/include sf_buf.h Log: Don't remove the virtual-to-physical mapping when an sf_buf is freed. Instead, allow the mapping to persist, but add the sf_buf to a free list. If a later sendfile(2) or zero-copy send resends the same physical page, perhaps with the same or different contents, then the mapping overhead is avoided and the sf_buf is simply removed from the free list. In other words, the i386 sf_buf implementation now behaves as a cache of virtual-to-physical translations using an LRU replacement policy on inactive sf_bufs. This is similar in concept to a part of http://www.cs.princeton.edu/~yruan/debox/ patch, but much simpler in implementation. Note: none of this is required on alpha, amd64, or ia64. They now use their direct virtual-to-physical mapping to avoid any emphemeral mapping overheads in their sf_buf implementations. Revision Changes Path 1.220 +10 -9 src/sys/i386/i386/vm_machdep.c 1.3 +1 -0 src/sys/i386/include/sf_buf.h