From owner-svn-src-head@FreeBSD.ORG Sat May 16 21:24:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C09F349; Sat, 16 May 2015 21:24:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BADC15EE; Sat, 16 May 2015 21:24:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GLOWUw011462; Sat, 16 May 2015 21:24:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GLOWml011461; Sat, 16 May 2015 21:24:32 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201505162124.t4GLOWml011461@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 16 May 2015 21:24:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283014 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 21:24:33 -0000 Author: imp Date: Sat May 16 21:24:32 2015 New Revision: 283014 URL: https://svnweb.freebsd.org/changeset/base/283014 Log: Don't allow unmapped I/O. The pmap isn't quite up to the task. Add a comment to this effect and switch the default. My old AT91SAM9G20 now boots, fsck's the SD card and runs w/o an issue for the first time since a 9.1-ish stable build I did a few years ago. Problems with unmapped I/O: o un-page-aligned I/O requests to devices fail (notably fsck and newfs). o write-back caching was totally broken. write-through caching needed to be enabled. o Even page-aligned I/O requests sometimes failed for reasons not thoroughly investigated. Suggested by: ian@ MFC after: 2 days Modified: head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Sat May 16 21:08:33 2015 (r283013) +++ head/sys/arm/arm/pmap.c Sat May 16 21:24:32 2015 (r283014) @@ -4310,7 +4310,13 @@ pmap_copy_page(vm_page_t src, vm_page_t pmap_copy_page_func(VM_PAGE_TO_PHYS(src), VM_PAGE_TO_PHYS(dst)); } -int unmapped_buf_allowed = 1; +/* + * We have code to do unmapped I/O. However, it isn't quite right + * an causes un-page-aligned I/O to devices to fail (most notably + * newfs or fsck). We give up a little performance to do this, but + * we trade that for rock-solid stability so it is a good trade. + */ +int unmapped_buf_allowed = 0; void pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[],