From owner-freebsd-current@FreeBSD.ORG Mon Nov 8 13:06:06 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC1591065670; Mon, 8 Nov 2010 13:06:06 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id F08668FC1B; Mon, 8 Nov 2010 13:06:05 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA01039; Mon, 08 Nov 2010 15:06:02 +0200 (EET) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1PFRQA-00041A-5l; Mon, 08 Nov 2010 15:06:02 +0200 Message-ID: <4CD7F5B9.3010606@freebsd.org> Date: Mon, 08 Nov 2010 15:06:01 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Kostik Belousov References: <4CD3B1D2.30003@icyb.net.ua> <4CD7E401.1010206@freebsd.org> <20101108120403.GC2392@deviant.kiev.zoral.com.ua> In-Reply-To: <20101108120403.GC2392@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-x11@freebsd.org, freebsd-current@freebsd.org Subject: Re: radeon_cp_texture: page fault with non-sleepable locks held 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: Mon, 08 Nov 2010 13:06:07 -0000 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 = 0 (0xffffff0001b968a0) locked @ >>> /usr/src/sys/dev/drm/drm_drv.c:791 >>> KDB: stack backtrace: >>> db_trace_self_wrapper() at 0xffffffff801b8afa = db_trace_self_wrapper+0x2a >>> kdb_backtrace() at 0xffffffff803a7afa = kdb_backtrace+0x3a >>> _witness_debugger() at 0xffffffff803bd49c = _witness_debugger+0x2c >>> witness_warn() at 0xffffffff803bed32 = witness_warn+0x322 >>> trap() at 0xffffffff8054639f = trap+0x39f Kostik, a tangential question - do you think that it would make sense to put a check 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 fault to actually happen)? >>> calltrap() at 0xffffffff80530688 = calltrap+0x8 >>> --- trap 0xc, rip = 0xffffffff8054411d, rsp = 0xffffff81241917f0, rbp = >>> 0xffffff8124191870 --- >>> copyin() at 0xffffffff8054411d = copyin+0x3d >>> radeon_cp_texture() at 0xffffffff8022fcc7 = radeon_cp_texture+0x167 >>> drm_ioctl() at 0xffffffff8020fa78 = drm_ioctl+0x318 >>> devfs_ioctl_f() at 0xffffffff802dd739 = devfs_ioctl_f+0x109 >>> kern_ioctl() at 0xffffffff803c1197 = kern_ioctl+0x1f7 >>> ioctl() at 0xffffffff803c1358 = ioctl+0x168 >>> syscallenter() at 0xffffffff803b584e = syscallenter+0x26e >>> syscall() at 0xffffffff80545f12 = syscall+0x42 >>> Xfast_syscall() at 0xffffffff80530962 = Xfast_syscall+0xe2 >>> --- syscall (54, FreeBSD ELF64, ioctl), rip = 0x801f96a1c, rsp = 0x7fffffffe7a8, >>> rbp = 0xc020644e --- -- Andriy Gapon