[igt-dev] [PATCH i-g-t 7/7] benchmarks/gem_exec_fault: Add softpin mode to support gens with ppgtt
Dixit, Ashutosh
ashutosh.dixit at intel.com
Fri Oct 15 03:18:23 UTC 2021
On Thu, 14 Oct 2021 19:49:05 -0700, Zbigniew Kempczyński wrote:
>
> On Thu, Oct 14, 2021 at 01:07:37PM -0700, Dixit, Ashutosh wrote:
> > On Thu, 14 Oct 2021 01:19:17 -0700, Zbigniew Kempczyński wrote:
> > >
> > > @@ -127,9 +151,14 @@ static int loop(uint64_t size, unsigned ring, int reps, int ncpus,
> > > obj.alignment = 0;
> > > gem_execbuf(fd, &execbuf);
> > >
> > > - /* fault out */
> > > - obj.alignment = 1ull << 63;
> > > - __gem_execbuf(fd, &execbuf);
> > > + if (ahnd) {
> > > + obj.offset = get_offset(ahnd, obj.handle, size, 0);
> > > + obj.flags |= EXEC_OBJECT_PINNED | EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
> > > + } else {
> > > + /* fault out */
> > > + obj.alignment = 1ull << 63;
> > > + __gem_execbuf(fd, &execbuf);
> > > + }
> >
> > Bug above, __gem_execbuf should be moved out of the else {}.
>
> No, it shouldn't. Normal execbuf will lead to unbind/bind with new offset
> and no 'alignment' fault-out execbuf is necessary.
Ah, you are right. Though in that case I think, if the loop has N
iterations, the number of binds is N and the number of unbinds will be (N -
1). Is it worth fixing that? Basically I think we might need to add a bind
outside the first iteration of the loop so that we have an unbind in the
first iteration itself. Then we will have N binds and N unbinds I think.
More information about the igt-dev
mailing list