Re: [Intel-gfx] [PATCH] intel: Delay testing for userptr until first use

2014-11-05 Thread Tvrtko Ursulin
On 11/04/2014 06:44 PM, Chris Wilson wrote: On Tue, Nov 04, 2014 at 03:14:04PM +, Tvrtko Ursulin wrote: On 11/04/2014 02:31 PM, Chris Wilson wrote: Running __mmu_notifier_register() is surprisingly expensive, so let's not do that unless we have to. Affects some program startup or what?

Re: [Intel-gfx] [PATCH] intel: Delay testing for userptr until first use

2014-11-04 Thread Chris Wilson
On Tue, Nov 04, 2014 at 03:14:04PM +, Tvrtko Ursulin wrote: > > On 11/04/2014 02:31 PM, Chris Wilson wrote: > >Running __mmu_notifier_register() is surprisingly expensive, so let's > >not do that unless we have to. > > Affects some program startup or what? What is the cost? I would add > some

Re: [Intel-gfx] [PATCH] intel: Delay testing for userptr until first use

2014-11-04 Thread Tvrtko Ursulin
On 11/04/2014 02:31 PM, Chris Wilson wrote: Running __mmu_notifier_register() is surprisingly expensive, so let's not do that unless we have to. Affects some program startup or what? What is the cost? I would add some notes in the commit for future reference. Signed-off-by: Chris Wilson -

Re: [Intel-gfx] [PATCH] intel: Delay testing for userptr until first use

2014-11-04 Thread Chris Wilson
On Tue, Nov 04, 2014 at 02:31:29PM +, Chris Wilson wrote: > +static drm_intel_bo * > +check_bo_alloc_userptr(drm_intel_bufmgr *bufmgr, > +const char *name, > +void *addr, > +uint32_t tiling_mode, > +uint32_t stride,

[Intel-gfx] [PATCH] intel: Delay testing for userptr until first use

2014-11-04 Thread Chris Wilson
Running __mmu_notifier_register() is surprisingly expensive, so let's not do that unless we have to. Signed-off-by: Chris Wilson --- intel/intel_bufmgr_gem.c | 114 +++ 1 file changed, 65 insertions(+), 49 deletions(-) diff --git a/intel/intel_bufmgr_