Re: Preemptive linux



Alexander Krizhanovsky wrote:
David Schwartz wrote:

You only need to call 'preempt_check_resched' if
preemption might be disabled and you still want to be able to be
preempted at a particular point.


Did you mean thread can be preempted by timer interrupt (because of I
don't know any other way by which thread with infinite loop can be
preempted on UP machine)?

Any interrupt, not just timer. Keyboard, serial port, network packet, etc.

Basically, any point at which the kernel is not holding a spinlock (and a few other special cases) is a legal point to get preempted.

Chris
.



Relevant Pages

  • Re: Preemptive linux
    ... Alexander Krizhanovsky wrote: ... preemtible for opportunity to switch context. ... int sys_foo ... preemption also must be enabled by preempt_enable. ...
    (comp.os.linux.development.system)
  • Re: waiting on a condition
    ... > preemption while the spinlock was held. ... >>disable interrupts ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: waiting on a condition
    ... > preemption while the spinlock was held. ... >>disable interrupts ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: [patch 2.6.24-rc2 1/3] generic gpio -- gpio_chip support
    ... that's a spinlock type abstraction of PREEMPT_RT, ... Even when you're talking about the -rt tree, ... platform GPIO logic has no preemption points. ... processes which the user has explicitly set to a higher priority. ...
    (Linux-Kernel)
  • Re: [ofa-general] [PATCH] [WORKAROUND] CONFIG_PREEMPT_RT and ib_umad_close() issue
    ... > But basically, with CONFIG_PREEMPT_RT enabled, the lock points, such as ... > aqcuiring a spinlock, potentially become places where the current task ... > caller should not currently have irqs disabled, or preemption disabled, ... just some background info. ...
    (Linux-Kernel)