Right. By coincidence, I found myself thinking about this very problem
as I re-materialized this morning. If TRY_INC_MOD_COUNT also ors a flag
(which it does now, for other reasons) then:
1) Clear the mod_inc flag
2) Unhook the function hooks
3) Schedule on each CPU
4) If the mod_inc flag is set, repeat from (1)
This should perform acceptably well, and would only be done in cases
where the existing TRY_INC_MOD_COUNT strategy can't be used.
> You can't disable preemption before calling in, because there is no
> way to sleep with preemption disabled. 8(
Why is that harder than bumping a counter that makes preempt_schedule
return without doing anything?
-- Daniel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/