From owner-cvs-all@FreeBSD.ORG Sun Jan 29 08:24:56 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org 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 3A1DF16A420; Sun, 29 Jan 2006 08:24:56 +0000 (GMT) (envelope-from scottl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2C6F43D46; Sun, 29 Jan 2006 08:24:55 +0000 (GMT) (envelope-from scottl@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 k0T8OtfK034315; Sun, 29 Jan 2006 08:24:55 GMT (envelope-from scottl@repoman.freebsd.org) Received: (from scottl@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0T8OtsR034314; Sun, 29 Jan 2006 08:24:55 GMT (envelope-from scottl) Message-Id: <200601290824.k0T8OtsR034314@repoman.freebsd.org> From: Scott Long Date: Sun, 29 Jan 2006 08:24:54 +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/vm vm_contig.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 29 Jan 2006 08:24:56 -0000 scottl 2006-01-29 08:24:54 UTC FreeBSD src repository Modified files: sys/vm vm_contig.c Log: The change a few years ago of having contigmalloc start its scan at the top of physical RAM instead of the bottom was a sound idea, but the implementation left a lot to be desired. Scans would spend considerable time looking at pages that are above of the address range given by the caller, and multiple calls (like what happens in busdma) would spend more time on top of that rescanning the same pages over and over. Solve this, at least for now, with two simple optimizations. The first is to not bother scanning high ordered pages that are outside of the provided address range. Second is to cache the page index from the last successful operation so that subsequent scans don't have to restart from the top. This is conditional on the numpages argument being the same or greater between calls. MFC After: 2 weeks Revision Changes Path 1.48 +19 -2 src/sys/vm/vm_contig.c