From: Daniel Vetter Subject: Re: [PATCH 2/2] drm/i915: add i915_get_reset_stats_ioctl Date: Tue, 12 Nov 2013 14:17:09 +0100 Message-ID: <20131112131709.GB17150@phenom.ffwll.local> References: <1383140656-13581-1-git-send-email-mika.kuoppala@intel.com> <1383140656-13581-2-git-send-email-mika.kuoppala@intel.com> <20131108181135.GB21062@strange.amr.corp.intel.com> <52816FC1.3060505@freedesktop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f179.google.com (mail-ea0-f179.google.com [209.85.215.179]) by gabe.freedesktop.org (Postfix) with ESMTP id C0919FA575 for ; Tue, 12 Nov 2013 05:16:38 -0800 (PST) Received: by mail-ea0-f179.google.com with SMTP id r15so1306486ead.24 for ; Tue, 12 Nov 2013 05:16:37 -0800 (PST) Content-Disposition: inline In-Reply-To: <52816FC1.3060505@freedesktop.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Ian Romanick Cc: miku@iki.fi, intel-gfx@lists.freedesktop.org, Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Mon, Nov 11, 2013 at 04:01:05PM -0800, Ian Romanick wrote: > On 11/08/2013 10:11 AM, Damien Lespiau wrote: > > On Wed, Oct 30, 2013 at 03:44:16PM +0200, Mika Kuoppala wrote: > >> This ioctl returns reset stats for specified context. > >> > >> The struct returned contains context loss counters. > >> > >> reset_count: all resets across all contexts > >> batch_active: active batches lost on resets > >> batch_pending: pending batches lost on resets > >> > >> v2: get rid of state tracking completely and deliver only counts. Idea > >> from Chris Wilson. > >> > >> v3: fix commit message > >> > >> v4: default context handled inside i915_gem_context_get_hang_stats > >> > >> v5: reset_count only for priviledged process > >> > >> v6: ctx=0 needs CAP_SYS_ADMIN for batch_* counters (Chris Wilson) > >> > >> v7: context hang stats never returns NULL > >> > >> v8: rebased on top of reworked context hang stats > >> DRM_RENDER_ALLOW for ioctl > >> > >> v9: use DEFAULT_CONTEXT_ID. Improve comments for ioctl struct members > >> > >> Signed-off-by: Mika Kuoppala > >> Cc: Ian Romanick > >> Cc: Chris Wilson > >> Cc: Daniel Vetter > > > > The logic there looks good to me, I was just wondering if we wanted a > > bit more padding in case we want other counters or misc stuff. > > I think the current padding should be sufficient. The other things that > could occur aren't things that we should return counts of. For those > kinds of things, we'd only want to return flags. In fact, the current > user space only uses the counts as flags anyway (is the count non-zero?). > > > Reviewed-by: Damien Lespiau > > Also, > > Reviewed-by: Ian Romanick I've just pulled in this and Mika's updated prep patch into my queue. I'll freeze it down into drm-intel-next at the end of this week. Thanks for the patch and review. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch