Summary: | Intel i915 hard lockup when using vsync-synchronized swapping | ||||||
---|---|---|---|---|---|---|---|
Product: | DRI | Reporter: | Mike Isely <isely> | ||||
Component: | DRM/other | Assignee: | Default DRI bug account <dri-devel> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | major | ||||||
Priority: | highest | CC: | isely | ||||
Version: | unspecified | Keywords: | patch | ||||
Hardware: | All | ||||||
OS: | Linux (All) | ||||||
Whiteboard: | |||||||
i915 platform: | i915 features: | ||||||
Attachments: |
|
Description
Mike Isely
2008-03-10 08:44:02 UTC
Dave pushed the fix to drm Git and submitted it for 2.6.25. I think this fix is partially incorrect. The idea of tasklets is that you should be able to run a "bottom half" of the IRQ handler with hard IRQs enabled. Data that is shared between a hard interrupt handler and a tasklet or a normal process should use spin_lock_irqsave() whereas data shared between a tasklet and a normal process should use spin_lock_bh() So in this case, I think we should be using spin_lock_bh() to avoid unnecessary disabling of hard IRQs. /Thomas Interesting. I was unaware of spin_lock_bh(), but having looked at it now I agree. If I had seen it before, I would have used it. But for what it's worth, I didn't use spin_lock_irqsave() without some care first. This spin lock is only ever taken for very short reasonably deterministic, non-blocking intervals in the DRM code (as part of taking a much heavier-weight lock). So I felt that any latency impact from interrupt blockage in these cases should be negligible and thus I didn't really look for a different (potentially more complex solution). -Mike (In reply to comment #2) > Data that is shared between a hard interrupt handler and a tasklet or a normal > process should use spin_lock_irqsave() whereas data shared between a tasklet > and a normal process should use spin_lock_bh() Note that the tasklet callback function may also be called from normal process context if the tasklet couldn't acquire the DRM lock. Would spin_lock_bh() still work in that case? (In reply to comment #4) > Note that the tasklet callback function may also be called from normal process > context if the tasklet couldn't acquire the DRM lock. Would spin_lock_bh() > still work in that case? Never mind, of course this spinlock is only used by the actual tasklet... so did someone want to submit a patch to use _bh? I've pushed a fix for this now. Let me know if there are any problems with it. /Thomas |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.