From owner-freebsd-arm@FreeBSD.ORG Tue Jun 2 17:17:10 2009 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 836161065724 for ; Tue, 2 Jun 2009 17:17:10 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 5955A8FC12 for ; Tue, 2 Jun 2009 17:17:10 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n52GgLsQ059264 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Jun 2009 09:42:21 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <4A25566C.7020806@freebsd.org> Date: Tue, 02 Jun 2009 09:42:20 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.21 (X11/20090411) MIME-Version: 1.0 To: Mark Tinguely References: <200905282320.n4SNK87M043401@casselton.net> In-Reply-To: <200905282320.n4SNK87M043401@casselton.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Misty-Metrics: ebb.errno.com; whitelist Cc: freebsd-arm@freebsd.org Subject: Re: cache corruption patch 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, 02 Jun 2009 17:17:10 -0000 Mark Tinguely wrote: > There has been several occurrences of memory corruption in ARM due to caching > issues. A couple recent examples are problems with the SATA drive and new USB > code. > > This patch tracks kernel mapped pages and detects when they are shared > with existing user mapped pages and other kernel mapped pages. This patch > has gone through some refinement in the last couple days with feed back > from testers and is getting ready for being committed before the FreeBSD 8.0 > freeze. > > This patch should allow the removal of added cache invalidation commands to > the dma. > > The patch is located at: > > http://www.casselton.net/~tinguely/arm_pmap_unmanaged.diff > > For those interested, I can give a long explanation of the patch. > Have you measured the overhead of this additional state tracking (time+space)? It appears to affect only dma buffers. Not sure what "added cache invalidation commands" you're referring to, can you explain? Perhaps you could just provide a separate patch that shows which bus_dma ops you think can go away. Sam