Date: Thu, 19 Mar 2009 08:36:08 +0000 (UTC) From: Robert Noland <rnoland@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r190023 - head/sys/dev/drm Message-ID: <200903190836.n2J8a8Kk053642@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rnoland Date: Thu Mar 19 08:36:08 2009 New Revision: 190023 URL: http://svn.freebsd.org/changeset/base/190023 Log: Add some debugging so I can see when syscalls are being restarted consistantly. After a lengthy irc discussion it seems like we shouldn't need to worry about them, but it's nice to know about. MFC after: 3 days Modified: head/sys/dev/drm/drm_lock.c head/sys/dev/drm/mga_irq.c head/sys/dev/drm/radeon_irq.c Modified: head/sys/dev/drm/drm_lock.c ============================================================================== --- head/sys/dev/drm/drm_lock.c Thu Mar 19 08:34:04 2009 (r190022) +++ head/sys/dev/drm/drm_lock.c Thu Mar 19 08:36:08 2009 (r190023) @@ -87,7 +87,12 @@ int drm_lock(struct drm_device *dev, voi break; } DRM_UNLOCK(); - DRM_DEBUG("%d %s\n", lock->context, ret ? "interrupted" : "has lock"); + + if (ret == ERESTART) + DRM_DEBUG("restarting syscall\n"); + else + DRM_DEBUG("%d %s\n", lock->context, + ret ? "interrupted" : "has lock"); if (ret != 0) return ret; Modified: head/sys/dev/drm/mga_irq.c ============================================================================== --- head/sys/dev/drm/mga_irq.c Thu Mar 19 08:34:04 2009 (r190022) +++ head/sys/dev/drm/mga_irq.c Thu Mar 19 08:36:08 2009 (r190023) @@ -139,6 +139,9 @@ int mga_driver_fence_wait(struct drm_dev (((cur_fence = atomic_read(&dev_priv->last_fence_retired)) - *sequence) <= (1 << 23))); + if (ret == -ERESTART) + DRM_DEBUG("restarting syscall\n"); + *sequence = cur_fence; return ret; Modified: head/sys/dev/drm/radeon_irq.c ============================================================================== --- head/sys/dev/drm/radeon_irq.c Thu Mar 19 08:34:04 2009 (r190022) +++ head/sys/dev/drm/radeon_irq.c Thu Mar 19 08:36:08 2009 (r190023) @@ -282,6 +282,9 @@ static int radeon_wait_irq(struct drm_de DRM_WAIT_ON(ret, dev_priv->swi_queue, 3 * DRM_HZ, RADEON_READ(RADEON_LAST_SWI_REG) >= swi_nr); + if (ret == -ERESTART) + DRM_DEBUG("restarting syscall"); + return ret; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903190836.n2J8a8Kk053642>