From owner-freebsd-x11@FreeBSD.ORG Mon Nov 8 13:16:25 2010 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C536106566B; Mon, 8 Nov 2010 13:16:25 +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 AFAE88FC13; Mon, 8 Nov 2010 13:16:24 +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 oA8DGKEo092214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Nov 2010 15:16:20 +0200 (EET) (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 oA8DGKPH094216; Mon, 8 Nov 2010 15:16:20 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id oA8DGKO8094215; Mon, 8 Nov 2010 15:16:20 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 8 Nov 2010 15:16:20 +0200 From: Kostik Belousov To: Andriy Gapon Message-ID: <20101108131620.GG2392@deviant.kiev.zoral.com.ua> References: <4CD3B1D2.30003@icyb.net.ua> <4CD7E401.1010206@freebsd.org> <20101108120403.GC2392@deviant.kiev.zoral.com.ua> <4CD7F5B9.3010606@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gFjys31hhNz6opFj" Content-Disposition: inline In-Reply-To: <4CD7F5B9.3010606@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: freebsd-x11@freebsd.org, freebsd-current@freebsd.org Subject: Re: radeon_cp_texture: page fault with non-sleepable locks held X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2010 13:16:25 -0000 --gFjys31hhNz6opFj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 08, 2010 at 03:06:01PM +0200, Andriy Gapon wrote: > on 08/11/2010 14:04 Kostik Belousov said the following: > > On Mon, Nov 08, 2010 at 01:50:25PM +0200, Andriy Gapon wrote: > >> on 05/11/2010 09:27 Andriy Gapon said the following: > >>> Kernel page fault with the following non-sleepable locks held: > >>> exclusive sleep mutex drmdev (drmdev) r =3D 0 (0xffffff0001b968a0) lo= cked @ > >>> /usr/src/sys/dev/drm/drm_drv.c:791 > >>> KDB: stack backtrace: > >>> db_trace_self_wrapper() at 0xffffffff801b8afa =3D db_trace_self_wrapp= er+0x2a > >>> kdb_backtrace() at 0xffffffff803a7afa =3D kdb_backtrace+0x3a > >>> _witness_debugger() at 0xffffffff803bd49c =3D _witness_debugger+0x2c > >>> witness_warn() at 0xffffffff803bed32 =3D witness_warn+0x322 > >>> trap() at 0xffffffff8054639f =3D trap+0x39f >=20 > Kostik, >=20 > a tangential question - do you think that it would make sense to put a ch= eck > like the above (in trap) into copyin/copyout (but non-fatal), so that we = can > catch such situations pro-actively (without having to wait for a page fau= lt to > actually happen)? uiomove() already contains WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "Calling uiomove()"); at the start. For the copyin/out routines, that are implemented in assembler for most (all ?) architectures, this seems to be overkill, IMHO. >=20 > >>> calltrap() at 0xffffffff80530688 =3D calltrap+0x8 > >>> --- trap 0xc, rip =3D 0xffffffff8054411d, rsp =3D 0xffffff81241917f0,= rbp =3D > >>> 0xffffff8124191870 --- > >>> copyin() at 0xffffffff8054411d =3D copyin+0x3d > >>> radeon_cp_texture() at 0xffffffff8022fcc7 =3D radeon_cp_texture+0x167 > >>> drm_ioctl() at 0xffffffff8020fa78 =3D drm_ioctl+0x318 > >>> devfs_ioctl_f() at 0xffffffff802dd739 =3D devfs_ioctl_f+0x109 > >>> kern_ioctl() at 0xffffffff803c1197 =3D kern_ioctl+0x1f7 > >>> ioctl() at 0xffffffff803c1358 =3D ioctl+0x168 > >>> syscallenter() at 0xffffffff803b584e =3D syscallenter+0x26e > >>> syscall() at 0xffffffff80545f12 =3D syscall+0x42 > >>> Xfast_syscall() at 0xffffffff80530962 =3D Xfast_syscall+0xe2 > >>> --- syscall (54, FreeBSD ELF64, ioctl), rip =3D 0x801f96a1c, rsp =3D = 0x7fffffffe7a8, > >>> rbp =3D 0xc020644e --- >=20 > --=20 > Andriy Gapon --gFjys31hhNz6opFj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzX+CMACgkQC3+MBN1Mb4gGuQCeIu9Yqqlvx7aQ8LtspawKM6nu jHQAn3o/nO+90GMVXjbjCVxVSi3XZ2QQ =Niyy -----END PGP SIGNATURE----- --gFjys31hhNz6opFj--