Skip to content
  • Kenneth Graunke's avatar
    iris: Avoid holding the lock while allocating pages. · e917bb7a
    Kenneth Graunke authored
    
    
    We only need the lock for:
    1. Rummaging through the cache
    2. Allocating VMA
    
    We don't need it for alloc_fresh_bo(), which does GEM_CREATE, and also
    SET_DOMAIN to allocate the underlying pages.  The idea behind calling
    SET_DOMAIN was to avoid a lock in the kernel while allocating pages,
    now we avoid our own global lock as well.
    
    We do have to re-lock around VMA.  Hopefully this shouldn't happen too
    much in practice because we'll find a cached BO in the right memzone
    and not have to reallocate it.
    
    Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    e917bb7a