From: Daniel Vetter <daniel@ffwll.ch>
To: Ilija Hadzic <ihadzic@research.bell-labs.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4] drm: do not sleep on vblank while holding a mutex
Date: Mon, 31 Oct 2011 23:03:37 +0100 [thread overview]
Message-ID: <20111031220337.GA30420@phenom.ffwll.local> (raw)
In-Reply-To: <1320097578-9011-1-git-send-email-ihadzic@research.bell-labs.com>
On Mon, Oct 31, 2011 at 05:46:18PM -0400, Ilija Hadzic wrote:
> drm_wait_vblank must be DRM_UNLOCKED because otherwise it
> will grab the drm_global_mutex and then go to sleep until the vblank
> event it is waiting for. That can wreck havoc in the windowing system
> because if one process issues this ioctl, it will block all other
> processes for the duration of all vblanks between the current and the
> one it is waiting for. In some cases it can block the entire windowing
> system.
>
> v2: incorporate comments received from Daniel Vetter and
> Michel Daenzer.
>
> v3/v4: after a lengty discussion with Daniel Vetter, it was concluded
> that the only thing not yet protected with locks and atomic
> ops is the write to dev->last_vblank_wait. It's only used in a
> debug file in proc, and the current code already employs no
> correct locking: the proc file only takes dev->struct_mutex,
> whereas drm_wait_vblank implicitly took the drm_global_mutex.
> Given all this, it's not worth bothering to try to fix
> the locks at this time.
>
> Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
prev parent reply other threads:[~2011-10-31 22:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-31 21:46 [PATCH v4] drm: do not sleep on vblank while holding a mutex Ilija Hadzic
2011-10-31 22:03 ` Daniel Vetter [this message]
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=20111031220337.GA30420@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=ihadzic@research.bell-labs.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.