mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Tasklet usage in the DRM
@ 2007-06-29  7:09 Michel Dänzer
  2007-06-29 12:04 ` Daniel Walker
  0 siblings, 1 reply; 2+ messages in thread
From: Michel Dänzer @ 2007-06-29  7:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: dri-devel


I just read an article on LWN's kernel page about plans to remove
tasklets, and I thought I'd explain what the DRM is using tasklets for.
Maybe there's other ways to satisfy the requirements equally well or
even better.


The i915 driver uses a tasklet to make sure a GL buffer swap blit or
flip takes effect (or at least starts in the case of a blit) during the
vertical blank period, to avoid tearing. I chose a tasklet for this
purpose because:

      * The traditional method of the vertical blank interrupt waking up
        the user process, which would then emit the buffer swap
        commands, didn't even come close to avoiding tearing. So I
        suspect a workqueue wouldn't cut it either.
      * The processing of scheduled buffer swaps could potentially take
        a long time, so doing it in hardirq context could cause high IRQ
        latency.
      * It requires holding the DRM lock, so the 'each tasklet can only
        run once at a time' restriction is fine.


I'm looking forward to any suggestions what to do with this in case
tasklets disappear, and I'll gladly provide further clarification on the
requirements.


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Tasklet usage in the DRM
  2007-06-29  7:09 Tasklet usage in the DRM Michel Dänzer
@ 2007-06-29 12:04 ` Daniel Walker
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Walker @ 2007-06-29 12:04 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: linux-kernel, dri-devel, Steven Rostedt

On Fri, 2007-06-29 at 09:09 +0200, Michel Dänzer wrote:
> I just read an article on LWN's kernel page about plans to remove
> tasklets, and I thought I'd explain what the DRM is using tasklets for.
> Maybe there's other ways to satisfy the requirements equally well or
> even better.
> 
> 
> The i915 driver uses a tasklet to make sure a GL buffer swap blit or
> flip takes effect (or at least starts in the case of a blit) during the
> vertical blank period, to avoid tearing. I chose a tasklet for this
> purpose because:
> 
>       * The traditional method of the vertical blank interrupt waking up
>         the user process, which would then emit the buffer swap
>         commands, didn't even come close to avoiding tearing. So I
>         suspect a workqueue wouldn't cut it either.
>       * The processing of scheduled buffer swaps could potentially take
>         a long time, so doing it in hardirq context could cause high IRQ
>         latency.
>       * It requires holding the DRM lock, so the 'each tasklet can only
>         run once at a time' restriction is fine.
> 
> 
> I'm looking forward to any suggestions what to do with this in case
> tasklets disappear, and I'll gladly provide further clarification on the
> requirements.

If it hasn't been done someone with this hardware could test Steven's
patches to see if they do satisfy the requirements..

I think the most recent version was posted in this message,
http://lkml.org/lkml/2007/6/27/289

Subject was "[RFC PATCH 0/8] Convert all tasklets to workqueues V3" if
people are subscribed to LKML ..

(Added Steven to the CC list)

Daniel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-29 12:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-29  7:09 Tasklet usage in the DRM Michel Dänzer
2007-06-29 12:04 ` Daniel Walker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®