All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
Cc: igt-dev@lists.freedesktop.org, Petri Latvala <petri.latvala@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t v4 37/56] tests/gem_tiled_fence_blits: Adopt to use allocator
Date: Mon, 9 Aug 2021 09:30:33 +0200	[thread overview]
Message-ID: <20210809073033.GC5318@zkempczy-mobl2> (raw)
In-Reply-To: <87fsvmum2i.wl-ashutosh.dixit@intel.com>

On Fri, Aug 06, 2021 at 05:37:25PM -0700, Dixit, Ashutosh wrote:
> On Fri, 06 Aug 2021 06:41:26 -0700, Zbigniew Kempczyński wrote:
> >
> > For newer gens we're not able to rely on relocations. Adopt to use
> > offsets acquired from the allocator.
> 
> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> 
> Just a question below.
> 
> > @@ -198,7 +209,23 @@ static void run_test(int fd, int count)
> >			reloc[0].target_handle = obj[0].handle = bo[dst];
> >			reloc[1].target_handle = obj[1].handle = bo[src];
> >
> > +			if (ahnd) {
> > +				obj[0].offset = get_offset(ahnd, obj[0].handle,
> > +						sizeof(linear), 0);
> > +				obj[1].offset = get_offset(ahnd, obj[1].handle,
> > +						sizeof(linear), 0);
> > +				obj[2].offset = get_offset(ahnd, obj[2].handle,
> > +						4096, 0);
> > +				update_batch(fd, obj[2].handle, reloc,
> > +					     obj[0].offset, obj[1].offset);
> > +			}
> > +
> >			gem_execbuf(fd, &eb);
> > +			if (ahnd) {
> > +				gem_close(fd, obj[2].handle);
> > +				obj[2].handle = gem_create(fd, 4096);
> 
> Is it necessary to update these offsets above, rather than just fix the
> offsets at the beginning of the function? Also to recreate obj[2]? What we
> have above is fine but just wondering the reason for it. Thanks.

Original - reloc version uses single batch which is patched by kernel 
when it completes. i915 knows when it can be altered with new relocation
data then executed. For softpin we're not able to do so on same active bb.
We should wait until bb will be not busy and then we could patch it. 
Doing this in userspace can be done using out-fence, poll() then patch
bb and execbuf(). But this strategy is prone to stalls because time 
we spend in userspace is idle from gpu point of view. Another attitude
is to prepare more execbufs which enqueued on same context will be
executed sequentially but without gaps between. This is strategy
above. 

--
Zbigniew 

  reply	other threads:[~2021-08-09  7:30 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06 13:40 [igt-dev] [PATCH i-g-t v4 00/56] Add allocator support in IGT Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 01/56] lib/igt_dummyload: Add support of using allocator in igt spinner Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 02/56] lib/intel_allocator: Add few helper functions for common use Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 03/56] lib/igt_gt: Add passing ahnd as an argument to igt_hang Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 04/56] lib/intel_batchbuffer: Ensure relocation code will be called Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 05/56] lib/intel_batchbuffer: Add allocator support in blitter fast copy Zbigniew Kempczyński
2021-08-09  6:09   ` Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 06/56] lib/intel_batchbuffer: Add allocator support in blitter src copy Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 07/56] lib/intel_batchbuffer: Try to avoid relocations in blitting Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 08/56] lib/huc_copy: Extend huc copy prototype to pass allocator handle Zbigniew Kempczyński
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 09/56] tests/gem_busy: Adopt to use allocator Zbigniew Kempczyński
2021-08-06 20:07   ` Dixit, Ashutosh
2021-08-06 13:40 ` [igt-dev] [PATCH i-g-t v4 10/56] tests/gem_create: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 11/56] tests/gem_ctx_engines: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 12/56] tests/gem_ctx_exec: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 13/56] tests/gem_ctx_freq: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 14/56] tests/gem_ctx_isolation: " Zbigniew Kempczyński
2021-08-06 20:57   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 15/56] tests/gem_ctx_param: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 16/56] tests/gem_eio: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 17/56] tests/gem_exec_async: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 18/56] tests/gem_exec_balancer: " Zbigniew Kempczyński
2021-08-06 21:48   ` Dixit, Ashutosh
2021-08-09  7:01     ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 19/56] tests/gem_exec_big: Require relocation support Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 20/56] tests/gem_exec_capture: Support gens without relocations Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 21/56] tests/gem_exec_fair: Add softpin support Zbigniew Kempczyński
2021-08-06 22:01   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 22/56] tests/gem_exec_gttfill: Require relocation support Zbigniew Kempczyński
2021-08-09 12:38   ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 23/56] tests/gem_exec_store: Support gens without relocations Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 24/56] tests/gem_exec_suspend: Adopt to use allocator Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 25/56] tests/gem_exec_parallel: Adopt to use alloctor Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 26/56] tests/gem_exec_params: Support gens without relocations Zbigniew Kempczyński
2021-08-09 12:53   ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 27/56] tests/gem_exec_whisper: Adopt to use allocator Zbigniew Kempczyński
2021-08-06 23:14   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 28/56] tests/gem_fenced_exec_thrash: " Zbigniew Kempczyński
2021-08-06 23:27   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 29/56] tests/gem_mmap: Add allocator support Zbigniew Kempczyński
2021-08-09  8:59   ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 30/56] tests/gem_mmap_gtt: " Zbigniew Kempczyński
2021-08-09  9:22   ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 31/56] tests/gem_mmap_offset: " Zbigniew Kempczyński
2021-08-09  9:23   ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 32/56] tests/gem_mmap_wc: Adopt to use allocator Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 33/56] tests/gem_request_retire: Add allocator support Zbigniew Kempczyński
2021-08-09  9:33   ` Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 34/56] tests/gem_ringfill: Adopt to use allocator Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 35/56] tests/gem_softpin: Exercise eviction with softpinning Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 36/56] tests/gem_spin_batch: Adopt to use allocator Zbigniew Kempczyński
2021-08-06 23:41   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 37/56] tests/gem_tiled_fence_blits: " Zbigniew Kempczyński
2021-08-07  0:37   ` Dixit, Ashutosh
2021-08-09  7:30     ` Zbigniew Kempczyński [this message]
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 38/56] tests/gem_unfence_active_buffers: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 39/56] tests/gem_unref_active_buffers: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 40/56] tests/gem_userptr_blits: " Zbigniew Kempczyński
2021-08-07  1:27   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 41/56] tests/gem_wait: " Zbigniew Kempczyński
2021-08-07  1:29   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 42/56] tests/gem_watchdog: Adopt to use no-reloc Zbigniew Kempczyński
2021-08-07  2:00   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 43/56] tests/gem_workarounds: Adopt to use allocator Zbigniew Kempczyński
2021-08-07  2:13   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 44/56] tests/i915_hangman: " Zbigniew Kempczyński
2021-08-07  2:19   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 45/56] tests/i915_module_load: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 46/56] tests/i915_pm_rc6_residency: " Zbigniew Kempczyński
2021-08-07  2:28   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 47/56] tests/i915_pm_rpm: Adopt to use no-reloc Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 48/56] tests/i915_pm_rps: Alter " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 49/56] tests/kms_busy: Adopt to use allocator Zbigniew Kempczyński
2021-08-07  2:30   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 50/56] tests/kms_cursor_legacy: " Zbigniew Kempczyński
2021-08-07  2:33   ` Dixit, Ashutosh
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 51/56] tests/kms_flip: " Zbigniew Kempczyński
2021-08-09  8:27   ` Zbigniew Kempczyński
2021-08-09 10:24     ` Modem, Bhanuprakash
2021-08-09 10:57       ` Zbigniew Kempczyński
2021-08-09 10:43   ` [igt-dev] [i-g-t v5 52/57] " Bhanuprakash Modem
2021-08-09 10:46   ` [igt-dev] [i-g-t v6 52/56] " Bhanuprakash Modem
2021-08-09 10:53   ` [igt-dev] [i-g-t v8 51/56] " Bhanuprakash Modem
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 52/56] tests/kms_vblank: " Zbigniew Kempczyński
2021-08-09  8:26   ` Zbigniew Kempczyński
2021-08-09 10:21     ` Modem, Bhanuprakash
2021-08-09 10:43   ` [igt-dev] [i-g-t v5 53/57] " Bhanuprakash Modem
2021-08-09 10:46   ` [igt-dev] [i-g-t v6 53/56] " Bhanuprakash Modem
2021-08-09 10:53   ` [igt-dev] [i-g-t v8 52/56] " Bhanuprakash Modem
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 53/56] tests/perf_pmu: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 54/56] tests/sysfs_heartbeat_interval: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 55/56] tests/sysfs_preempt_timeout: " Zbigniew Kempczyński
2021-08-06 13:41 ` [igt-dev] [PATCH i-g-t v4 56/56] tests/sysfs_timeslice_duration: " Zbigniew Kempczyński
2021-08-06 14:36 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add allocator support in IGT Patchwork
2021-08-06 17:16 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2021-08-06 18:09 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add allocator support in IGT (rev2) Patchwork
2021-08-06 20:51 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2021-08-09  5:22 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add allocator support in IGT (rev3) Patchwork
2021-08-09  8:36   ` Zbigniew Kempczyński
2021-08-09  8:55   ` Zbigniew Kempczyński
2021-08-09  9:04 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2021-08-09 11:34 ` [igt-dev] ✓ Fi.CI.BAT: success for Add allocator support in IGT (rev9) Patchwork
2021-08-09 12:43 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-08-09 14:20 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2021-08-06  9:45 [igt-dev] [PATCH i-g-t v4 00/56] Add allocator support in IGT Zbigniew Kempczyński
2021-08-06  9:46 ` [igt-dev] [PATCH i-g-t v4 37/56] tests/gem_tiled_fence_blits: Adopt to use allocator 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=20210809073033.GC5318@zkempczy-mobl2 \
    --to=zbigniew.kempczynski@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@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 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.