From owner-freebsd-arch@FreeBSD.ORG Wed Dec 19 21:02:23 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B65CE7F; Wed, 19 Dec 2012 21:02:23 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id D6B568FC12; Wed, 19 Dec 2012 21:02:22 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id qBJL2Lx8045035; Wed, 19 Dec 2012 14:02:21 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id qBJL2IfD065631; Wed, 19 Dec 2012 14:02:18 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: Unmapped I/O From: Ian Lepore To: Konstantin Belousov In-Reply-To: <20121219183600.GX71906@kib.kiev.ua> References: <20121219135451.GU71906@kib.kiev.ua> <50D1D2BD.80107@freebsd.org> <50D1ECC5.2070209@freebsd.org> <17252.1355935960@critter.freebsd.dk> <20121219172320.GW71906@kib.kiev.ua> <17479.1355941463@critter.freebsd.dk> <20121219183600.GX71906@kib.kiev.ua> Content-Type: text/plain; charset="us-ascii" Date: Wed, 19 Dec 2012 14:02:18 -0700 Message-ID: <1355950938.1198.227.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Poul-Henning Kamp , mjacob@freebsd.org, freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2012 21:02:23 -0000 On Wed, 2012-12-19 at 20:36 +0200, Konstantin Belousov wrote: > On Wed, Dec 19, 2012 at 06:24:23PM +0000, Poul-Henning Kamp wrote: > > -------- > > In message <20121219172320.GW71906@kib.kiev.ua>, Konstantin Belousov writes: > > > > >Still, the i386 cannot have much benefit from the unmapped buffers, > > >just because thre is no facilities similar to the direct map for amd64. > > >i386 must use transient mapping even for unmapped buffers to copy > > >the data to the usermode. > > > > Wrong, a Adaptec 1542 could DMA directly into or out of any spot > > of memory and that could have been mapped in userland but not in > > kernel. > And how this can be used while keeping on-disk data coherent with the > buffer ? It can by used by physio, but not for the normal file i/o, which > caches the file data in the vnode pages or buffers for non-unified cache. > The transient mapping is needed to copy between kernel buffer and usermode > address on i386. > > > > > >Also, as I understand the history, VMIO buffers, or unified page/buffer > > >cache, only appeared in the FreeBSD. > > > > Correct, but truth to be told, they have probably delayed our > > implementation of unmapped buffers by about 10 years... > Mapped bufers only become an issue on really multi-core machines. > Before large SMP become ubiquitous, additional complexity of the > transient mappings definitely not worth it. On VIVT cache architectures we have to disable caching on all mappings of a page if there are multiple mappings and any are writable. This causes executables to run with the i-cache disabled if its pages are in the buffer cache, because right now the buffers are mapped with persistant writable mappings. So if I understand the conversation so far, these changes are going to fix that problem by only using ephemeral mappings when needed, right? If so, that's very good news. -- Ian