preempt_check_resched() gone?

From: Ville Syrjälä
Date: Thu Mar 06 2014 - 15:27:19 EST


Hi,

It appears preempt_check_resched() is no longer available for modules
since [1]. So now I'm left wondering what is one supposed to use after
local_irq_enable(). Documentation/preempt-locking.txt still says one
should do a check, but the tool to do that was taken away.

In case you're wondering why I even need local_irq_enable(), see [2].
So I'm trying to make sure a bunch of double buffered registers get
latched by the hardware during the same display frame. The hardware
will latch the registers at a specific point during the display
refresh cycle, and so I need to avoid writing the registers when
we're too close to that point to make sure all of the registers will
latch the new values at the same time.

[1]
commit 62b94a08da1bae9d187d49dfcd6665af393750f8
Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Date: Wed Nov 20 16:52:19 2013 +0100

sched/preempt: Take away preempt_enable_no_resched() from modules

Discourage drivers/modules to be creative with preemption.

Sadly all is implemented in macros and inline so if they want to do
evil they still can, but at least try and discourage some.

[2] http://lists.freedesktop.org/archives/intel-gfx/2014-February/040161.html

--
Ville Syrjälä
Intel OTC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/