Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Cc: igt-dev@lists.freedesktop.org, Petri Latvala <petri.latvala@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 7/7] benchmarks/gem_exec_fault: Add softpin mode to support gens with ppgtt
Date: Thu, 14 Oct 2021 20:41:39 -0700	[thread overview]
Message-ID: <87lf2vc5u4.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20211015033103.GB3607@zkempczy-mobl2>

On Thu, 14 Oct 2021 20:31:03 -0700, Zbigniew Kempczyński wrote:
>
> On Thu, Oct 14, 2021 at 08:18:23PM -0700, Dixit, Ashutosh wrote:
> > 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.
>
> You're right, for softpin case we got N-1. But I don't think we want to
> compare results between alignment / softpin paths but for dedicated changes
> in the kernel. So then that missing unbind doesn't matter.

I thought it is benchmarking the time taken for N binds and N unbinds so
not too sure how much difference N binds and N-1 unbinds make. Anyway
please go ahead and merge if you think it's fine.

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

  reply	other threads:[~2021-10-15  3:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14  8:19 [igt-dev] [PATCH i-g-t 0/7] Prepare IGTs to allow only zero alignment Zbigniew Kempczyński
2021-10-14  8:19 ` [igt-dev] [PATCH i-g-t 1/7] lib/gem_submission: Add kernel exec object alignment capability Zbigniew Kempczyński
2021-10-14  8:19 ` [igt-dev] [PATCH i-g-t 2/7] lib/intel_batchbuffer: Detect and use kernel " Zbigniew Kempczyński
2021-10-14  8:19 ` [igt-dev] [PATCH i-g-t 3/7] tests/gem_exec_alignment: Add prerequisite alignment condition Zbigniew Kempczyński
2021-10-14  8:19 ` [igt-dev] [PATCH i-g-t 4/7] tests/gem_evict_alignment: Skip if kernel doesn't support obj alignment Zbigniew Kempczyński
2021-10-14  8:19 ` [igt-dev] [PATCH i-g-t 5/7] tests/i915_pm_rpm: Fix invalid alignment Zbigniew Kempczyński
2021-10-14  8:19 ` [igt-dev] [PATCH i-g-t 6/7] benchmarks/gem_exec_fault: Add timeout argument Zbigniew Kempczyński
2021-10-14  8:19 ` [igt-dev] [PATCH i-g-t 7/7] benchmarks/gem_exec_fault: Add softpin mode to support gens with ppgtt Zbigniew Kempczyński
2021-10-14 20:07   ` Dixit, Ashutosh
2021-10-15  2:49     ` Zbigniew Kempczyński
2021-10-15  3:18       ` Dixit, Ashutosh
2021-10-15  3:31         ` Zbigniew Kempczyński
2021-10-15  3:41           ` Dixit, Ashutosh [this message]
2021-10-15  3:49             ` Zbigniew Kempczyński
2021-10-14  9:05 ` [igt-dev] ✓ Fi.CI.BAT: success for Prepare IGTs to allow only zero alignment (rev2) Patchwork
2021-10-14 10:20 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-10-14 15:28 ` [igt-dev] [PATCH i-g-t 0/7] Prepare IGTs to allow only zero alignment Dixit, Ashutosh
2021-10-14 15:53   ` Zbigniew Kempczyński
2021-10-14 20:05     ` Dixit, Ashutosh
  -- strict thread matches above, loose matches on Subject: below --
2021-10-08  6:54 Zbigniew Kempczyński
2021-10-08  6:54 ` [igt-dev] [PATCH i-g-t 7/7] benchmarks/gem_exec_fault: Add softpin mode to support gens with ppgtt Zbigniew Kempczyński
2021-10-14  5:01   ` Dixit, Ashutosh
2021-10-14  5:06     ` Dixit, Ashutosh
2021-10-14  8:11     ` Zbigniew Kempczyński

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=87lf2vc5u4.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@intel.com \
    --cc=zbigniew.kempczynski@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