From owner-freebsd-arm@FreeBSD.ORG Tue Dec 11 20:10:06 2007 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A615A16A4C4 for ; Tue, 11 Dec 2007 20:10:06 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (casselton.net [63.165.140.2]) by mx1.freebsd.org (Postfix) with ESMTP id 6291713C4E5 for ; Tue, 11 Dec 2007 20:10:06 +0000 (UTC) (envelope-from tinguely@casselton.net) Received: from casselton.net (localhost [127.0.0.1]) by casselton.net (8.13.8/8.13.8) with ESMTP id lBBKA2Q7016943; Tue, 11 Dec 2007 14:10:02 -0600 (CST) (envelope-from tinguely@casselton.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=casselton.net; s=ccnMail; t=1197403803; bh=QFQy9WAqdRR4HlrTvwdVvbPVtwpasEhKbRS2HIR iERk=; h=Date:From:Message-Id:To:Subject:Cc:In-Reply-To; b=Wt73pMjx O/45Fky72n5onzhTHgL0oiSR+hb9CqZW3NZt06WpVWNbtV/0gcG8jxkp9SOZyzM7Vfg 8QCJWYfjJoSCpN2vxpCKOLIDt2nB9E5EcXKO8FI2H53umhHeF/imqOJQbhiXHLBMdDS HBtBnzZpWh8pNf+8e33FXPZ8s7d6w= Received: (from tinguely@localhost) by casselton.net (8.13.8/8.13.8/Submit) id lBBKA2qJ016942; Tue, 11 Dec 2007 14:10:02 -0600 (CST) (envelope-from tinguely) Date: Tue, 11 Dec 2007 14:10:02 -0600 (CST) From: Mark Tinguely Message-Id: <200712112010.lBBKA2qJ016942@casselton.net> To: mlfbsd@ci0.org In-Reply-To: <20071206230417.GA7366@ci0.org> Cc: freebsd-arm@freebsd.org Subject: ARM pmap.c redundant vac_me_harder X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2007 20:10:06 -0000 IMO, there is a redundant vac_me_harder() call in pmap_protect(). The vac_me_harder() is already performed as the last step in pmap_modify_pv() when the PVF_WRITE flag is changed. --- on a related topic --- vac_me_kpmap() can cause (2 * n ^ 2) loops of the pv_list. From my rough pen and paper logic and even rougher coding, I think the vac_me_XXXX routines can be combined together and the user scan can be kept at (2 * n) loops and the kernel cache fixup can be done in (3 * n) loops at the cost of adding a couple variables to the pmap structure. Since the variables are in the pmap, only one scan can be done at a time - which would not be a problem on uniprocessors. Okay, I promise to quit digging through the ARM pmap code. --Mark Tinguely.