From owner-freebsd-current@FreeBSD.ORG Fri May 6 13:32:09 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 542AC106566C; Fri, 6 May 2011 13:32:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id C53388FC0C; Fri, 6 May 2011 13:32:08 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p46DW4HA062044 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 May 2011 16:32:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p46DW4it083861; Fri, 6 May 2011 16:32:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p46DW4AK083860; Fri, 6 May 2011 16:32:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 6 May 2011 16:32:04 +0300 From: Kostik Belousov To: Andriy Gapon Message-ID: <20110506133204.GE48734@deviant.kiev.zoral.com.ua> References: <4DC3B764.4030801@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oW7sRvnhM3o6r0iO" Content-Disposition: inline In-Reply-To: <4DC3B764.4030801@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: current@freebsd.org, multimedia@freebsd.org Subject: Re: dsp mmap change X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 13:32:09 -0000 --oW7sRvnhM3o6r0iO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 06, 2011 at 11:55:00AM +0300, Andriy Gapon wrote: >=20 > I would like to ask for a review and/or testing of the following patch: > http://people.freebsd.org/~avg/dev_dsp_mmap.diff >=20 > It's supposed to fix an issue described here: > http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-February/01169= 1.html >=20 > In short, the following pseudo-code should do the right thing: > fd =3D open(/dev/dsp, O_RDWR); > mmap(PROT_READ, fd); > mmap(PROT_WRITE, fd); >=20 > Thank you! I think that you have to call PCM_GIANT_LEAVE() when returning EINVAL on the vm_pager_alloc() failure. Your patch hardcodes an assumption that sndbufs are always contiguous. I was unable to convince myself that this is true. --oW7sRvnhM3o6r0iO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3D+FMACgkQC3+MBN1Mb4hSCwCg3jrBuja6zxUakMlfEtxo0K8R XGUAn1l+mZr+eJeH7cGIbdTnue9PvPZS =nIgf -----END PGP SIGNATURE----- --oW7sRvnhM3o6r0iO--