All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Tvrtko Ursulin <tursulin@ursulin.net>,
	igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 4/7] gem_wsim: Stop keeping batches mapped
Date: Tue, 14 Aug 2018 16:16:56 +0100	[thread overview]
Message-ID: <9e902cd5-4397-379e-0716-d47788a63465@linux.intel.com> (raw)
In-Reply-To: <153425959997.3371.9139569207255132128@skylake-alporthouse-com>


On 14/08/2018 16:13, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2018-08-14 16:05:16)
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> 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@intel.com>
>> ---
>>   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().

Oh dear, I was blind.. Thanks for being sharp as always.

Regards,

Tvrtko

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Tvrtko Ursulin <tursulin@ursulin.net>,
	igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 4/7] gem_wsim: Stop keeping batches mapped
Date: Tue, 14 Aug 2018 16:16:56 +0100	[thread overview]
Message-ID: <9e902cd5-4397-379e-0716-d47788a63465@linux.intel.com> (raw)
In-Reply-To: <153425959997.3371.9139569207255132128@skylake-alporthouse-com>


On 14/08/2018 16:13, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2018-08-14 16:05:16)
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> 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@intel.com>
>> ---
>>   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().

Oh dear, I was blind.. Thanks for being sharp as always.

Regards,

Tvrtko

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-08-14 15:16 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-14 15:05 [PATCH i-g-t 0/7] gem_wsim fixes and new features Tvrtko Ursulin
2018-08-14 15:05 ` [Intel-gfx] " Tvrtko Ursulin
2018-08-14 15:05 ` [PATCH i-g-t 1/7] gem_wsim: Check sleep times Tvrtko Ursulin
2018-08-14 15:05   ` [igt-dev] " Tvrtko Ursulin
2018-08-14 15:09   ` Chris Wilson
2018-08-14 15:09     ` Chris Wilson
2018-08-14 15:21     ` Tvrtko Ursulin
2018-08-14 15:21       ` Tvrtko Ursulin
2018-08-14 15:27       ` Chris Wilson
2018-08-14 15:27         ` Chris Wilson
2018-08-14 18:27         ` Tvrtko Ursulin
2018-08-14 18:27           ` Tvrtko Ursulin
2018-08-14 18:34           ` Chris Wilson
2018-08-14 18:34             ` Chris Wilson
2018-08-14 15:05 ` [PATCH i-g-t 2/7] gem_wsim: Make workload commands case sensitive Tvrtko Ursulin
2018-08-14 15:05   ` [igt-dev] " Tvrtko Ursulin
2018-08-14 15:05 ` [PATCH i-g-t 3/7] gem_wsim: Context priority support Tvrtko Ursulin
2018-08-14 15:05   ` [igt-dev] " Tvrtko Ursulin
2018-08-14 15:05 ` [PATCH i-g-t 4/7] gem_wsim: Stop keeping batches mapped Tvrtko Ursulin
2018-08-14 15:05   ` [igt-dev] " Tvrtko Ursulin
2018-08-14 15:13   ` Chris Wilson
2018-08-14 15:13     ` Chris Wilson
2018-08-14 15:16     ` Tvrtko Ursulin [this message]
2018-08-14 15:16       ` Tvrtko Ursulin
2018-08-14 15:05 ` [PATCH i-g-t 5/7] gem_wsim: Make batches preemptable by default Tvrtko Ursulin
2018-08-14 15:05   ` [igt-dev] " Tvrtko Ursulin
2018-08-14 15:05 ` [PATCH i-g-t 6/7] gem_wsim: Per context preemption point control Tvrtko Ursulin
2018-08-14 15:05   ` [igt-dev] " Tvrtko Ursulin
2018-08-14 15:05 ` [PATCH i-g-t 7/7] gem_wsim: Fix BCS usage under VCS2 remap warning Tvrtko Ursulin
2018-08-14 15:05   ` [igt-dev] " Tvrtko Ursulin
2018-08-14 16:27 ` [igt-dev] ✓ Fi.CI.BAT: success for gem_wsim fixes and new features Patchwork
2018-08-14 22:29 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e902cd5-4397-379e-0716-d47788a63465@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=tursulin@ursulin.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.