Re: [igt-dev] [PATCH i-g-t 4/7] gem_wsim: Stop keeping batches mapped

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tvrtko Ursulin (2018-08-14 16:05:16)
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> The reason, which I assume was there at some point, to keep the batches
> persistently memory mapped does not appear to be there. So unmap them
> after creation and remove the unused structure members.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> ---
>  benchmarks/gem_wsim.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
> index 34758419254a..24f518a7770f 100644
> --- a/benchmarks/gem_wsim.c
> +++ b/benchmarks/gem_wsim.c
> @@ -128,7 +128,6 @@ struct w_step
>         struct drm_i915_gem_relocation_entry reloc[4];
>         unsigned long bb_sz;
>         uint32_t bb_handle;
> -       uint32_t *mapped_batch;
>         uint32_t *seqno_value;
>         uint32_t *seqno_address;
>         uint32_t *rt0_value;
> @@ -136,7 +135,6 @@ struct w_step
>         uint32_t *rt1_address;
>         uint32_t *latch_value;
>         uint32_t *latch_address;
> -       unsigned int mapped_len;
>  };
>  
>  DECLARE_EWMA(uint64_t, rt, 4, 2)
> @@ -755,8 +753,7 @@ terminate_bb(struct w_step *w, unsigned int flags)
>  
>         *cs = bbe;
>  
> -       w->mapped_batch = ptr;
> -       w->mapped_len = mmap_len;
> +       munmap(ptr, mmap_len);

The mapped_batch/ptr contains seqno_value/seqno_address etc which is
used after terminate_bb().
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux