Skip to content
  • Tvrtko Ursulin's avatar
    tests/gem_userptr_benchmark: Benchmarking userptr surfaces and impact · d3057d7a
    Tvrtko Ursulin authored and Daniel Vetter's avatar Daniel Vetter committed
    
    
    This adds a small benchmark for the new userptr functionality.
    
    Apart from basic surface creation and destruction, also tested is the
    impact of having userptr surfaces in the process address space. Reason
    for that is the impact of MMU notifiers on common address space
    operations like munmap() which is per process.
    
    v2:
      * Moved to benchmarks.
      * Added pointer read/write tests.
      * Changed output to say iterations per second instead of
        operations per second.
      * Multiply result by batch size for multi-create* tests
        for a more comparable number with create-destroy test.
    
    v3:
      * Use ALIGN macro.
      * Catchup with big lib/ reorganization.
      * Removed unused code and one global variable.
      * Fixed up some warnings.
    
    v4:
      * Fixed feature test, does not matter here but makes it
        consistent with gem_userptr_blits and clearer.
    
    Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Brad Volkin <bradley.d.volkin@intel.com>
    Reviewed-by: default avatarBrad Volkin <bradley.d.volkin@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    d3057d7a