From: Chris W. <ch...@ch...> - 2009-02-04 11:11:50
|
On Tue, 2009-02-03 at 22:33 -0800, Eric Anholt wrote: > The basic problem was > mmap_sem (do_mmap()) -> struct_mutex (drm_gem_mmap()) > struct_mutex (i915_gem_execbuffer()) -> mmap_sem (copy_from/to_user()) > > We have plenty of places where we want to hold device state the same > (struct_mutex) while we move a non-trivial amount of data > (copy_from/to_user()), such as i915_gem_pwrite(). Solve this by moving the > one thing that needed struct_mutex with mmap_sem held to using a lock to cover > just those data structures (offset hash and offset manager). Sadly, this does not eliminate this warning: lt-cairo-perf/2456 is trying to acquire lock: (&dev->struct_mutex){--..}, at: [<c02485ed>] i915_gem_fault+0x48/0x128 but task is already holding lock: (&mm->mmap_sem){----}, at: [<c010f693>] do_page_fault+0x1a4/0x595 which appears to be due to a page fault whilst copying the user relocations in i915_gem_object_pin_and_relocate(). -ickle |