public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, 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 07/15] gem_wsim: Infinite batch support
Date: Thu, 23 May 2019 15:17:48 +0100	[thread overview]
Message-ID: <e635cb74-7640-21b2-ec98-bec365a15955@linux.intel.com> (raw)
In-Reply-To: <155862059537.28319.322837164565725436@skylake-alporthouse-com>


On 23/05/2019 15:09, Chris Wilson wrote:
> Quoting Chris Wilson (2019-05-23 15:05:05)
>> Quoting Tvrtko Ursulin (2019-05-22 16:57:12)
>>> -static void
>>> +static unsigned int
>>>   terminate_bb(struct w_step *w, unsigned int flags)
>>>   {
>>>          const uint32_t bbe = 0xa << 23;
>>>          unsigned long mmap_start, mmap_len;
>>>          unsigned long batch_start = w->bb_sz;
>>> +       unsigned int r = 0;
>>>          uint32_t *ptr, *cs;
>>>   
>>>          igt_assert(((flags & RT) && (flags & SEQNO)) || !(flags & RT));
>>> @@ -838,6 +854,9 @@ terminate_bb(struct w_step *w, unsigned int flags)
>>>          if (flags & RT)
>>>                  batch_start -= 12 * sizeof(uint32_t);
>>>   
>>> +       if (w->unbound_duration)
>>> +               batch_start -= 4 * sizeof(uint32_t); /* MI_ARB_CHK + MI_BATCH_BUFFER_START */
>>> +
>>>          mmap_start = rounddown(batch_start, PAGE_SIZE);
>>>          mmap_len = ALIGN(w->bb_sz - mmap_start, PAGE_SIZE);
>>>   
>>> @@ -847,8 +866,19 @@ terminate_bb(struct w_step *w, unsigned int flags)
>>>          ptr = gem_mmap__wc(fd, w->bb_handle, mmap_start, mmap_len, PROT_WRITE);
>>>          cs = (uint32_t *)((char *)ptr + batch_start - mmap_start);
>>>   
>>> +       if (w->unbound_duration) {
>>> +               w->reloc[r++].offset = batch_start + 2 * sizeof(uint32_t);
>>> +               batch_start += 4 * sizeof(uint32_t);
>>> +
>>> +               *cs++ = w->preempt_us ? 0x5 << 23 /* MI_ARB_CHK; */ : MI_NOOP;
>>> +               w->recursive_bb_start = cs;
>>> +               *cs++ = MI_BATCH_BUFFER_START | 1 << 8 | 1;
>>> +               *cs++ = 0;
>>> +               *cs++ = 0;
>>
>> delta is zero, and mmap_len is consistent, so yup this gives a page of
>> nops before looping.
> 
> Waitasec... Only emitting ARB_CHK if preempt_us is set. You want an
> unbounded unpreemptible batch?
> 
> I suppose it's not without use (although I plan for it to be killed
> quickly and reset), but I would not advise for preempt_us to be 0 by
> default then.

Default is 100us (search for "w->preempt_us = 100;") and then for 
instance frame-split-60fps.wsim disables it to simulate media better 
("X.1.0", "X.2.0"). AFAIR you actually asked for preemptable by default.

Now that I think of it.. I really need a command line switch to control 
it globally. Or better per engine class to simulate media better. 
Blast.. feature creep never ends.

Regards,

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

  reply	other threads:[~2019-05-23 14:17 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 15:57 [igt-dev] [PATCH i-g-t 00/15] Remaining bits of Virtual Engine tooling Tvrtko Ursulin
2019-05-22 15:57 ` [igt-dev] [PATCH i-g-t 01/15] gem_wsim: Engine map support Tvrtko Ursulin
2019-05-23 13:23   ` [igt-dev] [Intel-gfx] " Chris Wilson
2019-05-22 15:57 ` [igt-dev] [PATCH i-g-t 02/15] gem_wsim: Save some lines by changing to implicit NULL checking Tvrtko Ursulin
2019-05-22 15:57 ` [igt-dev] [PATCH i-g-t 03/15] gem_wsim: Compact int command parsing with a macro Tvrtko Ursulin
2019-05-22 15:57 ` [igt-dev] [PATCH i-g-t 04/15] gem_wsim: Engine map load balance command Tvrtko Ursulin
2019-05-23 13:25   ` Chris Wilson
2019-05-23 13:58     ` Tvrtko Ursulin
2019-05-22 15:57 ` [Intel-gfx] [PATCH i-g-t 05/15] gem_wsim: Engine bond command Tvrtko Ursulin
2019-05-22 15:57 ` [Intel-gfx] [PATCH i-g-t 06/15] gem_wsim: Some more example workloads Tvrtko Ursulin
2019-05-22 15:57 ` [igt-dev] [PATCH i-g-t 07/15] gem_wsim: Infinite batch support Tvrtko Ursulin
2019-05-23 14:05   ` Chris Wilson
2019-05-23 14:09     ` Chris Wilson
2019-05-23 14:17       ` Tvrtko Ursulin [this message]
2019-05-22 15:57 ` [igt-dev] [PATCH i-g-t 08/15] gem_wsim: Command line switch for specifying low slice count workloads Tvrtko Ursulin
2019-05-22 15:57 ` [igt-dev] [PATCH i-g-t 09/15] gem_wsim: Per context SSEU control Tvrtko Ursulin
2019-05-22 15:57 ` [igt-dev] [PATCH i-g-t 10/15] gem_wsim: Allow RCS virtual engine with " Tvrtko Ursulin
2019-05-22 15:57 ` [igt-dev] [PATCH i-g-t 11/15] gem_wsim: Consolidate engine assignments into helpers Tvrtko Ursulin
2019-05-23 13:26   ` Chris Wilson
2019-05-22 15:57 ` [igt-dev] [PATCH i-g-t 12/15] gem_wsim: Discover engines Tvrtko Ursulin
2019-05-22 15:57 ` [igt-dev] [PATCH i-g-t 13/15] gem_wsim: Support Icelake parts Tvrtko Ursulin
2019-05-22 15:57 ` [igt-dev] [PATCH i-g-t 14/15] gem_wsim: Fix prng usage Tvrtko Ursulin
2019-05-22 16:51   ` Chris Wilson
2019-05-22 15:57 ` [Intel-gfx] [PATCH i-g-t 15/15] gem_wsim: Allow random seed control Tvrtko Ursulin
2019-05-22 16:52   ` [igt-dev] " Chris Wilson
2019-05-22 17:21 ` [igt-dev] ✓ Fi.CI.BAT: success for Remaining bits of Virtual Engine tooling Patchwork
2019-05-23 14:15 ` [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=e635cb74-7640-21b2-ec98-bec365a15955@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=tvrtko.ursulin@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox