Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	sourab.gupta@intel.com, intel-gfx@lists.freedesktop.org,
	Robert Bragg <robert@sixbynine.org>,
	Zhenyu Wang <zhenyuw@linux.intel.com>,
	Jon Bloomfield <jon.bloomfield@intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jabin Wu <jabin.wu@intel.com>, Insoo Woo <insoo.woo@intel.com>
Subject: Re: [RFC 1/8] drm/i915: Have globally unique context ids, as opposed to drm file specific
Date: Wed, 15 Jul 2015 14:36:50 +0200	[thread overview]
Message-ID: <20150715123650.GL3736@phenom.ffwll.local> (raw)
In-Reply-To: <20150715103132.GG9115@nuc-i3427.alporthouse.com>

On Wed, Jul 15, 2015 at 11:31:32AM +0100, Chris Wilson wrote:
> On Wed, Jul 15, 2015 at 10:54:28AM +0100, Chris Wilson wrote:
> > On Wed, Jul 15, 2015 at 02:16:56PM +0530, sourab.gupta@intel.com wrote:
> > > From: Sourab Gupta <sourab.gupta@intel.com>
> > > 
> > > Currently the context ids are specific to a drm file instance, as opposed
> > > to being globally unique. There are some usecases, which may require
> > > globally unique context ids. For e.g. a system level GPU profiler tool may
> > > lean upon the context ids to associate the performance snapshots with
> > > individual contexts. If the context ids are unique, it may do so without
> > > relying on any additional information such as pid and drm fd.
> > > 
> > > This patch proposes an implementation of globally unique context ids, by
> > > conceptually moving the idr table for holding the context ids, into device
> > > private structure instead of file private structure. The case of default
> > > context id for drm file (which is given by id=0) is handled by storing the
> > > same in file private during context creation, and retrieving as and when
> > > required.
> > > 
> > > This patch is proposed an an enabler for the patches following in the
> > > series. In particular, I'm looking for feedback on the pros and cons of
> > > having a globally unique context id, and any specific inputs on this
> > > particular implementation. This implementation can be improved upon, if
> > > agreed upon conceptually.
> > 
> > Simpler: use a cyclic idr for global context ids. The importance here is
> > that for the common case we have a more friendly per-file small lookup
> > table and reporting, also the code should be more understandable with a
> > separate user_handle and guid.
> 
> I should emphasize that we really do want to keep user_handle inside a
> per-file namespace.

Yeah agreed, if we need some global internal ID because we need it in the
hw somewhere then that should be tracked in a separate hw_id field, and
allocated from a separate idr. That would also allow us to correctly
implement any restrictions the hw has (iirc we don't have the full 32bit
for ctx id, but not sure).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-07-15 12:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15  8:46 [RFC 0/8] Introduce framework to forward multi context OA snapshots sourab.gupta
2015-07-15  8:46 ` [RFC 1/8] drm/i915: Have globally unique context ids, as opposed to drm file specific sourab.gupta
2015-07-15  9:54   ` Chris Wilson
2015-07-15 10:31     ` Chris Wilson
2015-07-15 12:36       ` Daniel Vetter [this message]
2015-07-15  8:46 ` [RFC 2/8] drm/i915: Introduce mode for capture of multi ctx OA reports synchronized with RCS sourab.gupta
2015-07-15  8:46 ` [RFC 3/8] drm/i915: Add mechanism for forwarding CS based OA counter snapshots through perf sourab.gupta
2015-07-15  8:46 ` [RFC 4/8] drm/i915: Forward periodic and CS based OA reports sorted acc to timestamps sourab.gupta
2015-07-15  8:47 ` [RFC 5/8] drm/i915: Handle event stop and destroy for commands in flight sourab.gupta
2015-07-15  8:47 ` [RFC 6/8] drm/i915: Insert commands for capture of OA counters in the ring sourab.gupta
2015-07-15 10:26   ` Chris Wilson
2015-07-15  8:47 ` [RFC 7/8] drm/i915: Add support for having pid output with OA report sourab.gupta
2015-07-15  8:47 ` [RFC 8/8] drm/i915: Add support to add execbuffer tags to OA counter reports sourab.gupta
2015-07-15 10:02   ` Chris Wilson
2015-07-15 10:04   ` Chris Wilson
2015-07-15 10:06   ` Chris Wilson
  -- strict thread matches above, loose matches on Subject: below --
2015-06-22  9:50 [RFC 0/8] Introduce framework to forward asynchronous OA counter sourab.gupta
2015-06-22  9:50 ` [RFC 1/8] drm/i915: Have globally unique context ids, as opposed to drm file specific sourab.gupta

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=20150715123650.GL3736@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=a.p.zijlstra@chello.nl \
    --cc=chris@chris-wilson.co.uk \
    --cc=insoo.woo@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jabin.wu@intel.com \
    --cc=jon.bloomfield@intel.com \
    --cc=robert@sixbynine.org \
    --cc=sourab.gupta@intel.com \
    --cc=zhenyuw@linux.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