From owner-cvs-src@FreeBSD.ORG Sun Apr 2 05:45:06 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org 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 0CDB416A41F; Sun, 2 Apr 2006 05:45:05 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C30CA43D48; Sun, 2 Apr 2006 05:45:05 +0000 (GMT) (envelope-from alc@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k325j5JG011014; Sun, 2 Apr 2006 05:45:05 GMT (envelope-from alc@repoman.freebsd.org) Received: (from alc@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k325j5pQ011013; Sun, 2 Apr 2006 05:45:05 GMT (envelope-from alc) Message-Id: <200604020545.k325j5pQ011013@repoman.freebsd.org> From: Alan Cox Date: Sun, 2 Apr 2006 05:45:05 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/amd64/amd64 pmap.c src/sys/i386/i386 pmap.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 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, 02 Apr 2006 05:45:06 -0000 alc 2006-04-02 05:45:05 UTC FreeBSD src repository Modified files: sys/amd64/amd64 pmap.c sys/i386/i386 pmap.c Log: Introduce pmap_try_insert_pv_entry(), a function that conditionally creates a pv entry if the number of entries is below the high water mark for pv entries. Use pmap_try_insert_pv_entry() in pmap_copy() instead of pmap_insert_entry(). This avoids possible recursion on a pmap lock in get_pv_entry(). Eliminate the explicit low-memory checks in pmap_copy(). The check that the number of pv entries was below the high water mark was largely ineffective because it was located in the outer loop rather than the inner loop where pv entries were allocated. Instead of checking, we attempt the allocation and handle the failure. Reviewed by: tegge Reported by: kris MFC after: 5 days Revision Changes Path 1.540 +28 -13 src/sys/amd64/amd64/pmap.c 1.547 +28 -13 src/sys/i386/i386/pmap.c