[Intel-gfx] [PATCH i-g-t v4] benchmarks/gem_wsim: Command submission workload simulator

Chris Wilson chris at chris-wilson.co.uk
Thu Apr 20 14:52:37 UTC 2017


On Thu, Apr 20, 2017 at 01:29:11PM +0100, Tvrtko Ursulin wrote:
> +			wrk->nr_bb[engine]++;
> +
> +			if (engine == VCS && balance) {
> +				engine = balance(wrk, w);
> +				wrk->nr_bb[engine]++;
> +				b = &w->b[engine - VCS1];
> +
> +				if (flags & SEQNO)
> +					update_bb_seqno(b, engine,
> +							++wrk->seqno[engine]);
> +			}
> +
> +			if (w->duration.min != w->duration.max) {
> +				unsigned int d = get_duration(&w->duration);
> +				unsigned long offset;
> +
> +				offset = ALIGN(b->bb_sz - get_bb_sz(d),
> +					       2 * sizeof(uint32_t));
> +				b->eb.batch_start_offset = offset;
> +			}
> +
> +			gem_execbuf(fd, &b->eb);

Likely double counting wrk->nr_bb. I suggest placing it next to the
gem_execbuf().
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list