]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm, drm/vmwgfx: Use RCU locking for object lookups v3
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 6 Nov 2012 11:31:50 +0000 (11:31 +0000)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Nov 2012 06:15:05 +0000 (16:15 +1000)
commit4c4a2890002becc011496be3ff1de9f44049f99a
tree1ba899709b77745acec655d0a8eea3f08c97a885
parent6ecb8406855d78871b92c783fe4e84d8fa2caa48
drm/ttm, drm/vmwgfx: Use RCU locking for object lookups v3

The mostly used lookup+get put+potential_destroy path of TTM objects
is converted to use RCU locks. This will substantially decrease the amount
of locked bus cycles during normal operation.
Since we use kfree_rcu to free the objects, no rcu synchronization is needed
at module unload time.

v2: Don't touch include/linux/kref.h
v3: Adapt to kref_get_unless_zero return value change

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ttm/ttm_object.c
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
include/drm/ttm/ttm_object.h