From owner-freebsd-arch@FreeBSD.ORG Tue Apr 28 16:19:23 2015 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E279B49 for ; Tue, 28 Apr 2015 16:19:23 +0000 (UTC) Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5849E1358 for ; Tue, 28 Apr 2015 16:19:23 +0000 (UTC) Received: by iejt8 with SMTP id t8so22157319iej.2 for ; Tue, 28 Apr 2015 09:19:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=RlN8tnWkK8GsdOjWPJE7l64uVm/t2RPf2F/1sWXevFE=; b=lPaIKZjkVVe8Z0AIkNIwWMXT54sXQPpcTkjEM5hgmZ0+hWunGb/bHmR46PR/JL8JqW uw9zpIMKHTgvA3Tmzp5dJSMWMpgFOFWBR8I2Yh6YKXtl19Ke+TmG2WVpWVTuHOXuG7gC w+Sq1eEXiKUB+193fZxXLhY+TdlLpQHffqyezBpzASF29eh+q39smyI8HvyIBXBaRMAf 0IROf+6KPgl6cVCuc2UPlU0InvWi/sD+l5PrF0zIfnsnActf+LophR+EjNIuvH98xQQd 01oPMnjuRSGJwMYpEVWfj+x3NgKF05udpd6pHhBi9EQ8Wy4lWTgZQLbHF+kH3jJ4AShg +PbA== X-Gm-Message-State: ALoCoQlr+9z2yaipnDFafdtd4tGDx+YonlJVVt9x1OHaKSmxcZzwcTVPU2optrHc7OjIvcsuqjJq X-Received: by 10.50.61.234 with SMTP id t10mr14345968igr.19.1430237962233; Tue, 28 Apr 2015 09:19:22 -0700 (PDT) Received: from netflix-mac-wired.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id qo11sm7476281igb.17.2015.04.28.09.19.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 28 Apr 2015 09:19:21 -0700 (PDT) Sender: Warner Losh Subject: Re: bus_dmamap_sync() for bounced client buffers from user address space Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_851502F5-21E5-4D4C-B196-6A58C0E7DE9E"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: <1876382.0PQNo3Rp24@ralph.baldwin.cx> Date: Tue, 28 Apr 2015 10:19:20 -0600 Cc: freebsd-arch , Konstantin Belousov , Jason Harmening , Svatopluk Kraus Message-Id: <38574E63-2D74-4ECB-8D68-09AC76DFB30C@bsdimp.com> References: <553B9E64.8030907@gmail.com> <20150425163444.GL2390@kib.kiev.ua> <1876382.0PQNo3Rp24@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.2098) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 16:19:23 -0000 --Apple-Mail=_851502F5-21E5-4D4C-B196-6A58C0E7DE9E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 28, 2015, at 7:40 AM, John Baldwin wrote: >=20 >> I believe UIO_USERSPACE is almost unused, it might be there for some >> obscure (and buggy) driver. >=20 > I believe it was added (and only ever used) in crypto drivers, and = that they > all did bus_dma operations in the context of the thread that passed in = the > uio. I definitely think it is fragile and should be replaced with = something > more reliable. Fusion I/O=E2=80=99s SDK used this trick to allow mapping of userspace = buffers down into the block layer after doing the requisite locking / pinning / etc = of the buffers into memory. That=E2=80=99s if memory serves correctly (the SDK did = these things, I can=E2=80=99t easily check on that detail since I=E2=80=99m no longer at FIO). Warner --Apple-Mail=_851502F5-21E5-4D4C-B196-6A58C0E7DE9E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVP7MIAAoJEGwc0Sh9sBEAMb0P/2yrwv3jtTWEKkmFUBwOGOVB I1BB21SS91M/v5it92fHDQtgUgZUsDg49Ej2jYZ9Llv7LuOVr/PX/w9+F/evxFRo Vt/LSo/BXRIuuoNMc+pvMBEPL14e5WtrWXCvS4tQnfFH4mljcRqXpagrVIsHaaIC 3Gm3RwEfb+lvgNug5haryW6NaHwanhd+NMAlasemy2iAhey2ur+1qGGL3GtX5S5T 2VxO6rvVMbsaepvywTjgtGA68CE+CnCY1hMi78CIPEXeA5Kn2+Ugy6DOGDTOLa8s ABJ+2DnWjJF2bv7fxrBfiWmn9CRbqOpwaFmLG1nwM5/ZIdLJ8Q4RkAd1ynky0NXS jm2529wOmzCGmXftVffCNt83vZeVcmkaC4NLxnVx+1iDRwMlTVcWZTRwSpR3zqiE srviQE+PkCuRX8B7RwTXLwyPLIrKg78Uhn8YAhrs0MvLhvdCiS8q3CprnI37phPO 9gIBMITFYG61fjxMdOdjehpL2hRVW+nudKH8ZI1AqVqCF0wGgAQx192KpKVo0IEh g9QwXY04GS+PrqwEk1tO2st+/DYcEKDKjmz3ucAgM/GXZd8EtbxfbCWTOilrgVN5 sDoCRlFXC9tfyIYWDoa+cj8UxE7YPQbnquz+DcD0JDtHwSU6iBgd23W2Jj4/wJu5 5XcBt0cfYdpTObv74roC =FS3o -----END PGP SIGNATURE----- --Apple-Mail=_851502F5-21E5-4D4C-B196-6A58C0E7DE9E--